CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::xtal::SiteDoFSetIsEquivalent_f Struct Reference

#include <DoFSet.hh>

+ Inheritance diagram for CASM::xtal::SiteDoFSetIsEquivalent_f:

Detailed Description

Comparator class for checking equivalence of two DoFSet values. Behaves exactly like DoFSetIsEquivalent, but also checks for excluded occupants. Evaluate by constructing object with one of the values, and then pass the other DoFSet to the oveloaded operator().

DoFSets are considered equivalent if:

  • The traits names match
  • They have the same names for each of the axes
  • Basis vectors span the same space

Definition at line 185 of file DoFSet.hh.

Public Member Functions

 SiteDoFSetIsEquivalent_f (const SiteDoFSet &reference_value, double tol)
 
bool operator() (const SiteDoFSet &other_value) const
 

Private Member Functions

bool _excluded_occupants_match (const SiteDoFSet &other_value) const
 
bool operator() (const DoFSet &other_value) const
 
bool _traits_match (const DoFSet &other_value) const
 Returns true if the traits match. Only compares the names. More...
 
bool _basis_spans_same_space (const DoFSet &other_value) const
 

Private Attributes

std::unordered_set< std::string > m_reference_excluded_occs
 
DoFSet m_reference_dofset
 Values passed to operator() will be compared against this. More...
 
double m_tol
 Tolerance value for making comparisons. More...
 

Constructor & Destructor Documentation

◆ SiteDoFSetIsEquivalent_f()

CASM::xtal::SiteDoFSetIsEquivalent_f::SiteDoFSetIsEquivalent_f ( const SiteDoFSet reference_value,
double  tol 
)
inline

Definition at line 186 of file DoFSet.hh.

Member Function Documentation

◆ _basis_spans_same_space()

bool CASM::xtal::DoFSetIsEquivalent_f::_basis_spans_same_space ( const DoFSet other_value) const
privateinherited

Returns true if the axis span the same space. For example the basis would be considered equivalent if they are the same but have been rotated

Definition at line 24 of file DoFSet.cc.

◆ _excluded_occupants_match()

bool CASM::xtal::SiteDoFSetIsEquivalent_f::_excluded_occupants_match ( const SiteDoFSet other_value) const
inlineprivate

Definition at line 200 of file DoFSet.hh.

◆ _traits_match()

bool CASM::xtal::DoFSetIsEquivalent_f::_traits_match ( const DoFSet other_value) const
privateinherited

Returns true if the traits match. Only compares the names.

Definition at line 20 of file DoFSet.cc.

◆ operator()() [1/2]

bool CASM::xtal::DoFSetIsEquivalent_f::operator() ( const DoFSet other_value) const
inherited

Returns true if the passed is equivalent to the stored value that *this was constructed with

Definition at line 47 of file DoFSet.cc.

◆ operator()() [2/2]

bool CASM::xtal::SiteDoFSetIsEquivalent_f::operator() ( const SiteDoFSet other_value) const
inline

Returns true if the passed is equivalent to the stored value that *this was constructed with

Definition at line 192 of file DoFSet.hh.

Member Data Documentation

◆ m_reference_dofset

DoFSet CASM::xtal::DoFSetIsEquivalent_f::m_reference_dofset
privateinherited

Values passed to operator() will be compared against this.

Definition at line 160 of file DoFSet.hh.

◆ m_reference_excluded_occs

std::unordered_set<std::string> CASM::xtal::SiteDoFSetIsEquivalent_f::m_reference_excluded_occs
private

Definition at line 198 of file DoFSet.hh.

◆ m_tol

double CASM::xtal::DoFSetIsEquivalent_f::m_tol
privateinherited

Tolerance value for making comparisons.

Definition at line 163 of file DoFSet.hh.


The documentation for this struct was generated from the following file: