Class ExportExpr

Inheritance Relationships

Base Type

Class Documentation

class ExportExpr : public sequant::EvalExpr

Dedicated Node data class to be used for exporting expressions (i.e. code generation)

Public Functions

ExportExpr(const EvalExpr &other)
std::size_t id() const
Returns:

The ID of this object. IDs uniquely determine the object identity

void set_id(std::size_t id)

Sets the ID of this object.

ComputeSelection compute_selection() const
Returns:

The ComputeSelection for this object

void set_compute_selection(ComputeSelection selection)

Sets the ComputeSelection for this object.

void select_left()

Modifies the ComputeSelection to have the left subtree selected.

void deselect_left()

Modifies the ComputeSelection to have the right subtree selected.

void select_right()

Modifies the ComputeSelection to deselect the left subtree.

void deselect_right()

Modifies the ComputeSelection to deselect the right subtree.

void set_expr(ExprPtr expr)

Sets the expression stored by this object.

bool operator==(const ExportExpr &other) const
explicit EvalExpr(Tensor const &tnsr)

Construct an EvalExpr object from a tensor.

explicit EvalExpr(Constant const &c)

Construct an EvalExpr object from a Constant.

explicit EvalExpr(Variable const &v)

Construct an EvalExpr object from a Variable.

EvalExpr(EvalOp op, ResultType res, ExprPtr const &expr, index_vector ixs, std::int8_t phase, size_t hash, std::shared_ptr<bliss::Graph> connectivity)
Parameters:
  • op – Evaluation operation resulting to this object.

  • res – Evaluation result type that will be produced.

  • expr – A SeQuant expression corresponding to res.

  • ixs – Canonical indices used for annotating the result’s modes if res is tensor type. Possibly empty for non-tensor res type.

  • phase – Phase that was part of the tensor network canonicalization. Considered for reusing sub-expressions.

  • hash – A hash value that is equal for two EvalExpr objects that produce the same evaluated result modulo the phase.

  • connectivity – The graph representing the connectivity. May be null to indicate that no graph is present/necessary.