Class AnyIrrepSet

Nested Relationships

Nested Types

Class Documentation

class AnyIrrepSet

Type-erased IrrepSet (of arbitrary IRREP type). A default-constructed object represents an empty set whose IRREP type is not yet known. It adopts the IRREP type of the first set it is united with. Empty sets compare equal regardless of their IRREP type.

Public Functions

AnyIrrepSet()

Creates an empty set.

template<typename Irrep>
inline AnyIrrepSet(IrrepSet<Irrep> set)
AnyIrrepSet(const AnyIrrepSet &other)
AnyIrrepSet(AnyIrrepSet &&other) noexcept
AnyIrrepSet &operator=(const AnyIrrepSet &other)
AnyIrrepSet &operator=(AnyIrrepSet &&other) noexcept
~AnyIrrepSet()
bool is_any() const

See also

IrrepSet::is_any

bool empty() const

See also

IrrepSet::empty

std::size_t size() const

See also

IrrepSet::size

AnyIrrepSet &unite(const AnyIrrepSet &other)

Turns this set into the union of itself and the given set

Throws:

Exception – if the two sets have different IRREP types

std::string to_string() const

Returns:

The string representation of this set

void for_each(const std::function<void(const AnyIrrep&)> &f) const

Calls f(const AnyIrrep&) for every IRREP explicitly contained in this set (in ascending order)

template<typename Irrep>
inline const IrrepSet<Irrep> *as() const
Returns:

A pointer to the wrapped set, if it is of type IrrepSet<Irrep>. Otherwise, nullptr.

Friends

friend bool operator==(const AnyIrrepSet &lhs, const AnyIrrepSet &rhs)