Loading...
Searching...
No Matches
basic.h
// Copyright (C) 2003-2011 Anders Logg
//
// This file is part of DOLFIN.
//
// DOLFIN is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// DOLFIN is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
//
// First added: 2003-02-06
// Last changed: 2011-07-01
#ifndef __BASIC_H
#define __BASIC_H
#include <cstddef>
#include <utility>
#include <dolfin/common/constants.h>
namespace dolfin
{
std::size_t ipow(std::size_t a, std::size_t n);
double rand();
void seed(std::size_t s);
bool near(double x, double x0, double eps=DOLFIN_EPS);
// FIXME: This should not involve eps. It is 'between' and
// not 'nearly between'.
bool between(double x, std::pair<double, double> range);
}
#endif
dolfin
Definition adapt.h:30
dolfin::between
bool between(double x, std::pair< double, double > range)
Definition basic.cpp:85
dolfin::seed
void seed(std::size_t s)
Definition basic.cpp:74
dolfin::rand
double rand()
Definition basic.cpp:63
dolfin::ipow
std::size_t ipow(std::size_t a, std::size_t n)
Definition basic.cpp:40
dolfin::near
bool near(double x, double x0, double eps=DOLFIN_EPS)
Definition basic.cpp:80