Minotaur 0.4.1
Docs for developers
|
#include <LinearCut.h>
Public Member Functions | |
LinearCut () | |
Default Constructor. | |
LinearCut (LinearFunctionPtr lf, double lb, double ub) | |
Construct a cut of the form: ![]() | |
~LinearCut () | |
Destroy. | |
double | getViolation (const double *) |
By how much does a given point x violate this cut. | |
double | getUb () |
Get ub of the inequality. | |
double | getLb () |
Get lb of the inequality. | |
void | applyToProblem (ProblemPtr) |
Add this cut to problem. | |
void | undoToProblem (ProblemPtr) |
Remove this cut from the problem. | |
void | write (std::ostream &out) const |
Write this cut to the outstream. | |
![]() | |
Cut () | |
Empty Constructor. | |
Cut (size_t n, FunctionPtr f, double lb, double ub, bool never_delete, bool never_disable) | |
Default constructor. More... | |
Cut (ProblemPtr p, FunctionPtr f, double lb, double ub, bool never_delete, bool never_disable) | |
~Cut () | |
Destroy. | |
void | applyToProblem (ProblemPtr p) |
Add a cut to the problem. More... | |
double | eval (const double *x, int *err) |
Evaluate the activity of this cut at a given point. More... | |
void | evalScore (const double *x, double *vio, double *score) |
Evaluate score of this cut at a given point. More... | |
ConstraintPtr | getConstraint () |
Get Constraint pointer if this cut is in the problem. Null otherwise. | |
FunctionPtr | getFunction () |
Get Function Pointer of the cut. | |
CutInfo * | getInfo () |
Get pointer to the cut info data structure. | |
double | getLb () |
Get lb of the inequality. | |
std::string | getName () |
Get name of the cut. | |
double | getUb () |
Get ub of the inequality. | |
void | setCons (ConstraintPtr c) |
Constraint associated with the cut. | |
void | setName_ (std::string name) |
Set name of the cut. | |
void | write (std::ostream &out) const |
Display. | |
void | writeStats (std::ostream &out) const |
Display statistics and information. | |
Protected Attributes | |
ConstraintPtr | cons_ |
Pointer to the constraint that is added to the problem. | |
FunctionPtr | f_ |
Function or the lhs. | |
double | lb_ |
lb. | |
LinearFunctionPtr | lf_ |
Linear function or the lhs. | |
double | ub_ |
ub. | |
![]() | |
ConstraintPtr | cons_ |
Pointer to the constraint. Null if it is disabled. | |
FunctionPtr | f_ |
Pointer to the function of a cut. | |
CutInfo | info_ |
Information about the cut. | |
double | lb_ |
Lower bound. | |
LoggerPtr | logger_ |
Logger for display. | |
size_t | n_ |
Number of variables in the problem. Used to calculate hash. | |
double | ub_ |
Upper bound. | |
double | fixedScore_ |
Fixed score of each cut. | |
std::string | name_ |
Name of the cut (could be NULL). | |
Additional Inherited Members | |
![]() | |
void | initInfo_ (bool never_delete, bool never_disable) |
Initialize the values in info_ data structure. More... | |
void | evalFixedScore_ () |
Assign a fixed score to the cut. | |
A linear cut is a valid inequality of the form , where
.