SCIP++ refs/heads/main
 
Loading...
Searching...
No Matches
scippp::Var Struct Reference

Wrapper for a SCIP variable. More...

#include <var.hpp>

Public Member Functions

double getSolVal (const Solution &solution) const
 Get the assigned value in the solution.
 
int getSolValAsInt (const Solution &solution) const
 Gets the assigned value in the solution and converts it to int.
 
long long getSolValAsLongInt (const Solution &solution) const
 Gets the assigned value in the solution and converts it to long long.
 
bool isVoid () const
 Checks whether an existing SCIP variable is wrapped or the wrapper is empty.
 
bool isZero (const Solution &solution) const
 Checks whether the value of this variable in the primal solution is in range epsilon of 0.0.
 

Public Attributes

SCIP_Var * var { nullptr }
 Pointer to the underlying SCIP variable.
 

Detailed Description

Wrapper for a SCIP variable.

It does not own the memory. Memory management is done by the Model.

Since
1.0.0

Definition at line 17 of file var.hpp.

Member Function Documentation

◆ getSolVal()

double scippp::Var::getSolVal ( const Solution solution) const

Get the assigned value in the solution.

Since
1.0.0
Parameters
solutionPrimal CIP solution.
Returns
value of this variable in primal CIP solution.

◆ getSolValAsInt()

int scippp::Var::getSolValAsInt ( const Solution solution) const

Gets the assigned value in the solution and converts it to int.

Since
1.1.0
Parameters
solutionPrimal CIP solution.
Returns
value of this variable in primal CIP solution as integer.

◆ getSolValAsLongInt()

long long scippp::Var::getSolValAsLongInt ( const Solution solution) const

Gets the assigned value in the solution and converts it to long long.

Since
1.1.0
Parameters
solutionPrimal CIP solution.
Returns
value of this variable in primal CIP solution as long integer.

◆ isVoid()

bool scippp::Var::isVoid ( ) const

Checks whether an existing SCIP variable is wrapped or the wrapper is empty.

Since
1.2.0
Returns
true iff the wrapper is empty

◆ isZero()

bool scippp::Var::isZero ( const Solution solution) const

Checks whether the value of this variable in the primal solution is in range epsilon of 0.0.

Since
1.1.0
Parameters
solutionPrimal CIP solution.
Returns
true iff the value of this variable in the primal solution is in range epsilon of 0.0.

Member Data Documentation

◆ var

SCIP_Var* scippp::Var::var { nullptr }

Pointer to the underlying SCIP variable.

Definition at line 19 of file var.hpp.


The documentation for this struct was generated from the following file: