CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::ConfigIsEquivalent Class Reference

#include <ConfigIsEquivalent.hh>

Detailed Description

Class for comparison of Configurations (with the same Supercell)

  • The call operators return the value for equality comparison, and if not equivalent, also store the result for less than comparison

Definition at line 20 of file ConfigIsEquivalent.hh.

Public Types

using EquivPtr = notstd::cloneable_ptr< ConfigDoFIsEquivalent::Base >
 

Public Member Functions

 ConfigIsEquivalent (const Configuration &_config, double _tol, std::set< std::string > const &_which_dofs={"all"})
 
 ConfigIsEquivalent (const Configuration &_config, std::set< std::string > const &_which_dofs={"all"})
 
const Configurationconfig () const
 
std::vector< EquivPtr > const & local_equivs () const
 
std::vector< EquivPtr > const & global_equivs () const
 
bool is_less () const
 Returns less than comparison. More...
 
bool operator() (const Configuration &other) const
 Check if config == other, store config < other. More...
 
bool operator() (const PermuteIterator &A) const
 Check if config == A*config, store config < A*config. More...
 
bool operator() (const PermuteIterator &A, const PermuteIterator &B) const
 Check if A*config == B*config, store A*config < B*config. More...
 
bool operator() (const PermuteIterator &A, const Configuration &other) const
 Check if config == A*other, store config < A*other. More...
 
bool operator() (const PermuteIterator &A, const PermuteIterator &B, const Configuration &other) const
 Check if A*config == B*other, store A*config < B*other. More...
 

Private Attributes

const Configurationm_config
 
std::vector< EquivPtrm_global_equivs
 
std::vector< EquivPtrm_local_equivs
 
bool m_less
 

Member Typedef Documentation

◆ EquivPtr

Constructor & Destructor Documentation

◆ ConfigIsEquivalent() [1/2]

CASM::ConfigIsEquivalent::ConfigIsEquivalent ( const Configuration _config,
double  _tol,
std::set< std::string > const &  _which_dofs = {"all"} 
)
inline

Construct with config to be compared against, tolerance for comparison, and (optional) list of DoFs to compare if _wich_dofs is empty, no dofs will be compared (default is "all", in which case all DoFs are compared)

Definition at line 27 of file ConfigIsEquivalent.hh.

◆ ConfigIsEquivalent() [2/2]

CASM::ConfigIsEquivalent::ConfigIsEquivalent ( const Configuration _config,
std::set< std::string > const &  _which_dofs = {"all"} 
)
inline

Definition at line 63 of file ConfigIsEquivalent.hh.

Member Function Documentation

◆ config()

const Configuration& CASM::ConfigIsEquivalent::config ( ) const
inline

Definition at line 68 of file ConfigIsEquivalent.hh.

◆ global_equivs()

std::vector<EquivPtr> const& CASM::ConfigIsEquivalent::global_equivs ( ) const
inline

Definition at line 72 of file ConfigIsEquivalent.hh.

◆ is_less()

bool CASM::ConfigIsEquivalent::is_less ( ) const
inline

Returns less than comparison.

  • Only valid after call operator returns false

Definition at line 77 of file ConfigIsEquivalent.hh.

◆ local_equivs()

std::vector<EquivPtr> const& CASM::ConfigIsEquivalent::local_equivs ( ) const
inline

Definition at line 70 of file ConfigIsEquivalent.hh.

◆ operator()() [1/5]

bool CASM::ConfigIsEquivalent::operator() ( const Configuration other) const
inline

Check if config == other, store config < other.

Definition at line 82 of file ConfigIsEquivalent.hh.

◆ operator()() [2/5]

bool CASM::ConfigIsEquivalent::operator() ( const PermuteIterator A) const
inline

Check if config == A*config, store config < A*config.

Definition at line 113 of file ConfigIsEquivalent.hh.

◆ operator()() [3/5]

bool CASM::ConfigIsEquivalent::operator() ( const PermuteIterator A,
const Configuration other 
) const
inline

Check if config == A*other, store config < A*other.

Definition at line 159 of file ConfigIsEquivalent.hh.

◆ operator()() [4/5]

bool CASM::ConfigIsEquivalent::operator() ( const PermuteIterator A,
const PermuteIterator B 
) const
inline

Check if A*config == B*config, store A*config < B*config.

Definition at line 136 of file ConfigIsEquivalent.hh.

◆ operator()() [5/5]

bool CASM::ConfigIsEquivalent::operator() ( const PermuteIterator A,
const PermuteIterator B,
const Configuration other 
) const
inline

Check if A*config == B*other, store A*config < B*other.

Definition at line 180 of file ConfigIsEquivalent.hh.

Member Data Documentation

◆ m_config

const Configuration* CASM::ConfigIsEquivalent::m_config
private

Definition at line 202 of file ConfigIsEquivalent.hh.

◆ m_global_equivs

std::vector<EquivPtr> CASM::ConfigIsEquivalent::m_global_equivs
private

Definition at line 203 of file ConfigIsEquivalent.hh.

◆ m_less

bool CASM::ConfigIsEquivalent::m_less
mutableprivate

Definition at line 205 of file ConfigIsEquivalent.hh.

◆ m_local_equivs

std::vector<EquivPtr> CASM::ConfigIsEquivalent::m_local_equivs
private

Definition at line 204 of file ConfigIsEquivalent.hh.


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