ALPS Project

Header file math.hpp

This header contains mathematical functions not present in the standard or boost libraries.

Synopsis

namespace alps {
template <class T>
typename TypeTraits<T>::norm_t abs2(T x);

template <class T>
T abs2(const std::complex<T>& x);

std::size_t binomial(std::size_t l,std::size_t n);
}

Functions

template <class T>
typename TypeTraits<T>::norm_t abs2(T x);

template <class T>
T abs2(cosnt std::complex<T>& x);
returns the square of the absolute value. It is optimized by specialization for complex numbers.
std::size_t binomial(std::size_t l,std::size_t n);
returns the binomial of of l and n.
copyright (c) 1994-2003 by Matthias Troyer