Minotaur 0.4.1
Docs for developers
LinearCut.h
Go to the documentation of this file.
1//
2// Minotaur -- It's only 1/2 bull
3//
4// (C)opyright 2010 - 2025 The Minotaur Team.
5//
6
13#ifndef MINOTAURLINEARCUT_H
14#define MINOTAURLINEARCUT_H
15
16#include "Cut.h"
17#include "Types.h"
18
19namespace Minotaur {
20
25 class LinearCut : public Cut {
26
27 public:
29 LinearCut();
30
32 LinearCut(LinearFunctionPtr lf, double lb, double ub);
33
35 ~LinearCut();
36
38 double getViolation(const double *){ return 0.; };
39
41 double getUb(){ return ub_; };
42
44 double getLb(){ return lb_; };
45
48
51
53 void write(std::ostream &out) const;
54
55
56 protected:
59
62
64 double lb_;
65
68
70 double ub_;
71 };
72 typedef LinearCut* LinearCutPtr;
73 typedef std::vector< LinearCutPtr > LinearCutVector;
74 typedef CutVector::iterator LinearCutIterator;
75 typedef CutVector::const_iterator LinearCutConstIterator;
76}
77#endif
78
Declare the Cut class of valid inequalities.
Declare important 'types' used in Minotaur.
The Constraint class is used to manage a constraint.
Definition: Constraint.h:61
Store function, bounds and other information about a cut.
Definition: Cut.h:52
Definition: Function.h:37
Definition: LinearCut.h:25
void undoToProblem(ProblemPtr)
Remove this cut from the problem.
Definition: LinearCut.cpp:61
void write(std::ostream &out) const
Write this cut to the outstream.
Definition: LinearCut.cpp:66
double getViolation(const double *)
By how much does a given point x violate this cut.
Definition: LinearCut.h:38
double getUb()
Get ub of the inequality.
Definition: LinearCut.h:41
FunctionPtr f_
Function or the lhs.
Definition: LinearCut.h:61
void applyToProblem(ProblemPtr)
Add this cut to problem.
Definition: LinearCut.cpp:55
~LinearCut()
Destroy.
Definition: LinearCut.cpp:49
LinearFunctionPtr lf_
Linear function or the lhs.
Definition: LinearCut.h:67
ConstraintPtr cons_
Pointer to the constraint that is added to the problem.
Definition: LinearCut.h:58
double lb_
lb.
Definition: LinearCut.h:64
double getLb()
Get lb of the inequality.
Definition: LinearCut.h:44
LinearCut()
Default Constructor.
Definition: LinearCut.cpp:25
double ub_
ub.
Definition: LinearCut.h:70
The base class linear function is of the form c'x.
Definition: LinearFunction.h:31
Definition: Problem.h:74
Definition: ActiveNodeStore.h:20

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