Class QuantumNumbersAttr¶
Defined in File space.hpp
Inheritance Relationships¶
Derived Type¶
public sequant::IndexSpace::Attr(Struct IndexSpace::Attr)
Class Documentation¶
-
class QuantumNumbersAttr¶
denotes other quantum numbers (particle type, spin, etc.)
Subclassed by sequant::IndexSpace::Attr
Public Functions
-
constexpr QuantumNumbersAttr() noexcept = default¶
default ctor creates a null QuantumNumbersAttr
- Post:
static_cast<bool>(*this) == false
-
inline explicit constexpr QuantumNumbersAttr(bitset_t bitset) noexcept¶
Constructs from a bitset representation.
Warning
first (most significant) bit is reserved for internal use
- Parameters:
bitset – bitset representation of this Type
- Pre:
(bitset & make_reserved().bitset()) == null.bitset()
-
template<typename QN, typename = std::enable_if_t<meta::is_statically_castable_v<std::decay_t<QN>, bitset_t> && !std::is_same_v<std::decay_t<QN>, bool> && !std::is_same_v<std::decay_t<QN>, TypeAttr> && !std::is_same_v<std::decay_t<QN>, QuantumNumbersAttr>>>
inline constexpr QuantumNumbersAttr(QN &&value) noexcept¶
-
inline explicit constexpr operator int64_t() const¶
-
inline constexpr int32_t to_int32() const¶
-
inline explicit constexpr operator bool() const¶
- Returns:
true if this object is non-null (i.e. has any bits set)
-
inline constexpr QuantumNumbersAttr xOr(QuantumNumbersAttr other) const¶
Note
equivalent to
this->to_int32() ^ other.to_int32()- Returns:
*thisXORother
-
inline constexpr QuantumNumbersAttr unIon(QuantumNumbersAttr other) const¶
Note
equivalent to
this->to_int32() | other.to_int32()- Returns:
union of
*thisandother, i.e.*thisANDother
-
inline constexpr QuantumNumbersAttr intersection(QuantumNumbersAttr other) const¶
Note
equivalent to
this->to_int32() & other.to_int32()- Returns:
intersection of
*thisANDother
-
inline constexpr QuantumNumbersAttr operator~() const¶
Note
equivalent to
~this->to_int32()- Returns:
complement of
*this
-
inline bool includes(QuantumNumbersAttr other) const¶
- Returns:
true if
otheris included in this object
Public Static Attributes
-
static const QuantumNumbersAttr null¶
the null TypeAttr
-
static const QuantumNumbersAttr reserved = QuantumNumbersAttr::make_reserved()¶
first (most significant) bit reserved for creating default space used by Index that is distinct from the null space
Friends
-
inline friend constexpr QuantumNumbersAttr operator^(const QuantumNumbersAttr a, const QuantumNumbersAttr b)¶
- Returns:
aXORb
-
inline friend constexpr QuantumNumbersAttr operator|(const QuantumNumbersAttr a, const QuantumNumbersAttr b)¶
- Returns:
union of
aandb, i.e.aANDb
-
inline friend constexpr QuantumNumbersAttr operator&(const QuantumNumbersAttr a, const QuantumNumbersAttr b)¶
- Returns:
intersection of
aANDb
-
inline friend constexpr bool operator==(QuantumNumbersAttr lhs, QuantumNumbersAttr rhs)¶
-
inline friend constexpr bool operator!=(QuantumNumbersAttr lhs, QuantumNumbersAttr rhs)¶
-
inline friend constexpr bool operator<(QuantumNumbersAttr lhs, QuantumNumbersAttr rhs)¶
- Returns:
true if in canonical order this object preceeds
other
-
constexpr QuantumNumbersAttr() noexcept = default¶