Class Variable

Inheritance Relationships

Base Types

Class Documentation

class Variable : public sequant::Expr, public sequant::Labeled

This is represented as a “run-time” complex rational number.

Public Functions

Variable() = delete
virtual ~Variable() = default
Variable(const Variable&) = default
Variable(Variable&&) = default
Variable &operator=(const Variable&) = default
Variable &operator=(Variable&&) = default
template<typename U, typename = std::enable_if_t<!is_variable_v<U>>>
inline explicit Variable(U &&label)
inline Variable(std::wstring label)
virtual std::wstring_view label() const override

Warning

conjugation does not change it

Returns:

variable label

void conjugate()

complex-conjugates this

bool conjugated() const
Returns:

whether this object has been conjugated

virtual std::wstring to_latex() const override
Returns:

the string representation of this in the LaTeX format

inline virtual type_id_type type_id() const override

Computes and returns the derived type identifier

Note

this function must be overridden in the derived class

Returns:

the hash value for this Expr

virtual ExprPtr clone() const override

Note

- must be overridden in the derived class.

  • the default implementation throws an exception

Returns:

a clone of this object, i.e. an object that is equal to this

virtual void adjoint() override

adjoint of a Variable is its complex conjugate