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

#include <StrucMapping.hh>

Detailed Description

Structure to encode the solution of a constrained atomic assignmnet problem This describes the permutation, translation, and time-reversal of the atoms of a child structure to bring them into registration with the atoms of a parent structure (assuming periodic boundary conditions). Also records the constrained and unconstrained assignment costs.

Definition at line 166 of file StrucMapping.hh.

Public Member Functions

 AssignmentNode (double _cost_tol=1e-6)
 
double cost_tol () const
 
bool empty () const
 True if cost matrix and assignment vector are uninitialized. More...
 
bool operator< (AssignmentNode const &other) const
 Compares time_reversal and translation for time_reversal, false is less than true for translation, elements are compared lexicographically. More...
 
std::vector< Indexpermutation () const
 Combines constrained vector HungarianNode::assignment and HungarianNode::forced_on to obtain total permutation vector. child_struc_after.site[i] after assignment is given by child_struc_before.site[result[i]] before assignment. More...
 

Public Attributes

Eigen::Vector3d translation
 Mapping translation from child to parent Defined such that translation=parent_coord.col(i)-child_coord.col(permutation[i])+displacement.col(i) (for each 'i', modulo a lattice translation) This definition assumes that 'child_coord' has been de-rotated and un-deformed according to a particular lattice mapping (as defined by a LatticeNode object) More...
 
bool time_reversal
 time_reversal relationship between child and parent More...
 
std::set< std::pair< Index, Index > > forced_on
 parent->child site assignments that have been forced on at this node for element 'el' such that forced_on.count(el)==1, 'el' denotes that child_coord.col(el.second) maps onto parent_coord.col(el.first) More...
 
std::vector< Indexirow
 'real' indices of rows in the reduced 'cost_mat' When a site assignment {i,j} is added to forced_on, row 'i' and col 'j' are removed from cost_mat An element cost_mat(k,l) in the 'cost_mat' corresponds to the original element at (irow[k],icol[l]) in the original cost_mat More...
 
std::vector< Indexicol
 'real' indices of columns in the reduced 'cost_mat' When a site assignment {i,j} is added to forced_on, row 'i' and col 'j' are removed from cost_mat An element cost_mat(k,l) in the 'cost_mat' corresponds to the original element at (irow[k],icol[l]) in the original cost_mat More...
 
std::vector< Indexassignment
 Solution of the assignment problem for the reduced 'cost_mat' An assignment {k,l} in the reduced problem occurs when assignment[k]==l In the unreduced problem, this assignment corresponds to {irow[k],icol[l]}. More...
 
Eigen::MatrixXd cost_mat
 Cost matrix for an assignment problem, which may be a reduced assignment problem if forced_on.size()>0 cost_mat(i,j) is the cost of mapping child site 'j' onto parent atom 'i'. If parent structure allows vacancies cost_mat may have more columns than child sites. These correspond to 'virtual vacancies', which have zero cost of mapping onto a parent site that allows vacancies and infinite cost of mapping onto a parent site that does not allow vacancies. In the case of a reduced assignment problem, cost_mat.cols()=icol.size() and cost_mat.rows()=irow.size() More...
 
double cost
 Total cost of best solution to the constrained assignment problem having some forced_on assignments. More...
 

Private Attributes

double m_cost_tol
 

Constructor & Destructor Documentation

◆ AssignmentNode()

CASM::xtal::AssignmentNode::AssignmentNode ( double  _cost_tol = 1e-6)
inline

Definition at line 167 of file StrucMapping.hh.

Member Function Documentation

◆ cost_tol()

double CASM::xtal::AssignmentNode::cost_tol ( ) const
inline

Definition at line 221 of file StrucMapping.hh.

◆ empty()

bool CASM::xtal::AssignmentNode::empty ( ) const
inline

True if cost matrix and assignment vector are uninitialized.

Definition at line 224 of file StrucMapping.hh.

◆ operator<()

bool CASM::xtal::AssignmentNode::operator< ( AssignmentNode const &  other) const

Compares time_reversal and translation for time_reversal, false is less than true for translation, elements are compared lexicographically.

Definition at line 323 of file StrucMapping.cc.

◆ permutation()

std::vector<Index> CASM::xtal::AssignmentNode::permutation ( ) const
inline

Combines constrained vector HungarianNode::assignment and HungarianNode::forced_on to obtain total permutation vector. child_struc_after.site[i] after assignment is given by child_struc_before.site[result[i]] before assignment.

Definition at line 235 of file StrucMapping.hh.

Member Data Documentation

◆ assignment

std::vector<Index> CASM::xtal::AssignmentNode::assignment

Solution of the assignment problem for the reduced 'cost_mat' An assignment {k,l} in the reduced problem occurs when assignment[k]==l In the unreduced problem, this assignment corresponds to {irow[k],icol[l]}.

Definition at line 204 of file StrucMapping.hh.

◆ cost

double CASM::xtal::AssignmentNode::cost

Total cost of best solution to the constrained assignment problem having some forced_on assignments.

Definition at line 219 of file StrucMapping.hh.

◆ cost_mat

Eigen::MatrixXd CASM::xtal::AssignmentNode::cost_mat

Cost matrix for an assignment problem, which may be a reduced assignment problem if forced_on.size()>0 cost_mat(i,j) is the cost of mapping child site 'j' onto parent atom 'i'. If parent structure allows vacancies cost_mat may have more columns than child sites. These correspond to 'virtual vacancies', which have zero cost of mapping onto a parent site that allows vacancies and infinite cost of mapping onto a parent site that does not allow vacancies. In the case of a reduced assignment problem, cost_mat.cols()=icol.size() and cost_mat.rows()=irow.size()

Definition at line 215 of file StrucMapping.hh.

◆ forced_on

std::set<std::pair<Index, Index> > CASM::xtal::AssignmentNode::forced_on

parent->child site assignments that have been forced on at this node for element 'el' such that forced_on.count(el)==1, 'el' denotes that child_coord.col(el.second) maps onto parent_coord.col(el.first)

Definition at line 185 of file StrucMapping.hh.

◆ icol

std::vector<Index> CASM::xtal::AssignmentNode::icol

'real' indices of columns in the reduced 'cost_mat' When a site assignment {i,j} is added to forced_on, row 'i' and col 'j' are removed from cost_mat An element cost_mat(k,l) in the 'cost_mat' corresponds to the original element at (irow[k],icol[l]) in the original cost_mat

Definition at line 199 of file StrucMapping.hh.

◆ irow

std::vector<Index> CASM::xtal::AssignmentNode::irow

'real' indices of rows in the reduced 'cost_mat' When a site assignment {i,j} is added to forced_on, row 'i' and col 'j' are removed from cost_mat An element cost_mat(k,l) in the 'cost_mat' corresponds to the original element at (irow[k],icol[l]) in the original cost_mat

Definition at line 192 of file StrucMapping.hh.

◆ m_cost_tol

double CASM::xtal::AssignmentNode::m_cost_tol
private

Definition at line 247 of file StrucMapping.hh.

◆ time_reversal

bool CASM::xtal::AssignmentNode::time_reversal

time_reversal relationship between child and parent

Definition at line 180 of file StrucMapping.hh.

◆ translation

Eigen::Vector3d CASM::xtal::AssignmentNode::translation

Mapping translation from child to parent Defined such that translation=parent_coord.col(i)-child_coord.col(permutation[i])+displacement.col(i) (for each 'i', modulo a lattice translation) This definition assumes that 'child_coord' has been de-rotated and un-deformed according to a particular lattice mapping (as defined by a LatticeNode object)

Definition at line 177 of file StrucMapping.hh.


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