Class AbstractTensor¶
Defined in File abstract_tensor.hpp
Inheritance Relationships¶
Derived Types¶
public sequant::NormalOperator< S >
(Template Class NormalOperator)public sequant::Tensor
(Class Tensor)
Class Documentation¶
-
class AbstractTensor¶
This interface class defines a Tensor concept. Object
t
of a type that meets the concept must satisfy the following:bra(t)
,ket(t)
, andbraket(t)
are valid expressions and evaluate to a range of Index objects;bra_rank(t)
andket_rank(t)
are valid expression and return sizes of thebra(t)
andket(t)
ranges, respectively;symmetry(t)
is a valid expression and evaluates to a Symmetry object that describes the symmetry of bra/ket of a particle-symmetrict
;braket_symmetry(t)
is a valid expression and evaluates to a BraKetSymmetry object that describes the bra-ket symmetry oft
;particle_symmetry(t)
is a valid expression and evaluates to a ParticleSymmetry object that describes the symmetry oft
with respect to permutations of particles;color(t)
is a valid expression and returns whether a nonnegative integer that identifies the type of a tensor; tensors with different colors can be reordered in a Product at willis_cnumber(t)
is a valid expression and returns whether t commutes with other tensor of same color (tensors of different colors are, for now, always assumed to commute)label(t)
is a valid expression and its return is convertible to a std::wstring;to_latex(t)
is a valid expression and its return is convertible to a std::wstring. To adapt an existing class intrusively derive it from AbstractTensor and implement all member functions. This allows to implememnt heterogeneous containers of objects that meet the Tensor concept.
Subclassed by sequant::NormalOperator< S >, sequant::Tensor
Public Types
Public Functions
-
virtual ~AbstractTensor() = default¶
-
inline virtual const_any_view_randsz _bra() const¶
view of a contiguous range of Index objects
-
inline virtual const_any_view_randsz _ket() const¶
view of a contiguous range of Index objects
-
inline virtual const_any_view_rand _braket() const¶
view of a not necessarily contiguous range of Index objects
-
inline virtual std::size_t _bra_rank() const¶
-
inline virtual std::size_t _ket_rank() const¶
-
inline virtual BraKetSymmetry _braket_symmetry() const¶
-
inline virtual ParticleSymmetry _particle_symmetry() const¶
-
inline virtual std::size_t _color() const¶
-
inline virtual bool _is_cnumber() const¶
See also
- Returns:
true if this is a c-number; if false,
-
inline virtual std::wstring_view _label() const¶
-
inline virtual std::wstring _to_latex() const¶
-
inline virtual bool operator<(const AbstractTensor &other) const¶
-
inline virtual void _reset_tags()¶