GClasses
GClasses::GLinearProgramming Class Reference

#include <GLinear.h>

Static Public Member Functions

static bool simplexMethod (GMatrix *pA, const double *pB, int leConstraints, int geConstraints, const double *pC, double *pOutX)
 Compute x that maximizes c*x, subject to Ax<=b, x>=0. The size of pB is the number of rows in pA. The size of pC is the number of columns in pA. leConstraints specifies the number of <= constraints. (These must come first in order.) geConstraints specifies the number of >= constraints. (These come next.) The remaining constraints are assumed to be = constraints. The answer is put in pOutX, which is the same size as pC. Returns false if there is no solution, and true if it finds a solution. More...
 
static void test ()
 Perform unit tests for this class. Throws an exception if any tests fail. Returns if they all pass. More...
 

Member Function Documentation

static bool GClasses::GLinearProgramming::simplexMethod ( GMatrix pA,
const double *  pB,
int  leConstraints,
int  geConstraints,
const double *  pC,
double *  pOutX 
)
static

Compute x that maximizes c*x, subject to Ax<=b, x>=0. The size of pB is the number of rows in pA. The size of pC is the number of columns in pA. leConstraints specifies the number of <= constraints. (These must come first in order.) geConstraints specifies the number of >= constraints. (These come next.) The remaining constraints are assumed to be = constraints. The answer is put in pOutX, which is the same size as pC. Returns false if there is no solution, and true if it finds a solution.

static void GClasses::GLinearProgramming::test ( )
static

Perform unit tests for this class. Throws an exception if any tests fail. Returns if they all pass.