#include "utils.h"
Go to the source code of this file.
Functions | |
valarray< Real > | mergeunique (valarray< Real > a1, valarray< Real > a2) |
helper function to merge two valarrays of reals sorted in ascending order and remove duplicates. | |
short int | sign (Real x) |
sign of a Real | |
void | ErrorMsg (string str, bool mustexit) |
Matrix | transform1DvalarrayToColumnMatrix (valarray< Real > array) |
Transforms a 1D array into a column vector - easier to handle our structures and do operations on them. | |
Matrix | transform2DvalarrayToMatrix (valarray< valarray< Real > > array) |
Transforms a 2D array into a matrix. | |
valarray< Real > | transformColumnMatrixTo1Dvalarray (Matrix M) |
Transforms a column matrix to a 1D array. | |
valarray< valarray< Real > > | transformMatrixTo2Dvalarray (Matrix M) |
Transforms a normal matrix to a 2D array. | |
int | getint (istream &istr) |
bool | realsEqual (Real realOne, Real realTwo, Real precision) |
string | valarrayRealToString (const valarray< Real > &theArray) |
|
Definition at line 74 of file utils.cpp. Referenced by Matrix::CMAC(), Matrix::CMAR(), Matrix::Determinant(), Matrix::DivideColumn(), Matrix::DivideRow(), Matrix::GetInverse(), Matrix::operator *(), Matrix::operator()(), Matrix::operator+(), Matrix::operator-(), Matrix::operator/(), and Matrix::operator[](). |
|
Definition at line 143 of file utils.cpp. Referenced by Matrix::Input(). |
|
helper function to merge two valarrays of reals sorted in ascending order and remove duplicates. a1 - first array to merge a2 - second array to merge
Definition at line 12 of file utils.cpp. References Natural, Real, and TN_INFINITY. Referenced by creditCurve::combineUnderlyingAndSpreads(), and yieldCurve::operator==(). |
|
Definition at line 157 of file utils.cpp. References Real. Referenced by mainbinomialtree(), and mainconvertiblebond(). |
|
sign of a Real
Definition at line 62 of file utils.cpp. References Real. Referenced by CumulativeBivariateNormal(). |
|
Transforms a 1D array into a column vector - easier to handle our structures and do operations on them.
Definition at line 96 of file utils.cpp. References Natural, and Matrix::SetValue(). Referenced by mainmatrix(). |
|
Transforms a 2D array into a matrix.
Definition at line 107 of file utils.cpp. References Natural, and Matrix::SetValue(). Referenced by mainmatrix(). |
|
Transforms a column matrix to a 1D array.
Definition at line 119 of file utils.cpp. Referenced by mainmatrix(). |
|
Transforms a normal matrix to a 2D array.
Definition at line 128 of file utils.cpp. Referenced by mainmatrix(). |
|
Definition at line 162 of file utils.cpp. References Natural. Referenced by operator<<(). |