Public Member Functions | Static Public Member Functions | List of all members
MathUtil Class Reference

this class has routines for linear algebra. More...

#include <OSMathUtil.h>

Public Member Functions

 MathUtil ()
 the class constructor More...
 
 ~MathUtil ()
 the class destructor More...
 
std::string format_os_dtoa (double x)
 

Static Public Member Functions

static SparseMatrixconvertLinearConstraintCoefficientMatrixToTheOtherMajor (bool isColumnMajor, int startSize, int valueSize, int *start, int *index, double *value, int dimension)
 Round a double number to the precision specified. More...
 

Detailed Description

this class has routines for linear algebra.

Author
Robert Fourer, Jun Ma, Kipp Martin
Version
1.0, 03/14/2004
Since
OS 1.0
Remarks
This class will hold linear algebra routines used by other OS classes. Right now it has a routine to change the column/row storage of a sparse matrix

Definition at line 57 of file OSMathUtil.h.

Constructor & Destructor Documentation

MathUtil::MathUtil ( )

the class constructor

Definition at line 48 of file OSMathUtil.cpp.

MathUtil::~MathUtil ( )

the class destructor

Definition at line 52 of file OSMathUtil.cpp.

Member Function Documentation

SparseMatrix * MathUtil::convertLinearConstraintCoefficientMatrixToTheOtherMajor ( bool  isColumnMajor,
int  startSize,
int  valueSize,
int start,
int index,
double *  value,
int  dimension 
)
static

Round a double number to the precision specified.

Parameters
Xholds the number to be rounded.
precisionholds the number of digit after (or before if negative) the decimal point.
Returns
the rounded number. Calculation of x mod y.
Parameters
xholds the number before the mod operator.
xholds the number after the mod operator.
Returns
the result of x mod y.
Parameters
isColumnMajorholds whether the coefMatrix (AMatrix) holding linear program data is stored by column. If false, the matrix is stored by row.
startSizeholds the size of the start array
valueSizeholds the size of the index and value arrays
startholds an integer array of start elements in coefMatrix (AMatrix), which points to the start of a column (row) of nonzero elements in coefMatrix (AMatrix).
indexholds an integer array of rowIdx (or colIdx) elements in coefMatrix (AMatrix). If the matrix is stored by column (row), rowIdx (colIdx) is the array of row (column) indices.
valueholds a double array of value elements in coefMatrix (AMatrix), which contains nonzero elements.
dimensionholds the column count if the input matrix is row major (row count = start.length-1) or the row number if the input matrix is column major (column count = start.length -1)
Returns
Linear constraint coefficient matrix in the other major of the input matrix. Return null if input matrix not valid.

Definition at line 57 of file OSMathUtil.cpp.

std::string MathUtil::format_os_dtoa ( double  x)
Parameters
xis the double that gets converted into a string this takes the David Gay dtoa and converts to a formatted string

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