|
void | remap (dmatrix &M, MatrixMap &A, index_t nRows, index_t nCols, index_t start) |
|
void | remap (dmatrix &M, VecMap &A, index_t nVals, index_t start) |
|
double | mathUtils::maxval (const dvector &v) |
| Returns the value of the maximum element of a vector.
|
|
double | mathUtils::minval (const dvector &v) |
| Returns the value of the minimum element of a vector.
|
|
double | mathUtils::range (const dvector &v) |
| Returns the range (maximum - minimum) of a vector.
|
|
double | mathUtils::sum (const dvector &v) |
| Returns the sum of all the elements in a vector.
|
|
double | mathUtils::mean (const dvector &v) |
| Returns the arithemetic mean of the elements in a vector.
|
|
double | mathUtils::maxval (const dvector &v, size_t iStart, size_t iEnd) |
| Returns the value of the maximum element of the sub-vector of v with indices on the closed interval [iStart, iEnd]
|
|
double | mathUtils::minval (const dvector &v, size_t iStart, size_t iEnd) |
| Returns the value of the minimum element of the sub-vector of v with indices on the closed interval [iStart, iEnd]
|
|
double | mathUtils::range (const dvector &v, size_t iStart, size_t iEnd) |
| Returns the range (maximum - minimum) of the sub-vector of v with indices on the closed interval [iStart, iEnd]
|
|
double | mathUtils::sum (const dvector &v, size_t iStart, size_t iEnd) |
| Returns the sum of all the elements in the sub-vector of v with indices on the closed interval [iStart, iEnd]
|
|
double | mathUtils::mean (const dvector &v, size_t iStart, size_t iEnd) |
| Returns the arithemetic mean of the sub-vector of v with indices on the closed interval [iStart, iEnd]
|
|
size_t | mathUtils::minloc (const dvector &v) |
| Returns the index of the minimum element of v.
|
|
size_t | mathUtils::maxloc (const dvector &v) |
| Returns the index of the maximum element of v.
|
|
template<typename Derived > |
bool | mathUtils::notnan (const Eigen::EigenBase< Derived > &v) |
| Returns true if v does not contain any NaN s.
|
|
template<typename T > |
bool | mathUtils::notnan (const vector< T > &v) |
| Returns true if v does not contain any NaN s.
|
|
bool | mathUtils::notnan (const double &v) |
| Returns true if v is not NaN .
|
|
bool | mathUtils::notnan (const sdVector &v) |
| Returns true if v does not contain any NaN s.
|
|
size_t | mathUtils::nanloc (const dvector &v) |
| Returns the index of first NaN component of v .
|
|
bool | mathUtils::almostEqual (double a, double b, double rtol=1e-10, double atol=1e-18) |
| Returns true if a and b are equal to within the specified relative (rtol ) and absolute (atol ) tolerances.
|
|
dvector | mathUtils::abs (const dvector &v) |
| Returns a vector containing the absolute values of the elements of v.
|
|
template<class T > |
int | mathUtils::findFirst (const T &v) |
| Returns the index of the first element of v which is true .
|
|
template<class T > |
int | mathUtils::findLast (const T &v) |
| Returns the index of the last element of v which is true .
|
|
vector< int > | mathUtils::find (vector< bool > &v) |
| Returns a vector containing the indices of the elements of v which are true .
|
|
template<class T > |
void | mathUtils::smooth (T &v) |
| Applies a simple smoothing function to v which effectively filters out high-frequency components.
|
|
dvector | mathUtils::linspace (const double x1, const double x2, const int n) |
| Returns a vector of n elements linearly spaced along the closed interval [x1, x2]
|
|
template<class T1 , class T2 > |
vector< T1 > | mathUtils::computeSplines (const T1 &xIn, const T2 &yIn) |
| Internal function for calculating cubic splines for a sequence of data points.
|
|
template<class T > |
T | mathUtils::interp1 (const T &xIn, const T &yIn, const T &xOut, bool extrap=true) |
| Linear interpolation for a vector of desired outputs.
|
|
template<class T > |
double | mathUtils::interp1 (const T &xIn, const T &yIn, const double xOut, bool extrap=true) |
| Linear interpolation for a single output point.
|
|
dvec | mathUtils::splines (const dvec &xIn, const dvec &yIn, const dvec &xOut) |
| Cubic spline interpolation for a vector of desired outputs.
|
|
double | mathUtils::splines (const dvec &xIn, const dvec &yIn, const double xOut) |
| Cubic spline interpolation for a single output point.
|
|
template<class T1 , class T2 > |
double | mathUtils::integrate (const T1 &x, const T2 &y) |
| Numerical integration using the cubic spline fit for the given data.
|
|
template<class T1 , class T2 > |
double | mathUtils::trapz (const T1 &x, const T2 &y) |
| Trapezoidal rule integration.
|
|
void | mathUtils::vectorVectorToArray2D (const vector< dvector > &v, dmatrix &a) |
|
void | mathUtils::array2DToVectorVector (const dmatrix &a, vector< dvector > &v) |
|
std::string | mathUtils::stringify (double x) |
|
std::string | mathUtils::stringify (double x, int nDigits) |
|
std::string | mathUtils::stringify (int x) |
|
int | mathUtils::sign (const double x) |
|
int | mathUtils::sign (const int x) |
|
template<class Tx , class Ty > |
void | mathUtils::uniqueSort (vector< Tx > &keys, vector< vector< Ty > > &values) |
| Sort & remove duplicate entries from keys, and perform the same permutation on values Requires that keys.size() == values[i].size()
|
|
std::ostream & | operator<< (std::ostream &os, const dvector &v) |
|
std::ostream & | operator<< (std::ostream &os, const vector< bool > &v) |
|
std::ostream & | operator<< (std::ostream &os, const vector< int > &v) |
|
dvector & | operator+= (dvector &v1, const dvector &v2) |
|
dvector | operator+ (const dvector &v1, const dvector &v2) |
|
dvector & | operator-= (dvector &v1, const dvector &v2) |
|
dvector | operator- (const dvector &v1, const dvector &v2) |
|
dvector & | operator+= (dvector &v1, const double s) |
|
dvector | operator+ (const dvector &v1, const double s) |
|
dvector & | operator-= (dvector &v1, const double s) |
|
dvector | operator- (const dvector &v1, const double s) |
|
dvector & | operator*= (dvector &v1, const dvector &v2) |
|
dvector | operator* (const dvector &v1, const dvector &v2) |
|
dvector & | operator*= (dvector &v1, const double s) |
|
dvector | operator* (const dvector &v1, const double s) |
|
dvector | operator* (const double s, const dvector &v1) |
|
dvector & | operator/= (dvector &v1, const dvector &v2) |
|
dvector | operator/ (const dvector &v1, const dvector &v2) |
|
dvector & | operator/= (dvector &v1, const double s) |
|
dvector | operator/ (const dvector &v1, const double s) |
|
vector< bool > | operator> (const dvector &v1, const dvector &v2) |
|
vector< bool > | operator< (const dvector &v1, const dvector &v2) |
|
vector< bool > | operator>= (const dvector &v1, const dvector &v2) |
|
vector< bool > | operator<= (const dvector &v1, const dvector &v2) |
|
vector< bool > | operator== (const dvector &v1, const dvector &v2) |
|
vector< bool > | operator!= (const dvector &v1, const dvector &v2) |
|
vector< bool > | operator> (const dvector &v1, const double &s) |
|
vector< bool > | operator< (const dvector &v1, const double &s) |
|
vector< bool > | operator>= (const dvector &v1, const double &s) |
|
vector< bool > | operator<= (const dvector &v1, const double &s) |
|
vector< bool > | operator== (const dvector &v1, const double &s) |
|
vector< bool > | operator!= (const dvector &v1, const double &s) |
|
vector< bool > | operator! (const vector< bool > &v) |
|
vector< bool > | operator&& (const vector< bool > &v1, const vector< bool > &v2) |
|
vector< bool > | operator|| (const vector< bool > &v1, const vector< bool > &v2) |
|