eisgenerator 1.0.x
|
A range. More...
#include <eistype.h>
Public Member Functions | |
fvalue | stepSize () const |
Calculates the distance between elements in the range. | |
fvalue | stepValue () const |
Calculates the value of the current step. | |
fvalue | center () const |
Calculates the mean of the start and the end values. | |
fvalue | at (size_t index) const |
Calculates the value at the given index. | |
fvalue | operator[] (size_t index) const |
Range | operator* (fvalue in) const |
Range | operator/ (fvalue in) const |
Range | operator* (int in) const |
Range | operator/ (int in) const |
Range (fvalue startI, fvalue endI, size_t countI, bool logI=false) | |
void | print (int level) const |
Prints the range to stdout via eis::Log. | |
std::string | getString () const |
Gets a machine parseable string encoding this range. | |
bool | isSane () const |
Checks if the values of this range are sane/. | |
std::vector< fvalue > | getRangeVector () const |
This function constructs a vector that contains all elements of this range. | |
Static Public Member Functions | |
static Range | fromString (std::string str, size_t count) |
This function creates a range from the parseable string. | |
static std::vector< Range > | rangesFromParamString (const std::string ¶mStr, size_t count) |
This function creates a vector ranges from the parseable parameter array string. | |
A range.
|
inline |
Calculates the value at the given index.
References count, log, start, and stepSize().
Referenced by stepValue().
|
inline |
|
static |
This function creates a range from the parseable string.
std::invalid_argument | when the string syntax is incorrect. |
std::vector< fvalue > eis::Range::getRangeVector | ( | ) | const |
This function constructs a vector that contains all elements of this range.
std::string eis::Range::getString | ( | ) | const |
Gets a machine parseable string encoding this range.
bool eis::Range::isSane | ( | ) | const |
Checks if the values of this range are sane/.
This checks for some common errors like having a end < being.
void eis::Range::print | ( | int | level | ) | const |
Prints the range to stdout via eis::Log.
level | The eis::Log::Level to print at. |
|
static |
This function creates a vector ranges from the parseable parameter array string.
std::invalid_argument | when the string syntax is incorrect |
|
inline |