Rodin::Math namespace

Module for general mathematical operations.

Classes

class Rad
Represents an angle in radians.
template<class Derived, class T>
class Unit
Base class for units.

Typedefs

template<class ScalarType>
using Matrix = Eigen::Matrix<ScalarType, Eigen::Dynamic, Eigen::Dynamic>
Dense scalar valued matrix type.
using ComplexMatrix = Matrix<Complex>
Dense complex valued matrix type.
template<class ScalarType>
using SpatialMatrix = Eigen::Matrix<ScalarType, Eigen::Dynamic, Eigen::Dynamic, 0, RODIN_MAXIMAL_SPACE_DIMENSION, RODIN_MAXIMAL_SPACE_DIMENSION>
Spatial matrix.
using PointMatrix = Eigen::Matrix<Real, Eigen::Dynamic, Eigen::Dynamic, 0, RODIN_MAXIMAL_SPACE_DIMENSION, Eigen::Dynamic>
Point matrix.
template<class ScalarType, size_t Rows, size_t Cols>
using FixedSizeMatrix = Eigen::Matrix<ScalarType, Rows, Cols>
Represents a fixed size matrix.
template<class ScalarType>
using SparseMatrix = Eigen::SparseMatrix<ScalarType>
Sparse matrix type.
template<class ScalarType, size_t Rank>
using Tensor = Eigen::Tensor<ScalarType, Rank>
Dense tensor type.
template<class ScalarType>
using Vector = Eigen::VectorX<ScalarType>
Dense vector type.

Functions

template<class T>
auto abs(const T& x) -> auto constexpr
Computes the absolute value of a value of type T.
template<class T>
auto sqrt(const T& x) -> auto constexpr
Computes the square root of a value of type T.
template<class T>
auto isNaN(const T& x) -> Boolean constexpr
Determines if the floating point number is not-a-number (NaN).
template<class T>
auto isInf(const T& x) -> Boolean constexpr
Determines if the floating point number is positive or negative infinity.
template<class ScalarType, auto Rank>
auto rank(const Tensor<ScalarType, Rank>& tensor) -> auto constexpr
Gets the tank of a tensor.

Typedef documentation

template<class ScalarType, size_t Rank>
using Rodin::Math::Tensor = Eigen::Tensor<ScalarType, Rank>

Dense tensor type.

Template parameters
ScalarType
Rank Rank of tensor.

Function documentation

template<class T>
auto Rodin::Math::abs(const T& x) constexpr

Computes the absolute value of a value of type T.

Template parameters
T Type of value
Parameters
in Value
Returns Absolute of value

template<class T>
auto Rodin::Math::sqrt(const T& x) constexpr

Computes the square root of a value of type T.

Template parameters
T Type of value
Parameters
in Value
Returns Square root of value

template<class T>
Boolean Rodin::Math::isNaN(const T& x) constexpr

Determines if the floating point number is not-a-number (NaN).

Template parameters
T Type of value
Parameters
in Value
Returns True if value is NaN, false otherwise.

template<class T>
Boolean Rodin::Math::isInf(const T& x) constexpr

Determines if the floating point number is positive or negative infinity.

Template parameters
T Type of value
Parameters
in Value
Returns True if value is Inf (or -Inf), false otherwise.