CASM  1.1.0
A Clusters Approach to Statistical Mechanics
SimpleOrbit.hh
Go to the documentation of this file.
1 #ifndef CASM_symmetry_SimpleOrbit
2 #define CASM_symmetry_SimpleOrbit
3 
5 
6 namespace CASM {
7 
8 class SymOp;
9 class SymGroup;
10 
27 template <typename _SymCompareType>
28 class SimpleOrbit {
29  public:
30  using size_type = unsigned int;
31  using SymCompareType = _SymCompareType;
32  using Element = typename _SymCompareType::Element;
33  using InvariantsType = typename _SymCompareType::InvariantsType;
34  using const_iterator = typename std::vector<Element>::const_iterator;
35 
37  template <typename GroupIterator>
38  SimpleOrbit(typename SymCompareType::Element const &_generating_element,
39  GroupIterator _group_begin, GroupIterator _group_end,
40  SymCompareType const &_sym_compare);
41 
42  const_iterator begin() const { return m_element.cbegin(); }
43 
44  const_iterator end() const { return m_element.cend(); }
45 
46  const_iterator cbegin() const { return m_element.cbegin(); }
47 
48  const_iterator cend() const { return m_element.cend(); }
49 
50  size_type size() const { return m_element.size(); }
51 
53  Element const &prototype() const { return m_element[0]; }
54 
58  Element const &operator[](size_type index) const { return element(index); }
59 
63  Element const &element(size_type index) const { return m_element[index]; }
64 
68  std::vector<Element> const &elements() const { return m_element; }
69 
73  throw std::runtime_error("No equivalence map for SimpleOrbit");
74  }
75 
78  const SymGroup &generating_group() const {
79  throw std::runtime_error("No generating group for SimpleOrbit");
80  }
81 
85  SymCompareType const &sym_compare() const { return m_sym_compare; }
86 
87  InvariantsType const &invariants() const { return m_invariants; }
88 
90  bool operator<(const SimpleOrbit &B) const;
91 
92  private:
95  std::vector<Element> m_element;
96 };
97 } // namespace CASM
98 
99 #endif
InvariantsType const & invariants() const
Definition: SimpleOrbit.hh:87
const multivector< SymOp >::X< 2 > & equivalence_map() const
Not implemented: Will throw. Exists only for compatibility with orbit printing.
Definition: SimpleOrbit.hh:72
typename _SymCompareType::InvariantsType InvariantsType
Definition: SimpleOrbit.hh:33
unsigned int size_type
Definition: SimpleOrbit.hh:30
SimpleOrbit(typename SymCompareType::Element const &_generating_element, GroupIterator _group_begin, GroupIterator _group_end, SymCompareType const &_sym_compare)
Construct a SimpleOrbit using a range of SymOp or PermuteIterator.
size_type size() const
Definition: SimpleOrbit.hh:50
Element const & operator[](size_type index) const
Return Element at index, without bounds checking.
Definition: SimpleOrbit.hh:58
typename _SymCompareType::Element Element
Definition: SimpleOrbit.hh:32
const_iterator end() const
Definition: SimpleOrbit.hh:44
std::vector< Element > m_element
Definition: SimpleOrbit.hh:95
std::vector< Element > const & elements() const
const Access vector of Element
Definition: SimpleOrbit.hh:68
_SymCompareType SymCompareType
Definition: SimpleOrbit.hh:31
SymCompareType const & sym_compare() const
Return the SymCompare functor reference.
Definition: SimpleOrbit.hh:85
const_iterator cend() const
Definition: SimpleOrbit.hh:48
const_iterator begin() const
Definition: SimpleOrbit.hh:42
const SymGroup & generating_group() const
Not implemented: Will throw. Exists only for compatibility with orbit printing.
Definition: SimpleOrbit.hh:78
const_iterator cbegin() const
Definition: SimpleOrbit.hh:46
bool operator<(const SimpleOrbit &B) const
Compare orbits, using SymCompareType::inter_orbit_compare.
Element const & prototype() const
Identical to element(0)
Definition: SimpleOrbit.hh:53
InvariantsType m_invariants
Definition: SimpleOrbit.hh:94
Element const & element(size_type index) const
Equivalent to operator[](size_type index) const.
Definition: SimpleOrbit.hh:63
typename std::vector< Element >::const_iterator const_iterator
Definition: SimpleOrbit.hh:34
SymCompareType m_sym_compare
Definition: SimpleOrbit.hh:93
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
Definition: SymGroup.hh:42
Main CASM namespace.
Definition: APICommand.hh:8
typename multivector_impl::multivector_tmp< T, N >::type X
Definition: multivector.hh:28