17 using namespace shogun;
40 EStructType stype, EPrimitiveType ptype, int32_t param_version)
70 char* buffer=SG_MALLOC(
char, 200);
71 strcpy(buffer,
"SGParamInfo with: ");
72 strcat(buffer,
"name=\"");
74 strcat(buffer,
"\", type=");
88 strcat(buffer,
"no type");
90 b=SG_MALLOC(
char, 10);
92 strcat(buffer,
", version=");
180 return !(*
this<(other)) && !(*
this==other);
236 : m_map_elements(1), m_multi_map_elements(1)
259 SG_SERROR(
"Versions of parameter mappings from \"%s\" to \"%s\" have"
260 " to differ exactly one\n", s, t);
285 SG_SERROR(
"Call finalize_map() before calling get()\n")
290 index_t index=CMath::binary_search<ParameterMapElement> (
340 if (*current_key != *current->
m_key)
344 current_key=current->
m_key;
351 char* t=current->
m_values->get_element(0)->to_string();
376 SG_SERROR(
"Call finalize_map() before calling print_map()\n")
387 current->
m_values->get_element(j)->print_param_info(
"\t\t");
const SGParamInfo * m_key
Class that holds informations about a certain parameter of an CSGObject. Contains name...
bool append_element(T element)
DynArray< const SGParamInfo * > * get(const SGParamInfo) const
bool operator<(const SGParamInfo &other) const
void print_param_info(const char *prefix="") const
virtual ~ParameterMapElement()
void put(const SGParamInfo *key, const SGParamInfo *value)
DynArray< const SGParamInfo * > * m_values
bool operator>(const ParameterMapElement &other) const
bool operator<(const ParameterMapElement &other) const
bool operator!=(const SGParamInfo &other) const
SGParamInfo * duplicate() const
Datatypes that shogun supports.
Template Dynamic array class that creates an array that can be used like a list or an array...
Class to hold instances of a parameter map. Each element contains a key and a set of values...
DynArray< ParameterMapElement * > m_multi_map_elements
bool operator==(const SGParamInfo &other) const
bool operator>(const SGParamInfo &other) const
void to_string(char *dest, size_t n) const
DynArray< ParameterMapElement * > m_map_elements
bool operator==(const ParameterMapElement &other) const