Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# MVTools Namespace Reference

Several helper functions that returns minimal and maximal values of data types. More...

## Functions
bool | isNearZero (double value)
bool | isNearPosZero (double value)
bool | isNearNegZero (double value)
bool | isNearInf (double value)
bool | isNearPosInf (double value)
bool | isNearNegInf (double value)
double | getMaxPosDouble ()
double | getMinPosDouble ()
double | getMaxExpDouble ()
bool | isNearZero (float value)
bool | isNearPosZero (float value)
bool | isNearNegZero (float value)
bool | isNearInf (float value)
bool | isNearPosInf (float value)
bool | isNearNegInf (float value)
float | getMaxPosFloat ()
float | getMinPosFloat ()
float | getMaxExpFloat ()
bool | isNearZero (int value)
bool | isNearPosZero (int value)
bool | isNearNegZero (int value)
bool | isNearInf (int value)
bool | isNearPosInf (int value)
bool | isNearNegInf (int value)
int | getMaxPosInt ()
int | getMinPosInt ()
## Variables
const double | maxPosDouble = 1e150
const double | maxNegDouble = -1e150
const double | minPosDouble = 1e-150
const double | minNegDouble = -1e-150
const double | maxExpDouble = 345.38776
const float | maxPosFloat = 1e18f
const float | maxNegFloat = -1e18f
const float | minPosFloat = 1e-18f
const float | minNegFloat = -1e-18f
const float | maxExpFloat = 41.4465f
const int | maxPosInt = 2147483647
const int | maxNegInt = -2147483647
const int | minPosInt = 0
const int | minNegInt = 0

## Detailed Description

Several helper functions that returns minimal and maximal values of data types.

If you want to use Matrix_nxn and Vector_n with your own types you have to add the appropriate overloaded functions here. The maximal and minimal values should be set to values so that multiplication and division of values in the range [minValue;maxValue] can be represented by the datatype. If you don't care for under/overflows and under/overflows don't cause a crash you can set the maximal and minimal values available for the datatype.

## Function Documentation

bool MVTools::isNearZero | ( | double | value | ) |

| Definition at line 51 of file MVTools.cpp. References minNegDouble, and minPosDouble. Referenced by Matrix_nxn< T, N >::det(), Matrix_nxn< T, N >::invert(), Vector_n< T, N >::operator/=(), and Matrix_nxn< T, N >::solve().

bool MVTools::isNearPosZero | ( | double | value | ) |

| Definition at line 60 of file MVTools.cpp. References minPosDouble.

bool MVTools::isNearNegZero | ( | double | value | ) |

| Definition at line 69 of file MVTools.cpp. References minNegDouble. Referenced by Matrix_nxn< T, N >::invert(), Vector_n< T, N >::operator/=(), and Matrix_nxn< T, N >::solve().

bool MVTools::isNearInf | ( | double | value | ) |

| Definition at line 78 of file MVTools.cpp. References maxNegDouble, and maxPosDouble. Referenced by Matrix_nxn< T, N >::det(), Matrix_nxn< T, N >::invert(), operator *(), Vector_n< T, N >::operator *=(), Vector_n< T, N >::operator/=(), and Matrix_nxn< T, N >::solve().

bool MVTools::isNearPosInf | ( | double | value | ) |

| Definition at line 87 of file MVTools.cpp. References maxPosDouble. Referenced by Matrix_nxn< T, N >::det(), Matrix_nxn< T, N >::invert(), operator *(), Vector_n< T, N >::operator *=(), Vector_n< T, N >::operator/=(), and Matrix_nxn< T, N >::solve().

bool MVTools::isNearNegInf | ( | double | value | ) |

| Definition at line 95 of file MVTools.cpp. References maxNegDouble.

double MVTools::getMaxPosDouble | ( |  | ) |

| Definition at line 103 of file MVTools.cpp. References maxPosDouble.

double MVTools::getMinPosDouble | ( |  | ) |

| Definition at line 108 of file MVTools.cpp. References minPosDouble.

double MVTools::getMaxExpDouble | ( |  | ) |

| Definition at line 113 of file MVTools.cpp. References maxExpDouble.

bool MVTools::isNearZero | ( | float | value | ) |

| Definition at line 118 of file MVTools.cpp. References minNegFloat, and minPosFloat.

bool MVTools::isNearPosZero | ( | float | value | ) |

| Definition at line 127 of file MVTools.cpp. References minPosFloat.

