Struct IndexSpace::Attr

Nested Relationships

This struct is a nested type of Class IndexSpace.

Inheritance Relationships

Base Types

Struct Documentation

struct Attr : public sequant::TypeAttr, public sequant::QuantumNumbersAttr

Attr describes all attributes of a space (occupancy + quantum numbers)

Public Functions

inline Attr(TypeAttr type, QuantumNumbersAttr qns) noexcept
inline Attr(int32_t type, int32_t qns) noexcept
Attr() = default

default ctor creates a null Attr

Post:

static_cast<bool>(*this) == false

Attr(const Attr&) = default
Attr(Attr&&) = default
Attr &operator=(const Attr&) = default
Attr &operator=(Attr&&) = default
inline constexpr const TypeAttr &type() const
inline constexpr TypeAttr &type()
inline constexpr const QuantumNumbersAttr &qns() const
inline constexpr QuantumNumbersAttr &qns()
inline explicit constexpr operator int64_t() const
inline explicit operator bool() const
Returns:

true if either type() or qns() is non-null

inline Attr unIon(Attr other) const

union of Attr = union of TypeAttr and union of QuantumNumbersAttr

Returns:

union of *this and other, i.e. *this AND other

inline Attr intersection(Attr other) const

intersection of Attr = intersection of TypeAttr and intersection of QuantumNumbersAttr

Returns:

intersection of *this AND other

inline bool includes(Attr other) const
Returns:

true if other is included in this object

inline constexpr bool operator==(Attr other) const
inline constexpr bool operator!=(Attr other) const
inline constexpr bool operator<(Attr other) const

Attr objects are ordered by quantum numbers, then by type.

Public Static Attributes

static const Attr null

Friends

inline friend Attr operator|(Attr a, Attr b)

See also

Attr::unIon

Returns:

union of a and b

inline friend Attr operator&(Attr a, Attr b)

Returns:

intersection of a and b