|
|
|
|
|
|
|
|
|
|
|
|||||||
#include <random_range.hpp>
Inheritance diagram for random_range:

Notional Range methods | |
| ss_bool_t | is_open () const |
| Indicates whether the range is open. | |
| value_type | current () const |
| Returns the current value in the range. | |
| class_type & | advance () |
| Advances the current position in the range. | |
| operator operator_bool_type () const | |
| Indicates whether the range is open. | |
| value_type | operator * () const |
| Returns the current value in the range. | |
| class_type & | operator++ () |
| Advances the current position in the range. | |
| class_type | operator++ (int) |
| Advances the current position in the range, returning a copy of the range prior to its being advanced. | |
Public Methods | |
Construction | |
| random_range (ss_size_t numValues, value_type minValue=0, value_type maxValue=RAND_MAX) | |
| Constructs a random range. | |
Attributes | |
| value_type | minimum () const |
| The lower limit of the random number range. | |
| value_type | maximum () const |
| The upper limit of the random number range. | |
Comparison | |
| bool | operator== (class_type const &) const |
| Evaluates whether two ranges are equal. | |
| bool | operator!= (class_type const &rhs) const |
| Evaluates whether two ranges are unequal. | |
It is categoried as a Notional Range
It could be used as follows
// Create a range of 10 values, whose value are between -100 and +100
stlsoft::random_range r(10, -100, +100);
// Dump them to stdout
stlsoft::r_copy(r, std::ostream_iterator<int>(" "));
|
||||||||||||||||
|
Constructs a random range.
|
|
|
Advances the current position in the range.
|
|
|
Returns the current value in the range.
|
|
|
Indicates whether the range is open.
|
|
|
The upper limit of the random number range.
|
|
|
The lower limit of the random number range.
|
|
|
Returns the current value in the range.
|
|
|
Indicates whether the range is open.
|
|
|
Evaluates whether two ranges are unequal.
|
|
|
Advances the current position in the range, returning a copy of the range prior to its being advanced.
|
|
|
Advances the current position in the range.
|
|
|
Evaluates whether two ranges are equal.
|
|
|
| STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004 |