CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
PermuteIterator.hh
Go to the documentation of this file.
1 #ifndef PermuteIterator_HH
2 #define PermuteIterator_HH
3 
8 
9 namespace CASM {
10  class PrimGrid;
11 
16  class PermuteIterator :
36  public std::iterator <std::bidirectional_iterator_tag, PermuteIterator>,
37  public Comparisons<PermuteIterator> {
38 
41 
44 
47 
50 
51  public:
52 
54 
55  PermuteIterator(const PermuteIterator &iter);
56 
58  const PrimGrid &_prim_grid,
59  Index _factor_group_index,
60  Index _translation_index);
61 
63 
65  const PermuteIterator &operator*() const;
66 
69 
71  template<typename T>
72  ReturnArray<T> permute(const Array<T> &before_array) const;
73 
75  Index factor_group_index() const;
76 
78  Index translation_index() const;
79 
81  const Permutation &factor_group_permute() const;
82 
84  const Permutation &translation_permute() const;
85 
88  SymOp sym_op()const;
89 
92  Index permute_ind(Index i) const;
93 
95  template<typename T>
96  const T &permute_by_bit(Index i, const Array<T> &before_array) const;
97 
98  bool operator<(const PermuteIterator &iter) const;
99 
100  // prefix ++PermuteIterator
102 
103  // postfix PermuteIterator++
105 
106  // prefix --PermuteIterator
108 
109  // postfix PermuteIterator--
111 
115 
116  PermuteIterator inverse() const;
117 
118  PermuteIterator operator*(const PermuteIterator &RHS) const;
119 
120  jsonParser &to_json(jsonParser &json) const;
121  void from_json(const jsonParser &json);
122 
123  friend void swap(PermuteIterator &a, PermuteIterator &b);
124 
125  private:
126 
128 
129  bool _eq(const PermuteIterator &iter) const;
130 
131  };
132 
133  jsonParser &to_json(const PermuteIterator &clust, jsonParser &json);
134  void from_json(PermuteIterator &clust, const jsonParser &json);
135 
137 }
138 #endif
PrimGrid const * m_prim_grid
m_prim_grid holds permutation representation of lattice translations acting on sites of the supercell...
bool operator<(const PermuteIterator &iter) const
void from_json(ClexDescription &desc, const jsonParser &json)
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
bool _eq(const PermuteIterator &iter) const
PermuteIterator & operator++()
void from_json(const jsonParser &json)
PermuteIterator & operator--()
Index permute_ind(Index i) const
PermuteIterator inverse() const
Main CASM namespace.
Definition: complete.cpp:8
const Permutation & factor_group_permute() const
Return the factor group permutation being pointed at.
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
Definition: SymOp.hh:28
EigenIndex Index
For long integer indexing:
const T & permute_by_bit(Index i, const Array< T > &before_array) const
Return after_array[i], given i and before_array.
ReturnArray< T > permute(const Array< T > &before_array) const
Apply the combined factor_group permutation and translation permutation being pointed at...
const Permutation & translation_permute() const
Return the translation permutation being pointed at.
PermuteIterator begin_next_fg_op() const
const PermuteIterator & operator*() const
Returns the combination of factor_group permutation and translation permutation.
PermuteIterator & operator=(PermuteIterator iter)
Array< Permutation > const * m_trans_permute
m_trans_permute points to the Array of translation permutations inside of m_prim_grid (t...
Index translation_index() const
Return the index into m_prim_grid of the translation being pointed at.
friend void swap(PermuteIterator &a, PermuteIterator &b)
jsonParser & to_json(jsonParser &json) const
Index factor_group_index() const
Return the index into m_factor_group_permute of the factor group op being pointed at...
Basic std::vector like container (deprecated)
Permutation combined_permute() const
Returns the combination of factor_group permutation and translation permutation.
SymGroupRep::RemoteHandle m_fg_permute_rep
permutation representation of factor group acting on sites of the supercell