idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
QCtr.h
1//
2// Created by henri on 19.11.24.
3//
4
5#ifndef IDOL_QCTR_H
6#define IDOL_QCTR_H
7
8#include "idol/mixed-integer/modeling/objects/Object.h"
9#include "idol/mixed-integer/modeling/Types.h"
10
11namespace idol {
12 class QCtrVersion;
13 class QCtr;
14 class TempQCtr;
15
16 namespace impl {
17 class Env;
18 }
19
20}
21
22class idol::QCtr : public Object<QCtrVersion, QCtr> {
23 friend class impl::Env;
24public:
25 QCtr(Env& t_env, TempQCtr&& t_temp_ctr, std::string t_name = "");
26
27 QCtr(Env& t_env, const TempQCtr& t_temp_ctr, std::string t_name = "");
28
29 QCtr(Env& t_env, CtrType t_type, std::string t_name = "");
30
31 template<unsigned int N = 1, unsigned int I = 0>
32 static Vector<Ctr, N - I> make_vector(Env& t_env, const Dim<N>& t_dim, CtrType t_type, const std::string& t_name = "") {
33 return idol::impl::create_many<Ctr, N, I>(t_dim, t_name, [&](const std::string& t_name_i) {
34 return QCtr(t_env, t_type, t_name_i);
35 });
36 }
37
38 unsigned int index(const Model& t_model) const;
39};
40
41#endif //IDOL_QCTR_H