Dune Core Modules (unstable)

math.hh File Reference

Some useful basic math stuff. More...

#include <cmath>
#include <complex>
#include <limits>
#include <type_traits>
#include <dune/common/typeutilities.hh>

Go to the source code of this file.

Classes

struct  Dune::StandardMathematicalConstants< T >
 Standard implementation of MathematicalConstants. More...
 
struct  Dune::MathematicalConstants< Field >
 Provides commonly used mathematical constants. More...
 
struct  Dune::Factorial< m >
 
struct  Dune::Factorial< 0 >
 end of recursion of factorial via specialization More...
 
struct  Dune::MathOverloads::ADLTag
 Tag to make sure the functions in this namespace can be found by ADL. More...
 

Namespaces

 Dune
 Dune namespace.
 
 Dune::MathOverloads
 namespace for customization of math functions with Dune-Semantics
 

Functions

template<class Base , class Exponent >
constexpr Base Dune::power (Base m, Exponent p)
 Power method for integer exponents. More...
 
template<class T >
constexpr static T Dune::factorial (const T &n) noexcept
 calculate the factorial of n as a constexpr
 
template<class T , T n>
constexpr static auto Dune::factorial (std::integral_constant< T, n >) noexcept
 calculate the factorial of n as a constexpr
 
template<class T >
constexpr static T Dune::binomial (const T &n, const T &k) noexcept
 calculate the binomial coefficient n over k as a constexpr
 
template<class T , T n, T k>
constexpr static auto Dune::binomial (std::integral_constant< T, n >, std::integral_constant< T, k >) noexcept
 calculate the binomial coefficient n over k as a constexpr
 
template<class K >
Dune::conjugateComplex (const K &x)
 compute conjugate complex of x
 
template<class T >
int Dune::sign (const T &val)
 Return the sign of the value.
 

Detailed Description

Some useful basic math stuff.

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 25, 22:37, 2024)