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

#include <ConfigDoFCompare.hh>

Detailed Description

Wrapper class for generic less than comparison of ConfigDoF.

  • Wraps a functor derived from ConfigDoFIsEquivalentBase that is specialized for comparison of a particular type of DoF

Definition at line 18 of file ConfigDoFCompare.hh.

Public Member Functions

template<typename ConfigDoFIsEquivalentType >
 ConfigDoFCompare (std::unique_ptr< ConfigDoFIsEquivalentType > f)
 Construct a ConfigDoFCompare object for a particular DoF type. More...
 
bool operator() (const Configuration &other) const
 Return config < other. More...
 
bool operator() (const ConfigDoF &other) const
 Return config < other. More...
 
bool operator() (const PermuteIterator &A) const
 Return config < A*config. More...
 
bool operator() (const PermuteIterator &A, const PermuteIterator &B) const
 Return A*config < B*config. More...
 
bool operator() (const PermuteIterator &A, const Configuration &other) const
 Return config < A*other. More...
 
bool operator() (const PermuteIterator &A, const ConfigDoF &other) const
 Return config < A*other. More...
 
bool operator() (const PermuteIterator &A, const PermuteIterator &B, const Configuration &other) const
 Return A*config < B*other. More...
 
bool operator() (const PermuteIterator &A, const PermuteIterator &B, const ConfigDoF &other) const
 Return A*config < B*other. More...
 

Private Attributes

notstd::cloneable_ptr< ConfigDoFIsEquivalent::Basem_f
 

Related Functions

(Note that these are not member functions.)

template<typename ConfigDoFIsEquivalentType , typename... Args>
ConfigDoFCompare make_dof_compare (Args &&... args)
 

Constructor & Destructor Documentation

◆ ConfigDoFCompare()

template<typename ConfigDoFIsEquivalentType >
CASM::ConfigDoFCompare::ConfigDoFCompare ( std::unique_ptr< ConfigDoFIsEquivalentType >  f)
inline

Construct a ConfigDoFCompare object for a particular DoF type.

Easiest construction is probably using 'make_dof_compare'.

Example:

ConfigDoFCompare strain_compare =
make_dof_compare<ConfigDoFIsEquivalent::Strain>(my_configdof or
my_config); ConfigDoFCompare occ_compare =
make_dof_compare<ConfigDoFIsEquivalent::Occupation>(my_configdof or
my_config); ConfigDoFCompare disp_compare =
make_dof_compare<ConfigDoFIsEquivalent::Displacement>(my_configdof or
my_config);
ConfigDoFCompare(std::unique_ptr< ConfigDoFIsEquivalentType > f)
Construct a ConfigDoFCompare object for a particular DoF type.

Definition at line 34 of file ConfigDoFCompare.hh.

Member Function Documentation

◆ operator()() [1/8]

bool CASM::ConfigDoFCompare::operator() ( const ConfigDoF other) const
inline

Return config < other.

Definition at line 42 of file ConfigDoFCompare.hh.

◆ operator()() [2/8]

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

Return config < other.

Definition at line 37 of file ConfigDoFCompare.hh.

◆ operator()() [3/8]

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

Return config < A*config.

Definition at line 50 of file ConfigDoFCompare.hh.

◆ operator()() [4/8]

bool CASM::ConfigDoFCompare::operator() ( const PermuteIterator A,
const ConfigDoF other 
) const
inline

Return config < A*other.

Definition at line 74 of file ConfigDoFCompare.hh.

◆ operator()() [5/8]

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

Return config < A*other.

Definition at line 66 of file ConfigDoFCompare.hh.

◆ operator()() [6/8]

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

Return A*config < B*config.

Definition at line 58 of file ConfigDoFCompare.hh.

◆ operator()() [7/8]

bool CASM::ConfigDoFCompare::operator() ( const PermuteIterator A,
const PermuteIterator B,
const ConfigDoF other 
) const
inline

Return A*config < B*other.

Definition at line 91 of file ConfigDoFCompare.hh.

◆ operator()() [8/8]

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

Return A*config < B*other.

Definition at line 82 of file ConfigDoFCompare.hh.

Friends And Related Function Documentation

◆ make_dof_compare()

template<typename ConfigDoFIsEquivalentType , typename... Args>
ConfigDoFCompare make_dof_compare ( Args &&...  args)
related

Factory function to make ConfigDoFCompare

Definition at line 107 of file ConfigDoFCompare.hh.

Member Data Documentation

◆ m_f

notstd::cloneable_ptr<ConfigDoFIsEquivalent::Base> CASM::ConfigDoFCompare::m_f
private

Definition at line 100 of file ConfigDoFCompare.hh.


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