2#include "../ECF_base.h"
3#include "FloatingPoint.h"
12 "lower bound for each variable (mandatory)");
14 "upper bound for each variable (mandatory)");
16 "number of real valued variables (mandatory)");
25 ECF_LOG_ERROR(state,
"Error: required parameters for FloatingPoint genotype not defined (lbound, ubound, dimension)!");
36 ECF_LOG_ERROR(state,
"Error: 'lbound' must be smaller than 'ubound' for FloatingPoint genotype!");
44 ECF_LOG_ERROR(state,
"Error: 'dimension' must be > 0 for FloatingPoint genotype!");
60 xFloatingPoint = XMLNode::createXMLTopNode(
"FloatingPoint");
61 std::stringstream sValue;
63 xFloatingPoint.addAttribute(
"size", sValue.str().c_str());
68 xFloatingPoint.addText(sValue.str().c_str());
74 XMLCSTR values = xFloatingPoint.getText();
75 std::stringstream sValues;
void read(XMLNode &xFloatingPoint)
Read genotype data from XMLNode.
void registerParameters(StateP state)
Register genotype's parameters (called before Genotype::initialize).
bool initialize(StateP state)
Initialize a genotype object (read parameters, perform sanity check, build data).
void write(XMLNode &xFloatingPoint)
Write genotype data to XMLNode.
voidP getParameterValue(StateP state, std::string name)
Read single parameter value from Registry.
bool registerParameter(StateP state, std::string name, voidP value, enum ECF::type T, std::string description="")
Register a single parameter.
bool isParameterDefined(StateP state, std::string name)
Check if parameter is defined in the configuration.
uint nDimension_
dimensionality
double minValue_
lower bound
double maxValue_
upper bound
std::vector< double > realValue
vector of floating point values