CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
ConfigCompare.hh
Go to the documentation of this file.
1 #ifndef CASM_ConfigCompare
2 #define CASM_ConfigCompare
3 
5 
6 namespace CASM {
7 
13  class ConfigCompare {
15 
16  public:
17 
18  ConfigCompare(const Configuration &_config, double _tol) :
19  m_eq(_config, _tol) {}
20 
22  bool operator()(const Configuration &other) const {
23  if(m_eq(other)) {
24  return false;
25  }
26  return m_eq.is_less();
27  }
28 
30  bool operator()(const PermuteIterator &A) const {
31  if(m_eq(A)) {
32  return false;
33  }
34  return m_eq.is_less();
35  }
36 
38  bool operator()(const PermuteIterator &A, const PermuteIterator &B) const {
39  if(m_eq(A, B)) {
40  return false;
41  }
42  return m_eq.is_less();
43  }
44 
45  private:
46 
48 
49  };
50 
52 }
53 
54 #endif
ConfigIsEquivalent m_eq
ConfigCompare(const Configuration &_config, double _tol)
bool operator()(const PermuteIterator &A) const
Check if config == A*config, store config < A*config.
bool operator()(const PermuteIterator &A, const PermuteIterator &B) const
Check if A*config == B*config, store A*config < B*config.
Main CASM namespace.
Definition: complete.cpp:8
bool is_less() const
Returns less than comparison.
Class for comparison of Configurations (with the same Supercell)
bool operator()(const Configuration &other) const
Check if config < other.
A Configuration represents the values of all degrees of freedom in a Supercell.