- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# 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)
## Static Public Member Functions
static SparseMatrix * | convertLinearConstraintCoefficientMatrixToTheOtherMajor (bool isColumnMajor, int startSize, int valueSize, int *start, int *index, double *value, int dimension)

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

## Constructor & Destructor Documentation

MathUtil::MathUtil | ( |  | ) |

the class constructor

Definition at line 28 of file OSMathUtil.cpp.

MathUtil::~MathUtil | ( |  | ) |

the class destructor

Definition at line 31 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]`

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 36 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:

- /home/coin/SVN-release/OS-2.3.5/OS/src/OSUtils/OSMathUtil.h
- /home/coin/SVN-release/OS-2.3.5/OS/src/OSUtils/OSMathUtil.cpp