idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
TempQCtr.h
1//
2// Created by henri on 19.11.24.
3//
4
5#ifndef IDOL_TEMPQCTR_H
6#define IDOL_TEMPQCTR_H
7
8#include "idol/mixed-integer/modeling/expressions/QuadExpr.h"
9
10namespace idol {
11 class TempQCtr;
12}
13
15 QuadExpr<Var> m_expr;
16 CtrType m_type = LessOrEqual;
17public:
18 TempQCtr() = default;
19
20 TempQCtr(QuadExpr<Var>&& t_expr, CtrType t_type) : m_expr(std::move(t_expr)), m_type(t_type) {}
21
22 TempQCtr(const TempQCtr& t_src) = default;
23
24 TempQCtr(TempQCtr&&) noexcept = default;
25
26 TempQCtr& operator=(const TempQCtr& t_rhs) = default;
27
28 TempQCtr& operator=(TempQCtr&&) noexcept = default;
29
30 QuadExpr<Var>& expr() { return m_expr; }
31
32 [[nodiscard]] const QuadExpr<Var>& expr() const { return m_expr; }
33
34 [[nodiscard]] CtrType type() const { return m_type; }
35
36 void set_expr(QuadExpr<Var>&& t_expr) { m_expr = std::move(t_expr); }
37
38 void set_type(CtrType t_type) { m_type = t_type; }
39
40};
41
42namespace idol {
43 std::ostream &operator<<(std::ostream &t_os, const TempQCtr &t_temp_ctr);
44}
45
46#endif //IDOL_TEMPQCTR_H