SIRIUS 7.5.0
Electronic structure library and applications
|
Math helper functions. More...
Go to the source code of this file.
Namespaces | |
module | sirius |
Namespace of the SIRIUS library. | |
Functions | |
auto | sirius::confined_polynomial (double r, double R, int p1, int p2, int dm) |
template<typename T > | |
int | sirius::sign (T val) |
Sign of the variable. More... | |
template<typename T > | |
bool | sirius::is_int (T val__, T eps__) |
Checks if number is integer with a given tolerance. More... | |
template<typename T > | |
T | sirius::factorial (int n) |
Compute a factorial. More... | |
auto | sirius::round (double a__, int n__) |
auto | sirius::round (std::complex< double > a__, int n__) |
auto | sirius::hash (void const *buff, size_t size, uint64_t h=5381) |
Simple hash function. More... | |
uint32_t | sirius::random_uint32 (bool reset=false) |
Simple random number generator. More... | |
template<typename T > | |
T | sirius::random () |
template<> | |
int | sirius::random< int > () |
template<> | |
double | sirius::random< double > () |
template<> | |
std::complex< double > | sirius::random< std::complex< double > > () |
template<> | |
float | sirius::random< float > () |
template<> | |
std::complex< float > | sirius::random< std::complex< float > > () |
template<typename T > | |
auto | sirius::abs_diff (T a, T b) |
template<typename T > | |
auto | sirius::rel_diff (T a, T b) |
auto | sirius::conj (double x__) |
Return complex conjugate of a number. For a real value this is the number itself. More... | |
auto | sirius::conj (std::complex< double > x__) |
Return complex conjugate of a number. More... | |
template<typename T > | |
T | sirius::zero_if_not_complex (T x__) |
template<typename T > | |
T | sirius::zero_if_not_complex (std::complex< T > x__) |
Math helper functions.
Definition in file math_tools.hpp.