basic.h

Note

The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.

std::size_t ipow(std::size_t a, std::size_t n)

Return a to the power n. NOTE: Overflow is not checked!

double rand()

Return a random number, uniformly distributed between [0.0, 1.0)

void seed(std::size_t s)

Seed random number generator

bool near(double x, double x0, double eps = DOLFIN_EPS)

Check whether x is close to x0 (to within DOLFIN_EPS)

bool between(double x, std::pair<double, double> range)

Check whether x is between x0 and x1 (inclusive, to within DOLFIN_EPS)