Template Class EvalScalar

Inheritance Relationships

Base Type

Class Documentation

template<typename T>
class EvalScalar : public sequant::EvalResult

EvalResult for a constant or a variable value.

Template Parameters:

T – numeric type of the constant value (eg. double, complex<double>, etc.)

Public Types

using id_t = size_t

Public Functions

inline explicit EvalScalar(T v) noexcept
inline T value() const noexcept
inline virtual ERPtr sum(EvalResult const &other, std::array<std::any, 3> const&) const override

Sum other EvalResult object with this object.

Note

In std::array<std::any, 3> is expected to be [l,r,res] where the elements are the annotations for left, right and result respectively.

inline virtual ERPtr prod(EvalResult const &other, std::array<std::any, 3> const &maybe_empty, TA::DeNest DeNestFlag) const override

Perform product binary operation with this object and other.

Note

In std::array<std::any, 3> is expected to be [l,r,res] where the elements are the annotations for left, right and result respectively.

inline virtual ERPtr permute(std::array<std::any, 2> const&) const override

Permute this object according to the annotations in the argument.

Note

In std::array<std::any, 2> is expected to be [pre,post] where the elements are the annotations for the eval result before permutation and after permutation respectively.

inline virtual void add_inplace(EvalResult const &other) override

Add other EvalResult object into this object.

inline virtual ERPtr symmetrize(container::svector<std::array<size_t, 3>> const&) const override

Particle symmetrize this eval result according to the list of index groups.

Note

vector<array<size_t,3>> represents list of particle symmetry index groups. array<size_t, 3> is expected to be [b1, b2, len] where b1, and b2 are the zero-based positions of the tensor indices. [b1, b1+len) and [b2, b2+len) are two ranges that will be permuted simultaneously and at the equivalent positions.

inline virtual ERPtr antisymmetrize(container::svector<std::array<size_t, 3>> const&) const override

Particle antisymmetrize this eval result according to the list of index groups.

Note

vector<array<size_t,3>> represents list of antisymmetric index groups. array<size_t,3> is expected to be [b1,b2,len] where b1, and b2 are the zero-based positions of the tensor indices. [b1, b1+len) and [b2, b2+len) are two ranges that will be permuted by keeping track of the parity (even/odd)-ness of the total permutation.