53 template <
typename Iterator>
87 const std::vector<Index> &block_dims)
const;
100 template <
typename Container>
101 Container
permute(
const Container &_before)
const;
104 template <
typename Container>
105 Container
ipermute(
const Container &_before)
const;
107 template <
typename Container>
115 std::ostream &
operator<<(std::ostream &,
const Permutation &);
123 template <
typename Container>
125 assert(before_vec.size() ==
size() &&
126 "WARNING: You're trying to permute a Container with an incompatible "
129 Container after_vec(before_vec);
143 template <
typename Container>
145 assert(before_array.size() ==
size() &&
146 "WARNING: You're trying to permute an Container with an incompatible "
149 Container after_array(before_array);
Permutation inverse() const
Construct permutation that undoes the permutation performed by 'this'.
Container permute(const Container &_before) const
Generate permuted copy of indexed container.
bool has_fixed_points() const
Checks whether any indices remain unchanged by permutation.
Container ipermute(const Container &_before) const
Generate inversely permuted copy of type-T std::vector.
Permutation(const std::vector< Index > &init_perm)
Index character() const
Character of permutation is number of fixed points.
bool is_identity() const
Checks whether permutation is identity (i.e., m_perm_aray[i]==i for all i)
Permutation transformed_by(const Permutation &trans_perm) const
std::vector< Index > m_perm_array
Permutation make_block_permutation(const std::vector< Index > &block_dims) const
void append_fixed_points(Index N_new)
Add new indices that remain unchanged by permutation.
const Index & operator[](Index i) const
const access of m_perm_array for doing low-level permutation algebra
Container operator*(const Container &_before) const
Permutation(std::vector< Index > &&init_perm)
const std::vector< Index > & perm_array() const
Index & set(Index i)
non-const access of m_perm_array for doing low-level permutation algebra
Permutation(Iterator begin, Iterator end)
std::ostream & operator<<(std::ostream &_stream, const FormattedPrintable &_formatted)
INDEX_TYPE Index
For long integer indexing: