-
Notifications
You must be signed in to change notification settings - Fork 553
Expand file tree
/
Copy pathparam.h
More file actions
52 lines (35 loc) · 945 Bytes
/
param.h
File metadata and controls
52 lines (35 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef SOLVESPACE_PARAM_H
#define SOLVESPACE_PARAM_H
#include <cstdint>
#include <unordered_set>
#include "handle.h"
namespace SolveSpace {
class hRequest;
class hParam {
public:
// bits 15: 0 -- param index
// 31:16 -- request index
uint32_t v;
inline hRequest request() const;
};
template<>
struct IsHandleOracle<hParam> : std::true_type {};
class Param {
public:
int tag;
hParam h;
double val;
bool known;
bool free;
// Used only in the solver
Param *substd;
static const hParam NO_PARAM;
void Clear() {}
};
// Use a forward declaration in order to avoid pulling dsc.h in for units that
// don't need to use `ParamList`
template<class T, class H> class IdList;
using ParamList = IdList<Param, hParam>;
using ParamSet = std::unordered_set<hParam, HandleHasher<hParam>>;
} // namespace SolveSpace
#endif // !SOLVESPACE_PARAM_H