bool MVTools::isNearNegZero | ( | float | value | ) |

| Definition at line 136 of file MVTools.cpp. References minNegFloat.

bool MVTools::isNearInf | ( | float | value | ) |

| Definition at line 145 of file MVTools.cpp. References maxNegFloat, and maxPosFloat.

bool MVTools::isNearPosInf | ( | float | value | ) |

| Definition at line 154 of file MVTools.cpp. References maxPosFloat.

bool MVTools::isNearNegInf | ( | float | value | ) |

| Definition at line 162 of file MVTools.cpp. References maxNegFloat.

float MVTools::getMaxPosFloat | ( |  | ) |

| Definition at line 170 of file MVTools.cpp. References maxPosFloat.

float MVTools::getMinPosFloat | ( |  | ) |

| Definition at line 175 of file MVTools.cpp. References minPosFloat.

float MVTools::getMaxExpFloat | ( |  | ) |

| Definition at line 180 of file MVTools.cpp. References maxExpFloat.

bool MVTools::isNearZero | ( | int | value | ) |

| Definition at line 185 of file MVTools.cpp. References minNegInt, and minPosInt.

bool MVTools::isNearPosZero | ( | int | value | ) |

| Definition at line 194 of file MVTools.cpp. References minPosInt.

bool MVTools::isNearNegZero | ( | int | value | ) |

| Definition at line 203 of file MVTools.cpp. References minNegInt.

bool MVTools::isNearInf | ( | int | value | ) |

| Definition at line 212 of file MVTools.cpp. References maxNegInt, and maxPosInt.

bool MVTools::isNearPosInf | ( | int | value | ) |

| Definition at line 221 of file MVTools.cpp. References maxPosInt.

bool MVTools::isNearNegInf | ( | int | value | ) |

| Definition at line 229 of file MVTools.cpp. References maxNegInt.

int getMaxPosInt | ( |  | ) |

| Definition at line 237 of file MVTools.cpp. References maxPosInt.

int getMinPosInt | ( |  | ) |

| Definition at line 242 of file MVTools.cpp. References minPosInt.

## Variable Documentation

const double MVTools::maxPosDouble = 1e150

| Definition at line 34 of file MVTools.cpp. Referenced by getMaxPosDouble(), isNearInf(), and isNearPosInf().

const double MVTools::maxNegDouble = -1e150

| Definition at line 35 of file MVTools.cpp. Referenced by isNearInf(), and isNearNegInf().

const double MVTools::minPosDouble = 1e-150

| Definition at line 36 of file MVTools.cpp. Referenced by getMinPosDouble(), isNearPosZero(), and isNearZero().

const double MVTools::minNegDouble = -1e-150

| Definition at line 37 of file MVTools.cpp. Referenced by isNearNegZero(), and isNearZero().

const double MVTools::maxExpDouble = 345.38776

| Definition at line 38 of file MVTools.cpp. Referenced by getMaxExpDouble().

const float MVTools::maxPosFloat = 1e18f

| Definition at line 40 of file MVTools.cpp. Referenced by getMaxPosFloat(), isNearInf(), and isNearPosInf().

const float MVTools::maxNegFloat = -1e18f

| Definition at line 41 of file MVTools.cpp. Referenced by isNearInf(), and isNearNegInf().

const float MVTools::minPosFloat = 1e-18f

| Definition at line 42 of file MVTools.cpp. Referenced by getMinPosFloat(), isNearPosZero(), and isNearZero().

const float MVTools::minNegFloat = -1e-18f

| Definition at line 43 of file MVTools.cpp. Referenced by isNearNegZero(), and isNearZero().

const float MVTools::maxExpFloat = 41.4465f

| Definition at line 44 of file MVTools.cpp. Referenced by getMaxExpFloat().

const int MVTools::maxPosInt = 2147483647

| Definition at line 46 of file MVTools.cpp. Referenced by getMaxPosInt(), isNearInf(), and isNearPosInf().

const int MVTools::maxNegInt = -2147483647

| Definition at line 47 of file MVTools.cpp. Referenced by isNearInf(), and isNearNegInf().

const int MVTools::minPosInt = 0

| Definition at line 48 of file MVTools.cpp. Referenced by getMinPosInt(), isNearPosZero(), and isNearZero().

const int MVTools::minNegInt = 0

| Definition at line 49 of file MVTools.cpp. Referenced by isNearNegZero(), and isNearZero().