Minotaur 0.4.1
Docs for developers
Public Member Functions | Protected Attributes | List of all members
Minotaur::LinearCut Class Reference

#include <LinearCut.h>

Inheritance diagram for Minotaur::LinearCut:
Inheritance graph
[legend]
Collaboration diagram for Minotaur::LinearCut:
Collaboration graph
[legend]

Public Member Functions

 LinearCut ()
 Default Constructor.
 
 LinearCut (LinearFunctionPtr lf, double lb, double ub)
 Construct a cut of the form: $ax \leq b $.
 
 ~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.
 
- Public Member Functions inherited from Minotaur::Cut
 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.
 
CutInfogetInfo ()
 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.
 
- Protected Attributes inherited from Minotaur::Cut
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

- Protected Member Functions inherited from Minotaur::Cut
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.
 

Detailed Description

A linear cut is a valid inequality of the form $ l \leq ax \leq u $, where $a \in \mathcal{R}^n, l \in \mathcal{R}, u \in \mathcal{R}$.


The documentation for this class was generated from the following files:

Minotaur source code documented by Doxygen 1.9.4 on Thu Apr 24 2025