gen_test_number Class Template Reference

#include <misc.h>


Detailed Description

template<size_t tot>
class gen_test_number< tot >

Generate number sequence for testing.

A class which generates tot numbers from -1 to 1, making sure to include -1, 1, 0, and numbers near -1, 0 and 1 (so long as tot is sufficiently large). If gen() is called more than tot times, it just recycles through the list again. The template argument tot should probably be greater than or equal to three.

At present, this is used to generate combinations of coefficients for testing the polynomial solvers.

Definition at line 169 of file misc.h.


Public Member Functions

double gen ()
 Return the next number in the sequence.

Protected Attributes

int n
 Count number of numbers generated.
double fact
 A constant factor for the argument to tanh().

The documentation for this class was generated from the following file:

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page