28 std::shared_ptr<std::vector<double>> solution_ptr =
nullptr;
29 size_t solution_idx = 0;
31 std::pair<size_t, size_t> index = {0, 0};
39 explicit Variable(
const std::string &name);
40 Variable(
const std::string &name,
size_t row);
41 Variable(
const std::string &name,
size_t row,
size_t col);
43 bool operator==(
const Variable &other)
const;
45 bool isLinkedToSolver()
const;
46 bool linkToSolver(std::shared_ptr<std::vector<double>> solution_ptr,
size_t solution_idx);
47 double getSolution()
const;
48 size_t getProblemIndex()
const;
51 friend std::ostream &operator<<(std::ostream &os,
52 const Variable &variable);
53 operator Term()
const;
54 operator Scalar()
const;
57 std::shared_ptr<VariableSource> source;