PetaVision  Alpha
 All Data Structures Namespaces Functions Variables
PV::PVParams Class Reference
 PVParams (size_t initialSize, InterColComm *inIcComm)
 
 PVParams (const char *filename, size_t initialSize, InterColComm *inIcComm)
 
 PVParams (const char *buffer, long int bufferLength, size_t initialSize, InterColComm *inIcComm)
 
int present (const char *groupName, const char *paramName)
 
double value (const char *groupName, const char *paramName)
 
double value (const char *groupName, const char *paramName, double initialValue, bool warnIfAbsent=true)
 
int valueInt (const char *groupName, const char *paramName)
 
int valueInt (const char *groupName, const char *paramName, int initialValue, bool warnIfAbsent=true)
 
bool arrayPresent (const char *groupName, const char *paramName)
 
const float * arrayValues (const char *groupName, const char *paramName, int *arraySize, bool warnIfAbsent=true)
 
const double * arrayValuesDbl (const char *groupName, const char *paramName, int *arraySize, bool warnIfAbsent=true)
 
int stringPresent (const char *groupName, const char *paramStringName)
 
const char * stringValue (const char *groupName, const char *paramStringName, bool warnIfAbsent=true)
 
ParameterGroupgroup (const char *groupName)
 
const char * groupNameFromIndex (int index)
 
const char * groupKeywordFromIndex (int index)
 
const char * groupKeywordFromName (const char *name)
 
int setParameterSweepValues (int n)
 
int setBatchSweepValues ()
 
int initialize (size_t initialSize)
 
int parseFile (const char *filename)
 
int parseBuffer (const char *buffer, long int bufferLength)
 
int setParameterSweepSize ()
 
int setBatchSweepSize ()
 
int newActiveParamSweep ()
 
int newActiveBatchSweep ()
 
bool hasSweepValue (const char *paramName)
 
int convertParamToInt (double value)
 

int warnUnread ()
 
bool hasBeenRead (const char *group_name, const char *param_name)
 
bool presentAndNotBeenRead (const char *group_name, const char *param_name)
 
void handleUnnecessaryParameter (const char *group_name, const char *param_name)
 
template<typename T >
void handleUnnecessaryParameter (const char *group_name, const char *param_name, T correct_value)
 
void handleUnnecessaryStringParameter (const char *group_name, const char *param_name)
 
void handleUnnecessaryStringParameter (const char *group_name, const char *param_name, const char *correctValue, bool case_insensitive_flag=false)
 
int outputParams (FILE *)
 
void action_pvparams_directive (char *id, double val)
 
void addGroup (char *keyword, char *name)
 
void addActiveParamSweep (const char *group_name, const char *param_name)
 
void addActiveBatchSweep (const char *group_name, const char *param_name)
 
int clearHasBeenReadFlags ()
 

void action_parameter_group_name (char *keyword, char *name)
 
void action_parameter_group ()
 
void action_parameter_def (char *id, double val)
 
void action_parameter_def_overwrite (char *id, double val)
 
void action_parameter_array (char *id)
 
void action_parameter_array_overwrite (char *id)
 
void action_parameter_array_value (double val)
 
void action_parameter_string_def (const char *id, const char *stringval)
 
void action_parameter_string_def_overwrite (const char *id, const char *stringval)
 
void action_parameter_filename_def (const char *id, const char *stringval)
 
void action_parameter_filename_def_overwrite (const char *id, const char *stringval)
 
void action_include_directive (const char *stringval)
 
void action_sweep_open (const char *groupname, const char *paramname)
 
void action_parameter_sweep_close ()
 
void action_parameter_sweep_values_number (double val)
 
void action_parameter_sweep_values_string (const char *stringval)
 
void action_parameter_sweep_values_filename (const char *stringval)
 
void action_batch_sweep_close ()
 
void action_batch_sweep_values_number (double val)
 
void action_batch_sweep_values_string (const char *stringval)
 
void action_batch_sweep_values_filename (const char *stringval)
 
int checkDuplicates (const char *paramName, double val)
 
static char * stripQuotationMarks (const char *s)
 
static char * stripOverwriteTag (const char *s)
 

Public Member Functions

int getBatchSweepSize ()
 
int getParameterSweepSize ()
 
bool getParseStatus ()
 
int numberOfBatchSweeps ()
 
int numberOfGroups ()
 
int numberOfParameterSweeps ()
 

Private Attributes

ParameterSweepactiveBatchSweep
 
ParameterSweepactiveParamSweep
 
ParameterArrayStackarrayStack
 
ParameterSweep ** batchSweeps
 
int batchSweepSize
 
ParameterArraycurrentParamArray
 
char * currGroupKeyword
 
char * currGroupName
 
char * currSweepGroupName
 
char * currSweepParamName
 
bool debugParsing
 
bool disable
 
size_t groupArraySize
 
ParameterGroup ** groups
 
InterColCommicComm
 
int numBatchSweeps
 
int numGroups
 
int numParamSweeps
 
int parameterSweepSize
 
ParameterSweep ** paramSweeps
 
int parseStatus
 
ParameterStackstack
 
ParameterStringStackstringStack
 
int worldRank
 
int worldSize
 

Detailed Description

Definition at line 216 of file PVParams.hpp.

Constructor & Destructor Documentation

PV::PVParams::PVParams ( const char *  filename,
size_t  initialSize,
InterColComm inIcComm 
)

Definition at line 829 of file PVParams.cpp.

Member Function Documentation

void PV::PVParams::action_parameter_def ( char *  id,
double  val 
)

Definition at line 1913 of file PVParams.cpp.

void PV::PVParams::action_pvparams_directive ( char *  id,
double  val 
)

Definition at line 1845 of file PVParams.cpp.

ParameterGroup * PV::PVParams::group ( const char *  groupName)

Definition at line 1555 of file PVParams.cpp.

void PV::PVParams::handleUnnecessaryStringParameter ( const char *  group_name,
const char *  param_name 
)

If the given parameter group has a string parameter with the given parameter name, issue a warning that the string parameter is unnecessary, and mark string parameter as having been read.

Definition at line 1751 of file PVParams.cpp.

void PV::PVParams::handleUnnecessaryStringParameter ( const char *  group_name,
const char *  param_name,
const char *  correctValue,
bool  case_insensitive_flag = false 
)

If the given parameter group has a string parameter with the given parameter name, issue a warning that the string parameter is unnecessary, and mark string parameter as having been read. Additionally, compare the value in params to the given correct value, and exit with an error if they are not equal.

Definition at line 1764 of file PVParams.cpp.

int PV::PVParams::present ( const char *  groupName,
const char *  paramName 
)

Definition at line 1384 of file PVParams.cpp.

double PV::PVParams::value ( const char *  groupName,
const char *  paramName 
)

Definition at line 1402 of file PVParams.cpp.

double PV::PVParams::value ( const char *  groupName,
const char *  paramName,
double  initialValue,
bool  warnIfAbsent = true 
)

Definition at line 1442 of file PVParams.cpp.


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