CARLsim
6.1.0
CARLsim: a GPU-accelerated SNN simulator
|
#include <ParameterInstances.h>
Classes | |
struct | ParameterInstancesImpl |
Public Member Functions | |
ParameterInstances (std::istream &inputStream) | |
~ParameterInstances () | |
std::vector< double > | getInstance (const unsigned int instance) const |
unsigned int | getNumInstances () const |
unsigned int | getNumParameters () const |
double | getParameter (const unsigned int instance, const unsigned int parameter) const |
bool | repOK () const |
Receives a CSV of double point values from an istream and interprets them as minimum and maximum bounds on a number of parameters.
This class is used to receive and store a set of parameter configurations from an external parameter tuning algorithm.
Definition at line 13 of file ParameterInstances.h.
ParameterInstances | ( | std::istream & | inputStream | ) |
Read the file in istream, interpretting each comma-delimited row as an "individual" and each pair of columns as Parameter.
Throws std::invalid_argument if a non-double value is found, if the file has an odd number of columns, if two rows have an unequal number of columns, or if the first column in each pair has a value greater than the second column (since we must have min <= max).
Definition at line 91 of file ParameterInstances.cpp.
~ParameterInstances | ( | ) |
Definition at line 96 of file ParameterInstances.cpp.
vector< double > getInstance | ( | const unsigned int | instance | ) | const |
unsigned int getNumInstances | ( | ) | const |
The number of rows that were found in the input.
Definition at line 111 of file ParameterInstances.cpp.
unsigned int getNumParameters | ( | ) | const |
Half the number of columns that were found in the input.
Definition at line 115 of file ParameterInstances.cpp.
double getParameter | ( | const unsigned int | instance, |
const unsigned int | parameter | ||
) | const |
bool repOK | ( | ) | const |
This returns false only if this is in an inconsistent state. Under correct usage, this should always return true.
Definition at line 119 of file ParameterInstances.cpp.