CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::EigenSymCompare< _Base > Class Template Reference

#include <VectorSymCompare.hh>

+ Inheritance diagram for CASM::EigenSymCompare< _Base >:

Detailed Description

template<typename _Base>
class CASM::EigenSymCompare< _Base >

CRTP Base class for Vector comparisons.

Implements:

  • 'invariants_compare_impl' using 'compare'
  • 'compare_impl'
  • 'canonical_transform_impl'

Does not implement

  • 'representation_prepare_impl'
  • 'copy_apply_impl'

traits<Element> requires:

  • typedef <ElementInvariants> InvariantsType;

The VectorSymCompare hierarchy:

Definition at line 82 of file VectorSymCompare.hh.

Public Types

using Base = _Base
 Element refers to Vector, not element of Vector. More...
 
using MostDerived = typename Base::MostDerived
 
using Element = typename traits< MostDerived >::Element
 
using SymApply = typename traits< MostDerived >::SymApply
 

Public Member Functions

double tol () const
 Return tolerance. More...
 

Protected Member Functions

template<typename... Args>
 EigenSymCompare (double tol, Args &&... args)
 Constructor. More...
 
InvariantsType make_invariants_impl (Element const &obj) const
 Make orbit invariants from one element in the orbit. More...
 
bool invariants_compare_impl (InvariantsType const &A_invariants, InvariantsType const &B_invariants) const
 Orders 'prepared' elements in the same orbit. More...
 
bool compare_impl (const Element &A, const Element &B) const
 Compares 'prepared' elements. More...
 
std::unique_ptr< SymOpRepresentationcanonical_transform_impl (Element const &obj) const
 Returns transformation that takes 'obj' to its prepared (canonical) form. More...
 
Element copy_apply_impl (SymOp const &op, Element obj) const
 
Element spatial_prepare_impl (Element obj) const
 Spatial prepare does not apply – element is returned unchanged. More...
 
SymOp const & spatial_transform_impl () const
 Spatial prepare does not apply – transform is always identity. More...
 

Protected Attributes

friend _Base
 

Private Attributes

double m_tol
 
SymApply m_apply
 
SymOp m_spatial_transform
 

Member Typedef Documentation

◆ Base

template<typename _Base >
using CASM::EigenSymCompare< _Base >::Base = _Base

Element refers to Vector, not element of Vector.

Definition at line 92 of file VectorSymCompare.hh.

◆ Element

template<typename _Base >
using CASM::EigenSymCompare< _Base >::Element = typename traits<MostDerived>::Element

Definition at line 94 of file VectorSymCompare.hh.

◆ MostDerived

template<typename _Base >
using CASM::EigenSymCompare< _Base >::MostDerived = typename Base::MostDerived

Definition at line 93 of file VectorSymCompare.hh.

◆ SymApply

template<typename _Base >
using CASM::EigenSymCompare< _Base >::SymApply = typename traits<MostDerived>::SymApply

Definition at line 95 of file VectorSymCompare.hh.

Constructor & Destructor Documentation

◆ EigenSymCompare()

template<typename _Base >
template<typename... Args>
CASM::EigenSymCompare< _Base >::EigenSymCompare ( double  tol,
Args &&...  args 
)
inlineprotected

Constructor.

Parameters
tolTolerance for invariants_compare of site-to-site distances

Definition at line 110 of file VectorSymCompare.hh.

Member Function Documentation

◆ canonical_transform_impl()

template<typename Base >
std::unique_ptr< SymOpRepresentation > CASM::EigenSymCompare< Base >::canonical_transform_impl ( Element const &  obj) const
protected

Returns transformation that takes 'obj' to its prepared (canonical) form.

  • For now returns pointer to SymPermutation object that encodes permutation due to sorting elements

Definition at line 104 of file VectorSymCompare_impl.hh.

◆ compare_impl()

template<typename Base >
bool CASM::EigenSymCompare< Base >::compare_impl ( const Element A,
const Element B 
) const
protected

Compares 'prepared' elements.

  • Returns 'true' to indicate B < A
  • Equivalence is indicated by
    !compare(A,B) && !compare(B,A)
    bool compare(ClusterInvariants const &A, ClusterInvariants const &B, double tol)
    Compare ClusterInvariants.
  • Assumes elements are 'prepared' before being compared

Definition at line 75 of file VectorSymCompare_impl.hh.

◆ copy_apply_impl()

template<typename _Base >
Element CASM::EigenSymCompare< _Base >::copy_apply_impl ( SymOp const &  op,
Element  obj 
) const
inlineprotected

Definition at line 129 of file VectorSymCompare.hh.

◆ invariants_compare_impl()

template<typename Base >
bool CASM::EigenSymCompare< Base >::invariants_compare_impl ( InvariantsType const &  A_invariants,
InvariantsType const &  B_invariants 
) const
protected

Orders 'prepared' elements in the same orbit.

  • Returns 'true' to indicate A < B
  • Equivalence is indicated by
    !compare(A,B) && !compare(B,A)
  • Assumes elements are 'prepared' before being compared Implementation:
  • First compares by number of sites in cluster
  • Then compare all displacements, from longest to shortest

Definition at line 63 of file VectorSymCompare_impl.hh.

◆ make_invariants_impl()

template<typename Base >
EigenSymCompare< Base >::InvariantsType CASM::EigenSymCompare< Base >::make_invariants_impl ( Element const &  obj) const
protected

Make orbit invariants from one element in the orbit.

Definition at line 50 of file VectorSymCompare_impl.hh.

◆ spatial_prepare_impl()

template<typename Base >
EigenSymCompare< Base >::Element CASM::EigenSymCompare< Base >::spatial_prepare_impl ( Element  obj) const
protected

Spatial prepare does not apply – element is returned unchanged.

Definition at line 87 of file VectorSymCompare_impl.hh.

◆ spatial_transform_impl()

template<typename Base >
SymOp const & CASM::EigenSymCompare< Base >::spatial_transform_impl
protected

Spatial prepare does not apply – transform is always identity.

Spatial prepare does not apply – always identity.

Definition at line 93 of file VectorSymCompare_impl.hh.

◆ tol()

template<typename Base >
double CASM::EigenSymCompare< Base >::tol

Return tolerance.

Definition at line 43 of file VectorSymCompare_impl.hh.

Member Data Documentation

◆ _Base

template<typename _Base >
friend CASM::EigenSymCompare< _Base >::_Base
protected

Definition at line 103 of file VectorSymCompare.hh.

◆ m_apply

template<typename _Base >
SymApply CASM::EigenSymCompare< _Base >::m_apply
private

Definition at line 142 of file VectorSymCompare.hh.

◆ m_spatial_transform

template<typename _Base >
SymOp CASM::EigenSymCompare< _Base >::m_spatial_transform
private

Not applicable to VectorSymCompare – always identity

  • Default SymOp constructor initializes to identity

Definition at line 146 of file VectorSymCompare.hh.

◆ m_tol

template<typename _Base >
double CASM::EigenSymCompare< _Base >::m_tol
private

Definition at line 140 of file VectorSymCompare.hh.


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