CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <StrucMapping.hh>
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< Index > | permutation () 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< Index > | 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 More... | |
std::vector< Index > | 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 More... | |
std::vector< Index > | 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]}. 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 |
|
inline |
Definition at line 167 of file StrucMapping.hh.
|
inline |
Definition at line 221 of file StrucMapping.hh.
|
inline |
True if cost matrix and assignment vector are uninitialized.
Definition at line 224 of file StrucMapping.hh.
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.
|
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.
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.
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.
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.
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.
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.
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.
|
private |
Definition at line 247 of file StrucMapping.hh.
bool CASM::xtal::AssignmentNode::time_reversal |
time_reversal relationship between child and parent
Definition at line 180 of file StrucMapping.hh.
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.