Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Stores temporaries used to build or manipulate a CutData. More...
#include <cuts.h>
Public Member Functions | |
void | ClearIndices () |
void | AddOrMergeTerm (const CutTerm &term, IntegerValue t, CutData *cut) |
void | ClearNumMerges () |
int | NumMergesSinceLastClear () const |
bool | ConvertToLinearConstraint (const CutData &cut, LinearConstraint *output) |
Returns false if we encounter an integer overflow. | |
void operations_research::sat::CutDataBuilder::AddOrMergeTerm | ( | const CutTerm & | term, |
IntegerValue | t, | ||
CutData * | cut ) |
If the referred var is not right, replace the entry.
If the sign is not right, look into secondary hash_map for opposite sign.
If the referred var is not right, replace the entry.
If the sign is not right, replace the entry.
We can only merge the term if term.coeff + old_coeff do not overflow and if t * new_coeff do not overflow.
If we cannot merge the term, we will keep them separate. The produced cut will be less strong, but can still be used.
If we cannot merge the term, we keep them separate.
void operations_research::sat::CutDataBuilder::ClearIndices | ( | ) |
|
inline |
bool operations_research::sat::CutDataBuilder::ConvertToLinearConstraint | ( | const CutData & | cut, |
LinearConstraint * | output ) |
|
inline |