14 class PsudoUniTensor {
17 std::vector<std::string> labels;
18 std::vector<cytnx_uint64> shape;
21 PsudoUniTensor *right;
29 : is_assigned(false), left(nullptr), right(nullptr), root(nullptr), cost(0), ID(0){};
30 PsudoUniTensor(
const PsudoUniTensor &rhs) {
31 this->left = rhs.left;
32 this->right = rhs.right;
33 this->root = rhs.root;
34 this->labels = rhs.labels;
35 this->shape = rhs.shape;
36 this->is_assigned = rhs.is_assigned;
37 this->cost = rhs.cost;
38 this->accu_str = rhs.accu_str;
41 PsudoUniTensor &
operator==(
const PsudoUniTensor &rhs) {
42 this->left = rhs.left;
43 this->right = rhs.right;
44 this->root = rhs.root;
45 this->labels = rhs.labels;
46 this->shape = rhs.shape;
47 this->is_assigned = rhs.is_assigned;
48 this->cost = rhs.cost;
49 this->accu_str = rhs.accu_str;
53 void from_utensor(
const UniTensor &in_uten) {
54 this->labels = in_uten.labels();
55 this->shape = in_uten.shape();
56 this->is_assigned =
true;
58 void clear_utensor() {
59 this->is_assigned =
false;
66 void set_ID(
const cytnx_int64 &ID) { this->ID = ID; }
71 std::vector<std::vector<PsudoUniTensor>> nodes_container;
73 std::vector<PsudoUniTensor> base_nodes;
76 SearchTree(
const SearchTree &rhs) {
77 this->nodes_container = rhs.nodes_container;
78 this->base_nodes = rhs.base_nodes;
80 SearchTree &
operator==(
const SearchTree &rhs) {
81 this->nodes_container = rhs.nodes_container;
82 this->base_nodes = rhs.base_nodes;
88 nodes_container.clear();
94 void reset_search_order() { nodes_container.clear(); }
Definition Accessor.hpp:12
float cytnx_float
Definition Type.hpp:44
Tensor operator==(const Tensor &Lt, const Tensor &Rt)
The comparison operator for Tensor.
uint64_t cytnx_uint64
Definition Type.hpp:45