G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsMath.h File Reference

Mathematical functions for use in G+Smo. More...

+ Include dependency graph for gsMath.h:

Go to the source code of this file.

Classes

struct  numeric_limits< T >
 

Namespaces

 gismo
 The G+Smo namespace, containing all definitions for the library.
 
 gismo::math
 This namespace contains common mathematical functions.
 

Functions

template<typename T >
util::make_unsigned< T >::type abs_diff (T a, T b)
 
template<typename T >
int getSign (T val)
 Returns the sign of val.
 
template<typename matrix_t1 , typename matrix_t2 >
bool gsAllCloseAbsolute (const matrix_t1 &a, const matrix_t2 &b, const typename matrix_t1::Scalar &tol)
 tests if the difference between two matrices is bounded by tol in \( L^\infty \) norm More...
 
template<typename matrix_t1 , typename matrix_t2 >
bool gsAllCloseRelAndAbsWithRef (const matrix_t1 &a, const matrix_t2 &b, const typename matrix_t1::Scalar &tol, const typename matrix_t1::Scalar &ref)
 Tests whether the difference between two matrices is bounded by tol in \( L^\infty \) norm. More...
 
template<typename matrix_t1 , typename matrix_t2 >
bool gsAllCloseRelativeToMax (const matrix_t1 &a, const matrix_t2 &b, const typename matrix_t1::Scalar &tol)
 tests if the difference between two matrices is bounded by tol in \( L^\infty \) norm More...
 
template<typename T >
bool gsClose (const T &a, const T &b, const T &tol)
 tests if the difference between two numbers is below tolerance
 
int ipow (int x, unsigned exp)
 integer power
 
unsigned isqrt (unsigned value)
 integer square root
 
template<class T >
mix (T const &a, T const &b, T const &t)
 Returns convex combination of a and b with weight t.
 
template<typename T >
nextafter (T x, T y)
 

Detailed Description

Mathematical functions for use in G+Smo.

This file is part of the G+Smo library.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Author(s): A. Bressan, A. Mantzaflaris