#include <mccormick.h>
Public Member Functions | |
McCormick (const double c) | |
Constructor for a constant value c. | |
McCormick (const double l, const double u, const double c, const int ip=-1) | |
Constructor for a variable that belongs to the interval [l,u], has the value c, and has index ip. | |
McCormick (const double l, const double u, const double cv, const double cc, const int icv=-1, const int icc=-1) | |
Constructor for an intermediate variable, that belongs to the interval [l,u], has convex underestimator value cv with index icv, and concave overestimator cc with index icc. | |
McCormick (const McCormick &) | |
Copy constructor. | |
~McCormick () | |
Destructor. | |
int | np () const |
Returns the number of variables in the original function. | |
double | l () const |
Returns the lower bounding value. | |
double | u () const |
Returns the upper bounding value. | |
double | cv () const |
Returns the value of the McCormick's convex underestimator. | |
double | cc () const |
Returns the value of the McCormick's concave overestimator. | |
const double * | dcvdp () const |
Returns a pointer to a subgradient of the McCormick's convex underestimator. | |
const double * | dccdp () const |
Returns a pointer to a subgradient of the McCormick's concave overestimator. | |
double | dcvdp (const int ip) const |
Returns the ip-th component of a subgradient of the McCormick's convex underestimator. | |
double | dccdp (const int ip) const |
Returns the ip-th component of a subgradient of the McCormick's concave overestimator. | |
void | l (double l) |
Sets the lower bounding value. | |
void | u (double u) |
Sets the upper bounding value. | |
void | cv (double cv) |
Sets the value of the McCormick's convex underestimator. | |
void | cc (double cc) |
Sets the value of the McCormick's concave overestimator. | |
Static Public Member Functions | |
static void | np (int npar) |
Sets the number of variables in the original function; needed to calculate a subgradient of a McCormick relaxation. |