Class IndexSpace¶
Defined in File space.hpp
Nested Relationships¶
Nested Types¶
Class Documentation¶
-
class IndexSpace¶
a collection of attributes which define a space of (1-particle) states
IndexSpace has a base_label, TypeAttr or interpretable bitset in the context of other spaces. IndexSpace may also have QuantumNumberAttr which differentiate spaces with different quanta, such as spin projection quantum numbers. IndexSpace may additionally have an approximate extent which is useful in symbolic manipulation of indexed expressions, such as tensor network evaluation.
Public Functions
-
inline QuantumNumbers qns() const noexcept¶
-
inline IndexSpace() noexcept¶
Default ctor creates null space (with null label, type and quantum numbers)
-
inline explicit operator bool() const¶
-
template<typename S, typename = meta::EnableIfAllBasicStringConvertible<S>>
inline IndexSpace(S &&type_label, TypeAttr typeattr, QuantumNumbersAttr qnattr = QuantumNumbersAttr{0}, unsigned long approximate_size = 10)¶
-
IndexSpace(const IndexSpace &other) = default¶
-
IndexSpace(IndexSpace &&other) = default¶
-
IndexSpace &operator=(const IndexSpace &other) = default¶
-
IndexSpace &operator=(IndexSpace &&other) = default¶
-
inline const std::wstring &base_key() const¶
-
inline std::size_t approximate_size() const¶
- Returns:
approximate size of a space
-
inline void approximate_size(size_t n)¶
Set the approximate size of a space.
Public Static Functions
-
static inline std::wstring_view reduce_key(std::wstring_view key)¶
-
static inline std::wstring reduce_key(std::string_view key)¶
Public Static Attributes
-
static const IndexSpace null¶
Friends
-
friend constexpr bool operator==(IndexSpace const&, IndexSpace const&) noexcept¶
IndexSpace are equal if they have equal
IndexSpace::type()
,IndexSpace::qns()
, andIndexSpace::base_key()
.
-
friend constexpr bool operator!=(IndexSpace const&, IndexSpace const&) noexcept¶
IndexSpace are equal if they have equal
IndexSpace::type()
,IndexSpace::qns()
, andIndexSpace::base_key()
.
-
friend constexpr bool operator<(IndexSpace const&, IndexSpace const&) noexcept¶
IndexSpace are ordered by their attributes (i.e. labels do not matter one bit)
-
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¶
-
inline constexpr const QuantumNumbersAttr &qns() const¶
-
inline constexpr QuantumNumbersAttr &qns()¶
-
inline explicit constexpr operator int64_t() const¶
-
inline Attr unIon(Attr other) const¶
union of Attr = union of TypeAttr and union of QuantumNumbersAttr
- Returns:
union of
*this
andother
, i.e.*this
ANDother
-
inline Attr(TypeAttr type, QuantumNumbersAttr qns) noexcept¶
-
struct bad_key : public std::invalid_argument¶
exception type thrown when ancountered unknown/invalid IndexSpace::base_key() or Index::label()
Public Functions
-
inline bad_key()¶
-
template<typename S, typename = meta::EnableIfAllBasicStringConvertible<S>>
inline bad_key(S &&key)¶
-
inline bad_key()¶
-
struct KeyCompare¶
Public Types
-
using is_transparent = void¶
Public Functions
-
inline bool operator()(const IndexSpace &a, const IndexSpace &b) const¶
-
inline bool operator()(const std::wstring &a, const IndexSpace &b) const¶
-
inline bool operator()(const std::wstring_view &a, const IndexSpace &b) const¶
-
inline bool operator()(const IndexSpace &a, const std::wstring &b) const¶
-
inline bool operator()(const IndexSpace &a, const std::wstring_view &b) const¶
-
inline bool operator()(const std::wstring &a, const std::wstring &b) const¶
-
inline bool operator()(const std::wstring &a, const std::wstring_view &b) const¶
-
inline bool operator()(const std::wstring_view &a, const std::wstring &b) const¶
-
using is_transparent = void¶
-
inline QuantumNumbers qns() const noexcept¶