1 #ifndef LINEARINDEXCONVERTER_HH
2 #define LINEARINDEXCONVERTER_HH
4 #include <unordered_map>
34 int basis_sites_in_prim)
36 impl::OrderedLatticePointGenerator(transformation_matrix),
37 basis_sites_in_prim)),
84 mutable std::unordered_map<UnitCellCoord, Index>
112 int basis_sites_in_prim);
172 template <
typename IntegralCoordinateType>
185 template <
typename IntegralCoordinateType>
const UnitCell & unitcell() const
UnitCellCoord bring_within(const UnitCellCoord &bijk) const
UnitCellCoordIndexConverter(const matrix_type &transformation_matrix, int basis_sites_in_prim)
int m_basis_sites_in_prim
std::vector< UnitCellCoord > m_linear_index_to_bijk
Convert from linear index to UnitCellCoord.
void never_bring_within()
void _throw_if_incompatible_index(Index ix) const
Throws exception if the specified index is out of the allowed range.
impl::OrderedLatticePointGenerator::matrix_type matrix_type
static void _throw_if_bad_basis_sites_in_prim(int basis_sites_in_prim)
void _throw_if_incompatible_bijk(const UnitCellCoord &bijk) const
void always_bring_within()
std::unordered_map< UnitCellCoord, Index > m_bijk_to_linear_index
Convert from UnitCellCoord to linear index.
std::unordered_map< UnitCellCoord, Index > m_bijk_to_linear_index_outside_of_superlattice
static std::vector< UnitCellCoord > _make_all_ordered_bijk_values(const impl::OrderedLatticePointGenerator &make_point, int basis_sites_in_prim)
Index total_sites() const
Returns the total number of sites within the superlattice.
const UnitCellCoord & operator()(Index ix) const
Given the linear index, retreive the corresponding UnitCellCoord.
bool m_automatically_bring_bijk_within
IntegralCoordinateWithin_f m_bring_within_f
Functor to bring UnitCellCoord values back into the superlattice.
UnitCell bring_within(const UnitCell &ijk) const
Bring the given UnitCell into the superlattice using lattice translations.
UnitCellIndexConverter(const matrix_type &transformation_matrix)
UnitCellCoordIndexConverter::matrix_type matrix_type
const UnitCell & operator()(Index ix) const
Given the linear index, retreive the corresponding UnitCell.
Index operator()(const UnitCell &ijk) const
IntegralCoordinateWithin_f::matrix_type matrix_type
typename _LinearIndexConverter< IntegralCoordinateType >::type LinearIndexConverter
INDEX_TYPE Index
For long integer indexing:
UnitCellIndexConverter type
UnitCellCoordIndexConverter type