Classes | Functions
OSMathUtil.h File Reference
#include "OSParameters.h"
#include "OSdtoa.h"
#include "OSErrorClass.h"
#include "OSGeneral.h"
#include <string>
Include dependency graph for OSMathUtil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Functions

double os_strtod_wrap (const char *str, char **strEnd)
 
void getMultIncr (int *i, int *mult, int *incr, int size, int defaultIncr)
 getMultIncr More...
 
void getMultIncr (double *a, int *mult, double *incr, int size)
 getMultIncr More...
 
int getMult (int *i, int size)
 getMult More...
 
int getMult (double *a, int size)
 getMult More...
 
double OSRand ()
 OSRand() More...
 
double OSiRand (int iMin, int iMax)
 OSiRand(int iMin, int iMax) More...
 

Function Documentation

double os_strtod_wrap ( const char *  str,
char **  strEnd 
)

Definition at line 125 of file OSMathUtil.cpp.

void getMultIncr ( int i,
int mult,
int incr,
int  size,
int  defaultIncr 
)
inline

getMultIncr

Identify the next run in an integer array

Parameters
iholds a pointer to the array to be processed.
multholds the length of the run. This parameter is passed by reference
incrholds the increment. This parameter is also passed by reference
sizeholds the number of elements in the array. This parameter is passed by value
defaultIncrholds the default value for incr from the schema file. Using just <el mult="..." saves space whenever a run of two or more elements has been encountered, whereas <el mult="..." incr="..." saves space only for runs of three or more elements. Thus the defaultIncr must be treated specially (and it might change from one schema element to the next).

Definition at line 168 of file OSMathUtil.h.

void getMultIncr ( double *  a,
int mult,
double *  incr,
int  size 
)
inline

getMultIncr

Identify the next run in an array of type double.

Parameters
iholds a pointer to the array to be processed.
multholds the length of the run. This parameter is passed by reference
incrholds the increment. This parameter is also passed by reference
sizeholds the number of elements in the array. This parameter is passed by value

Definition at line 206 of file OSMathUtil.h.

int getMult ( int i,
int  size 
)
inline

getMult

Identify the number of duplicates at the start of an integer array

Parameters
iholds a pointer to the array to be processed.
sizeholds the number of elements in the array.
Returns
the length of the run.

Definition at line 246 of file OSMathUtil.h.

int getMult ( double *  a,
int  size 
)
inline

getMult

Identify the number of duplicates at the start of an array of type double

Parameters
iholds a pointer to the array to be processed.
sizeholds the number of elements in the array.
Returns
the length of the run.

Definition at line 274 of file OSMathUtil.h.

double OSRand ( )

OSRand()

Returns
a uniformly distributed random number between 0 and 1 (inclusive) The random number generator used, rand(), is not very good and should be replaced by a serious random number generator for serious work.

Definition at line 262 of file OSMathUtil.cpp.

double OSiRand ( int  iMin,
int  iMax 
)

OSiRand(int iMin, int iMax)

Returns
a uniformly distributed random integer between iMin and iMax (inclusive) The random number generator used, rand(), is not very good and should be replaced by a serious random number generator for serious work.

Definition at line 279 of file OSMathUtil.cpp.