MathUtil Class Reference

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

#include <OSMathUtil.h>

List of all members.

Public Member Functions

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


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.


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 58 of file OSMathUtil.h.


Constructor & Destructor Documentation

MathUtil::MathUtil (  ) 

the class constructor

Definition at line 27 of file OSMathUtil.cpp.

MathUtil::~MathUtil (  ) 

the class destructor

Definition at line 30 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:
X holds the number to be rounded.
precision holds the number of digit after (or before if negative) the decimal point.
Returns:
the rounded number. Calculation of x mod y.
Parameters:
x holds the number before the mod operator.
x holds the number after the mod operator.
Returns:
the result of x mod y.
Parameters:
isColumnMajor holds whether the coefMatrix (AMatrix) holding linear program data is stored by column. If false, the matrix is stored by row.
start holds an integer array of start elements in coefMatrix (AMatrix), which points to the start of a column (row) of nonzero elements in coefMatrix (AMatrix).
index holds 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.
value holds a double array of value elements in coefMatrix (AMatrix), which contains nonzero elements.
dimension holds 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 (columnh 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 35 of file OSMathUtil.cpp.

References SparseMatrix::indexes, SparseMatrix::starts, and SparseMatrix::values.

Referenced by OSInstance::getLinearConstraintCoefficientsInColumnMajor(), and OSInstance::getLinearConstraintCoefficientsInRowMajor().

std::string MathUtil::format_os_dtoa ( double  x  ) 

Parameters:
x is 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:
Generated on Sat Mar 29 22:38:05 2008 by  doxygen 1.5.3