1 #ifndef CASM_OccCandidate_HH
2 #define CASM_OccCandidate_HH
13 template<
typename T>
struct jsonConstructor;
47 std::ostream &operator<<(std::ostream &sout, std::pair<const OccCandidate &, const Conversions &> value);
94 typedef std::tuple<OccCandidate, OccCandidate>
tuple_type;
97 return std::make_tuple(cand_a, cand_b);
112 std::ostream &operator<<(std::ostream &sout, std::pair<const OccSwap &, const Conversions &> value);
144 const_iterator
end()
const {
183 std::ostream &operator<<(std::ostream &sout, std::pair<const OccCandidateList &, const Conversions &> value);
std::vector< OccSwap > m_grand_canonical_swap
vector of allowed grand canonical swaps
const_iterator begin() const
Index index(Index asym, Index species_index) const
Return index into std::vector, or _candidate.size() if not allowed. ...
OccSwap(const OccCandidate &_cand_a, const OccCandidate &_cand_b)
Implements other comparisons in terms of '<'.
void _make_possible_swaps(const Conversions &convert)
Construct m_canonical_swaps, m_grand_canonical_swaps.
bool operator<(const OccSwap &B) const
const std::vector< OccSwap > & canonical_swap() const
std::vector< OccSwap > m_canonical_swap
vector of allowed canonical swaps
jsonParser & to_json(const CanonicalConditions &conditions, jsonParser &json)
Store CanonicalConditions in JSON format.
std::vector< OccCandidate > m_candidate
const_iterator end() const
std::tuple< OccCandidate, OccCandidate > tuple_type
void swap(ConfigDoF &A, ConfigDoF &B)
EigenIndex Index
For long integer indexing:
Store swap type, mutating sites, and info for keeping OccLocation up-to-date.
static ReturnType from_json(const jsonParser &json)
Default from_json is equivalent to.
bool operator<(OccCandidate B) const
List of asym / species_index pairs indicating allowed variable occupation dof.
Index m_end
Number of allowed candidates, what is returned if a candidate is not allowed.
OccCandidate(Index _asym, Index _species_index)
bool _lt(const OccSwap &B) const
Helper struct for constructing objects that need additional data.
const OccCandidate & operator[](Index candidate_index) const
Index index(const OccCandidate &cand) const
Return index into std::vector, or _candidate.size() if not allowed. ...
std::vector< std::vector< Index > > m_species_to_cand_index
m_converter[asym][species_index] -> candidate_index
const std::vector< OccSwap > & grand_canonical_swap() const
std::vector< OccCandidate >::const_iterator const_iterator