SCIP++ refs/heads/main
 
Loading...
Searching...
No Matches
var.hpp
1#pragma once
2
3// forward declare
4struct SCIP_Var;
5
6namespace scippp {
7
8// forward declare
9struct Solution;
10
17struct Var {
19 SCIP_Var* var { nullptr };
26 [[nodiscard]] double getSolVal(const Solution& solution) const;
27
34 [[nodiscard]] int getSolValAsInt(const Solution& solution) const;
35
42 [[nodiscard]] long long getSolValAsLongInt(const Solution& solution) const;
43
50 [[nodiscard]] bool isZero(const Solution& solution) const;
51
57 [[nodiscard]] bool isVoid() const;
58};
59
60}
C++ wrapper for SCIP.
Wrapper for a SCIP solution.
Definition: solution.hpp:13
Wrapper for a SCIP variable.
Definition: var.hpp:17
long long getSolValAsLongInt(const Solution &solution) const
Gets the assigned value in the solution and converts it to long long.
SCIP_Var * var
Pointer to the underlying SCIP variable.
Definition: var.hpp:19
bool isVoid() const
Checks whether an existing SCIP variable is wrapped or the wrapper is empty.
int getSolValAsInt(const Solution &solution) const
Gets the assigned value in the solution and converts it to int.
double getSolVal(const Solution &solution) const
Get the assigned value in the solution.
bool isZero(const Solution &solution) const
Checks whether the value of this variable in the primal solution is in range epsilon of 0....