CASM
AClustersApproachtoStatisticalMechanics
|
#include <PermuteIterator.hh>
Permutation bidirectional Iterator class Can iterate over all combined factor group and translation permutations for a Supercell
The sequence: for( it = scel.permute_begin(); it != scel.permute_end(); ++it) { after_array = it->permute(before_array); }
replicates this sequence of permutations: for( f=0; f<scel->factor_group().size(); f++) { for( t=0; t<scel->translation_permute().size(); t++) { after_array = scel->translation_permute(t).permute(scel->factor_group_permute(f).permute(before_array)); } }
Bidirectional iterators are supposed to be input/output iterators, but this is actually only an input iterator... meaning operator* returns by value
Definition at line 35 of file PermuteIterator.hh.
Public Member Functions | |
PermuteIterator () | |
PermuteIterator (const PermuteIterator &iter) | |
PermuteIterator (SymGroupRep::RemoteHandle _fg_permute_rep, const PrimGrid &_prim_grid, Index _factor_group_index, Index _translation_index) | |
PermuteIterator & | operator= (PermuteIterator iter) |
const PermuteIterator & | operator* () const |
Returns the combination of factor_group permutation and translation permutation. More... | |
Permutation | combined_permute () const |
Returns the combination of factor_group permutation and translation permutation. More... | |
template<typename T > | |
ReturnArray< T > | permute (const Array< T > &before_array) const |
Apply the combined factor_group permutation and translation permutation being pointed at. More... | |
Index | factor_group_index () const |
Return the index into m_factor_group_permute of the factor group op being pointed at. More... | |
Index | translation_index () const |
Return the index into m_prim_grid of the translation being pointed at. More... | |
const Permutation & | factor_group_permute () const |
Return the factor group permutation being pointed at. More... | |
const Permutation & | translation_permute () const |
Return the translation permutation being pointed at. More... | |
SymOp | sym_op () const |
Index | permute_ind (Index i) const |
template<typename T > | |
const T & | permute_by_bit (Index i, const Array< T > &before_array) const |
Return after_array[i], given i and before_array. More... | |
bool | operator< (const PermuteIterator &iter) const |
PermuteIterator & | operator++ () |
PermuteIterator | operator++ (int) |
PermuteIterator & | operator-- () |
PermuteIterator | operator-- (int) |
PermuteIterator | begin_next_fg_op () const |
PermuteIterator | inverse () const |
PermuteIterator | operator* (const PermuteIterator &RHS) const |
jsonParser & | to_json (jsonParser &json) const |
void | from_json (const jsonParser &json) |
bool | operator> (const PermuteIterator &B) const |
bool | operator<= (const PermuteIterator &B) const |
bool | operator>= (const PermuteIterator &B) const |
bool | operator== (const PermuteIterator &B) const |
bool | operator!= (const PermuteIterator &B) const |
Protected Member Functions | |
const PermuteIterator & | derived () const |
bool | _ne (const PermuteIterator &B) const |
Private Member Functions | |
bool | _eq (const PermuteIterator &iter) const |
Private Attributes | |
SymGroupRep::RemoteHandle | m_fg_permute_rep |
permutation representation of factor group acting on sites of the supercell More... | |
PrimGrid const * | m_prim_grid |
m_prim_grid holds permutation representation of lattice translations acting on sites of the supercell More... | |
Array< Permutation > const * | m_trans_permute |
m_trans_permute points to the Array<Permutation> of translation permutations inside of m_prim_grid (to provide faster access) More... | |
Index | m_factor_group_index |
Index | m_translation_index |
friend | Comparisons< PermuteIterator > |
Friends | |
void | swap (PermuteIterator &a, PermuteIterator &b) |
CASM::PermuteIterator::PermuteIterator | ( | ) |
Definition at line 7 of file PermuteIterator.cc.
CASM::PermuteIterator::PermuteIterator | ( | const PermuteIterator & | iter | ) |
Definition at line 9 of file PermuteIterator.cc.
CASM::PermuteIterator::PermuteIterator | ( | SymGroupRep::RemoteHandle | _fg_permute_rep, |
const PrimGrid & | _prim_grid, | ||
Index | _factor_group_index, | ||
Index | _translation_index | ||
) |
Definition at line 18 of file PermuteIterator.cc.
|
private |
Definition at line 99 of file PermuteIterator.cc.
|
inlineprotectedinherited |
Definition at line 56 of file Comparisons.hh.
PermuteIterator CASM::PermuteIterator::begin_next_fg_op | ( | ) | const |
Iterator to next beginning of next factor group operation skipping all of the intervening operations that differ only by a translation
Definition at line 142 of file PermuteIterator.cc.
Permutation CASM::PermuteIterator::combined_permute | ( | ) | const |
Returns the combination of factor_group permutation and translation permutation.
Definition at line 40 of file PermuteIterator.cc.
|
inlineprotectedinherited |
Definition at line 48 of file Comparisons.hh.
Index CASM::PermuteIterator::factor_group_index | ( | ) | const |
Return the index into m_factor_group_permute of the factor group op being pointed at.
Return the index into Supercell::factor_group_permute of the factor group op being pointed at.
Definition at line 59 of file PermuteIterator.cc.
const Permutation & CASM::PermuteIterator::factor_group_permute | ( | ) | const |
Return the factor group permutation being pointed at.
Definition at line 69 of file PermuteIterator.cc.
void CASM::PermuteIterator::from_json | ( | const jsonParser & | json | ) |
Definition at line 187 of file PermuteIterator.cc.
PermuteIterator CASM::PermuteIterator::inverse | ( | ) | const |
Definition at line 150 of file PermuteIterator.cc.
|
inlineinherited |
Definition at line 41 of file Comparisons.hh.
const PermuteIterator & CASM::PermuteIterator::operator* | ( | ) | const |
Returns the combination of factor_group permutation and translation permutation.
Returns a copy.
Definition at line 35 of file PermuteIterator.cc.
PermuteIterator CASM::PermuteIterator::operator* | ( | const PermuteIterator & | RHS | ) | const |
Definition at line 165 of file PermuteIterator.cc.
PermuteIterator & CASM::PermuteIterator::operator++ | ( | ) |
Definition at line 109 of file PermuteIterator.cc.
PermuteIterator CASM::PermuteIterator::operator++ | ( | int | ) |
Definition at line 119 of file PermuteIterator.cc.
PermuteIterator & CASM::PermuteIterator::operator-- | ( | ) |
Definition at line 126 of file PermuteIterator.cc.
PermuteIterator CASM::PermuteIterator::operator-- | ( | int | ) |
Definition at line 136 of file PermuteIterator.cc.
bool CASM::PermuteIterator::operator< | ( | const PermuteIterator & | iter | ) | const |
Definition at line 92 of file PermuteIterator.cc.
|
inlineinherited |
Definition at line 29 of file Comparisons.hh.
PermuteIterator & CASM::PermuteIterator::operator= | ( | PermuteIterator | iter | ) |
Definition at line 29 of file PermuteIterator.cc.
|
inlineinherited |
Definition at line 37 of file Comparisons.hh.
|
inlineinherited |
Definition at line 25 of file Comparisons.hh.
|
inlineinherited |
Definition at line 33 of file Comparisons.hh.
ReturnArray< T > CASM::PermuteIterator::permute | ( | const Array< T > & | before_array | ) | const |
Apply the combined factor_group permutation and translation permutation being pointed at.
Definition at line 46 of file PermuteIterator.cc.
const T & CASM::PermuteIterator::permute_by_bit | ( | Index | i, |
const Array< T > & | before_array | ||
) | const |
Return after_array[i], given i and before_array.
Definition at line 88 of file PermuteIterator.cc.
Index-wise permutation defined via: after_permutation[i] = before_permutation[permutat_iterator.permute_ind(i)];
Definition at line 82 of file PermuteIterator.cc.
SymOp CASM::PermuteIterator::sym_op | ( | ) | const |
gets the SymOp for the current operation, defined by translation_op[trans_index]*factor_group_op[fg_index] i.e, equivalent to application of the factor group operation, FOLLOWED BY application of the translation operation
Definition at line 78 of file PermuteIterator.cc.
jsonParser & CASM::PermuteIterator::to_json | ( | jsonParser & | json | ) | const |
Definition at line 180 of file PermuteIterator.cc.
Index CASM::PermuteIterator::translation_index | ( | ) | const |
Return the index into m_prim_grid of the translation being pointed at.
Return the index into Supercell::translation_permute of the translation being pointed at.
Definition at line 64 of file PermuteIterator.cc.
const Permutation & CASM::PermuteIterator::translation_permute | ( | ) | const |
Return the translation permutation being pointed at.
Definition at line 74 of file PermuteIterator.cc.
|
friend |
Definition at line 192 of file PermuteIterator.cc.
|
private |
Definition at line 127 of file PermuteIterator.hh.
|
private |
Definition at line 48 of file PermuteIterator.hh.
|
private |
permutation representation of factor group acting on sites of the supercell
Definition at line 40 of file PermuteIterator.hh.
|
private |
m_prim_grid holds permutation representation of lattice translations acting on sites of the supercell
Definition at line 43 of file PermuteIterator.hh.
|
private |
m_trans_permute points to the Array<Permutation> of translation permutations inside of m_prim_grid (to provide faster access)
Definition at line 46 of file PermuteIterator.hh.
|
private |
Definition at line 49 of file PermuteIterator.hh.