CARLsim  6.1.0
CARLsim: a GPU-accelerated SNN simulator
ParameterInstances Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ParameterInstances()

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.

Here is the call graph for this function:

◆ ~ParameterInstances()

Definition at line 96 of file ParameterInstances.cpp.

Member Function Documentation

◆ getInstance()

vector< double > getInstance ( const unsigned int  instance) const

Definition at line 100 of file ParameterInstances.cpp.

Here is the call graph for this function:

◆ getNumInstances()

unsigned int getNumInstances ( ) const

The number of rows that were found in the input.

Definition at line 111 of file ParameterInstances.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNumParameters()

unsigned int getNumParameters ( ) const

Half the number of columns that were found in the input.

Definition at line 115 of file ParameterInstances.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParameter()

double getParameter ( const unsigned int  instance,
const unsigned int  parameter 
) const

Definition at line 105 of file ParameterInstances.cpp.

Here is the call graph for this function:

◆ repOK()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

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