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

#include <DoFSet.hh>

+ Inheritance diagram for CASM::xtal::DoFSetIsEquivalent_f:

Detailed Description

Comparator class for checking equivalence of two DoFSet values. 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
  • Basis vectors span the same space

Definition at line 149 of file DoFSet.hh.

Public Member Functions

 DoFSetIsEquivalent_f (const DoFSet &reference_value, double tol)
 
bool operator() (const DoFSet &other_value) const
 

Private Member Functions

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

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

◆ DoFSetIsEquivalent_f()

CASM::xtal::DoFSetIsEquivalent_f::DoFSetIsEquivalent_f ( const DoFSet reference_value,
double  tol 
)
inline

Definition at line 151 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
private

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.

◆ _traits_match()

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

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

Definition at line 20 of file DoFSet.cc.

◆ operator()()

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

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

Definition at line 47 of file DoFSet.cc.

Member Data Documentation

◆ m_reference_dofset

DoFSet CASM::xtal::DoFSetIsEquivalent_f::m_reference_dofset
private

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

Definition at line 160 of file DoFSet.hh.

◆ m_tol

double CASM::xtal::DoFSetIsEquivalent_f::m_tol
private

Tolerance value for making comparisons.

Definition at line 163 of file DoFSet.hh.


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