McCormick Class Reference

#include <mccormick.h>

List of all members.


Detailed Description

McCormick is an C++ class for calculating the McCormick relaxation of a nonconvex function on a box, as well as valid subgradients of these relaxations. Any function can be considered, provided it is factorable.


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.


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 20:04:36 2007 for libMC by  doxygen 1.4.6