|
template<class T , unsigned DIM> |
ADf< T, DIM > | olb::util::sqrt (const ADf< T, DIM > &a) |
|
template<typename T > |
bool | olb::util::nearZero (T a) |
| return true if a is close to zero
|
|
template<typename T > |
bool | olb::util::nearZero (T a, T epsilon) |
|
template<typename T , typename U = T, typename W = T> |
bool | olb::util::approxEqual (T a, U b, W epsilon) |
|
template<typename T , typename U = T> |
bool | olb::util::approxEqual (T a, U b) |
|
template<class T > |
void | olb::util::copyN (T c[], const T a[], const unsigned dim) any_platform |
|
template<class S , class T > |
void | olb::util::copyN (S c[], const T a[], const unsigned dim) any_platform |
|
template<class T > |
void | olb::util::copy3 (T c[], const T a[]) |
|
template<typename T > |
std::vector< T > | olb::util::fromVector3 (const Vector< T, 3 > &vec) |
|
template<typename T > |
std::vector< T > | olb::util::fromVector2 (const Vector< T, 2 > &vec) |
|
template<typename T > |
T | olb::util::norm (const std::vector< T > &a) |
| l2 norm of a vector of arbitrary length
|
|
template<typename T > |
T | olb::util::norm2 (const std::vector< T > &a) |
| l2 norm to the power of 2 of a vector of arbitrary length
|
|
template<typename T > |
T | olb::util::dotProduct3D (const Vector< T, 3 > &a, const Vector< T, 3 > &b) |
| dot product, only valid in 3d
|
|
template<typename T > |
T | olb::util::dotProduct2D (const Vector< T, 2 > &a, const Vector< T, 2 > &b) |
| dot product, only valid in 2d
|
|
template<typename T , unsigned D> |
T | olb::util::dotProduct (const Vector< T, D > &a, const Vector< T, D > &b) |
| dot product
|
|
template<typename T , unsigned D> |
Vector< T, D > | olb::util::normalize (const Vector< T, D > &a) |
|
template<typename T > |
std::vector< T > | olb::util::normalize (const std::vector< T > &a) |
| returns a normalized vector, works for arbitrary lengths
|
|
template<typename T , unsigned Size> |
Vector< T, Size > | olb::util::floor (const Vector< T, Size > &a) |
| applies floor to each component of a vector
|
|
template<typename T , unsigned Size> |
Vector< T, Size > | olb::util::ceil (const Vector< T, Size > &a) |
| applies ceil to each component of a vector
|
|
template<typename T , typename S , unsigned Size> |
Vector< T, Size > | olb::util::fmod (const Vector< T, Size > &a, S b) |
| applies fmod to each component of a vector
|
|
template<typename T , unsigned Size> |
T | olb::util::average (const Vector< T, Size > &a) |
| computes the average of all elements
|
|
template<typename T , unsigned Size> |
T | olb::util::max_element (const Vector< T, Size > &a) |
| finds maximum element of all elements
|
|
template<typename T , unsigned Size> |
T | olb::util::min_element (const Vector< T, Size > &a) |
| finds minimum element of all elements
|
|
template<typename T , unsigned Size> |
unsigned | olb::util::maxElementPos (const Vector< T, Size > &a) |
| finds position of maximum element of all elements
|
|
template<typename T , unsigned Size> |
unsigned | olb::util::minElementPos (const Vector< T, Size > &a) |
| finds position of minimum element of all elements
|
|
template<typename T , unsigned Size> |
T | olb::util::maxElementAbs (const Vector< T, Size > &a) |
| finds maximum element of all absolute elements
|
|
template<typename T , unsigned Size> |
unsigned | olb::util::maxElementAbsPos (const Vector< T, Size > &a) |
| finds position of maximum element of all absolute elements
|
|
template<typename T , bool ensureAngularBounds = true> |
T | olb::util::angleBetweenVectors (const Vector< T, 2 > &a, const Vector< T, 2 > &b) |
| Calculates angles between two 2D vectors.
|
|
template<typename T , bool ensureAngularBounds = true> |
Vector< T, 3 > | olb::util::angleBetweenVectors (const Vector< T, 3 > &a, const Vector< T, 3 > &b) |
| Calculates angles between two 3D vectors.
|
|
template<typename T > |
std::vector< T > | olb::util::assign (T a, T b) |
|
template<typename T > |
std::vector< T > | olb::util::assign (T a, T b, T c) |
|
template<typename U > |
void | olb::util::print (U data, const std::string &name="", OstreamManager clout=OstreamManager(std::cout,"print"), const char delimiter=',') |
|
template<typename C , typename U > |
bool | olb::util::isContained (const C &c, U object) |
| Check, if object is contained in iteratable container c.
|
|