#include <stdlib.h>
#include <string>
#include <exception>
#include <iostream>
#include <sstream>
#include <stdexcept>
Go to the source code of this file.
Namespaces | |
| namespace | NFutil |
Functions | |
| void | NFutil::SEED_RANDOM (unsigned long seed) |
| Seeds the random number generator used in all simulations. | |
| double | NFutil::RANDOM (double max) |
| Uniform random number on the interval (0,max]. | |
| double | NFutil::RANDOM_CLOSED () |
| Uniform random number on the interval (0,1). | |
| int | NFutil::RANDOM_INT (unsigned long min, unsigned long max) |
| Uniform random number on the interval [min,max]. | |
| double | NFutil::RANDOM_GAUSSIAN () |
| Normally distributed random number with mean 0 and variance 1. | |
| double | NFutil::convertToDouble (const std::string &s) |
| Parses and converts std::string objects to double values. | |
| int | NFutil::convertToInt (const std::string &s) |
| Parses and converts std::string objects to int values. | |
| string | NFutil::toString (double x) |
| Converts double values to their string representations. | |
| string | NFutil::toString (int x) |
| Converts integer values to their string representations. | |
| void | NFutil::trim (string &str) |
| Removes leading and trailing whitespace (including tabs) from the string. | |
Variables | |
| const double | NFutil::PI = 3.14159265358979323846 |
| const double | NFutil::NA = 6.02214179e23 |
1.5.4