26#include <initializer_list>
42 if (
context()->is_head_node()) {
45 ss <<
"provided index [" << formatter << index <<
"] is out of range "
46 <<
"for shape [" << formatter << shape <<
"]";
47 throw std::out_of_range(
ss.str());
56 for (
auto i : {0
u, 1u, 2u}) {
Vector implementation and trait types for boost qvm interoperability.
Interface to carry out simple operations on lattice indices.
void throw_invalid_index(Utils::Vector3i const &index, Utils::Vector3i const &shape) const
bool is_index_valid(Utils::Vector3i const &index, Utils::Vector3i const &shape) const
Utils::Vector3i get_mapped_index(Utils::Vector3i const &index, Utils::Vector3i const &shape) const
Base class for interface handles.
Context * context() const
Responsible context.
T get_value(Variant const &v)
Extract value of specific type T from a Variant.
static constexpr detail::ArrayFormatter formatter(char const *sep=" ")