|
|
template<int aux_dim = dim>
requires (aux_dim == dim && dim > 0) |
| | TensorIndexTP () |
| | Default constructor. Initializes indices to zero.
|
| |
template<int aux_dim = dim>
requires (aux_dim == dim && dim == 0) |
| | TensorIndexTP () |
| |
template<int aux_dim = dim>
requires (aux_dim == dim && dim > 0) |
| | TensorIndexTP (int ind) |
| | Constructs a new TensorIndexTP object from an index.
|
| |
| | TensorIndexTP (const Vector< int, dim > &indices) |
| | Constructs a new TensorIndexTP object from its indices.
|
| |
| | TensorIndexTP (const TensorSizeTP< dim > &indices) |
| | Constructs a new TensorIndexTP object from its indices.
|
| |
template<int aux_dim = dim>
requires (aux_dim == dim && dim > 0) |
| | TensorIndexTP (std::int64_t flat_index, const TensorIndexTP< dim > &size) |
| | Constructs a new TensorIndexTP object from a flat index and an associated tensor size following the lexicographical ordering convention (i.e., lower indices run faster than higher ones).
|
| |
template<int aux_dim = dim>
requires (aux_dim == dim && dim > 0) |
| | TensorIndexTP (std::int64_t flat_index, const TensorSizeTP< dim > &size) |
| | Constructs a new TensorIndexTP object from a flat index and an associated tensor size following the lexicographical ordering convention (i.e., lower indices run faster than higher ones).
|
| |
template<typename... T>
requires (dim > 1 && sizeof...(T) == dim && std::conjunction_v<std::is_same<int, T>...>) |
| | TensorIndexTP (T... indices) |
| | Constructs the tensor index from an argument list.
|
| |
| const Vector< int, dim > & | as_Vector () const |
| | Returns the tensor index casted as a Vector.
|
| |
| Vector< int, dim > & | as_Vector () |
| | Returns the tensor index casted as a Vector.
|
| |
| template<typename S > |
| std::int64_t | flat (const S &size) const |
| | Gets the flat index associated to the current tensor index for a given tensor size.
|
| |
| bool | operator== (const TensorIndexTP< dim > &rhs) const |
| | Checks if two tensor indices are equal by comparing all its components. They are equal if all the components are equal.
|
| |
| bool | operator!= (const TensorIndexTP< dim > &rhs) const |
| | Checks if two tensor indices are different by comparing all its components. They are different if at least one component is different.
|
| |
| bool | operator< (const TensorIndexTP< dim > &rhs) const |
| | Checks if the current tensor index is smaller than rhs. To determine if one is smaller than the other, all the componets are compared starting from the last one.
|
| |
template<int aux_dim = dim>
requires (aux_dim == dim && dim > 1) |
| TensorIndexTP< dim - 1 > | remove_component (int comp) const |
| | Creates a new index by removing one of its component.
|
| |
| std::size_t | hash () const |
| | Computes a hash value for the tensor index.
|
| |
template<int dim>
class qugar::TensorIndexTP< dim >
Class representing a dim-dimensional tensor-product indices.
- Template Parameters
-
| dim | Dimension of the indices. |