11 #ifndef __PARAMETER_H__
12 #define __PARAMETER_H__
24 class CSerializableFile;
41 const char* name,
const char* description);
49 void print(
const char* prefix);
86 static bool compare_ptype(EPrimitiveType ptype,
void* data1,
void* data2,
87 float64_t accuracy=0.0,
bool tolerant=
false);
103 static bool compare_stype(EStructType stype, EPrimitiveType ptype,
104 void* data1,
void* data2,
float64_t accuracy=0.0,
bool tolerant=
false);
112 static bool copy_ptype(EPrimitiveType ptype,
void* source,
void* target);
121 static bool copy_stype(EStructType stype, EPrimitiveType ptype,
122 void* source,
void* target);
158 uint32_t& hash, uint32_t& carry, uint32_t& total_length);
166 char* new_prefix(
const char* s1,
const char* s2);
169 bool new_sgserial(
CSGObject** param, EPrimitiveType
generic,
170 const char* sgserializable_name,
199 virtual void print(
const char* prefix=
"");
266 if (!strcmp(name, result->
m_name))
283 void add(
bool* param,
const char* name,
284 const char* description=
"");
290 void add(
char* param,
const char* name,
291 const char* description=
"");
297 void add(int8_t* param,
const char* name,
298 const char* description=
"");
304 void add(uint8_t* param,
const char* name,
305 const char* description=
"");
311 void add(int16_t* param,
const char* name,
312 const char* description=
"");
318 void add(uint16_t* param,
const char* name,
319 const char* description=
"");
325 void add(int32_t* param,
const char* name,
326 const char* description=
"");
332 void add(uint32_t* param,
const char* name,
333 const char* description=
"");
339 void add(int64_t* param,
const char* name,
340 const char* description=
"");
346 void add(uint64_t* param,
const char* name,
347 const char* description=
"");
354 const char* description=
"");
361 const char* description=
"");
368 const char* description=
"");
375 const char* description=
"");
382 const char* name,
const char* description=
"");
389 const char* description=
"");
396 const char* description=
"");
403 const char* description=
"");
410 const char* description=
"");
417 const char* description=
"");
424 const char* description=
"");
431 const char* description=
"");
438 const char* description=
"");
445 const char* description=
"");
452 const char* description=
"");
459 const char* description=
"");
466 const char* description=
"");
473 const char* description=
"");
480 const char* description=
"");
487 const char* description=
"");
494 const char* description=
"");
501 const char* description=
"");
508 const char* description=
"");
515 const char* description=
"");
522 const char* description=
"");
529 const char* description=
"");
536 const char* description=
"");
543 const char* description=
"");
550 const char* description=
"");
557 const char* description=
"");
564 const char* description=
"");
571 const char* description=
"");
583 const char* name,
const char* description=
"");
591 const char* name,
const char* description=
"");
599 const char* name,
const char* description=
"");
607 const char* name,
const char* description=
"");
615 const char* name,
const char* description=
"");
623 const char* name,
const char* description=
"");
631 const char* name,
const char* description=
"");
639 const char* name,
const char* description=
"");
647 const char* name,
const char* description=
"");
655 const char* name,
const char* description=
"");
663 const char* name,
const char* description=
"");
671 const char* name,
const char* description=
"");
679 const char* name,
const char* description=
"");
687 const char* name,
const char* description=
"");
695 const char* name,
const char* description=
"");
703 const char* name,
const char* description=
"");
711 const char* name,
const char* description=
"");
719 const char* name,
const char* description=
"");
727 const char* name,
const char* description=
"");
735 const char* name,
const char* description=
"");
743 const char* name,
const char* description=
"");
751 const char* name,
const char* description=
"");
759 const char* name,
const char* description=
"");
767 const char* name,
const char* description=
"");
775 const char* name,
const char* description=
"");
783 const char* name,
const char* description=
"");
791 const char* name,
const char* description=
"");
799 const char* name,
const char* description=
"");
807 const char* name,
const char* description=
"");
815 const char* name,
const char* description=
"");
823 const char* name,
const char* description=
"");
831 const char* name,
const char* description=
"");
839 const char* name,
const char* description=
"");
847 const char* name,
const char* description=
"");
855 const char* name,
const char* description=
"");
863 const char* name,
const char* description=
"");
871 const char* name,
const char* description=
"");
879 const char* name,
const char* description=
"");
887 const char* name,
const char* description=
"");
895 const char* name,
const char* description=
"");
903 const char* name,
const char* description=
"");
911 const char* name,
const char* description=
"");
920 const char* description=
"");
927 const char* description=
"");
934 const char* description=
"");
941 const char* description=
"");
948 const char* description=
"");
955 const char* description=
"");
962 const char* description=
"");
969 const char* description=
"");
976 const char* description=
"");
983 const char* description=
"");
990 const char* description=
"");
997 const char* description=
"");
1004 const char* description=
"");
1011 const char* description=
"");
1018 const char* description=
"");
1025 const char* description=
"");
1032 const char* description=
"");
1039 const char* description=
"");
1046 const char* description=
"");
1053 const char* description=
"");
1060 const char* description=
"");
1067 const char* description=
"");
1074 const char* description=
"");
1081 const char* description=
"");
1088 const char* description=
"");
1095 const char* description=
"");
1102 const char* description=
"");
1109 const char* description=
"");
1116 const char* description=
"");
1123 const char* description=
"");
1130 const char* description=
"");
1137 const char* description=
"");
1144 const char* description=
"");
1151 const char* name,
const char* description=
"");
1158 const char* description=
"");
1165 const char* description=
"");
1172 const char* description=
"");
1179 const char* name,
const char* description=
"");
1186 const char* name,
const char* description=
"");
1193 const char* name,
const char* description=
"");
1200 const char* name,
const char* description=
"");
1207 const char* name,
const char* description=
"");
1221 const char* name,
const char* description=
"");
1231 const char* name,
const char* description=
"");
1241 const char* name,
const char* description=
"");
1251 const char* name,
const char* description=
"");
1261 const char* name,
const char* description=
"");
1271 const char* name,
const char* description=
"");
1281 const char* name,
const char* description=
"");
1291 const char* name,
const char* description=
"");
1301 const char* name,
const char* description=
"");
1311 const char* name,
const char* description=
"");
1321 const char* name,
const char* description=
"");
1331 const char* name,
const char* description=
"");
1341 const char* name,
const char* description=
"");
1351 const char* name,
const char* description=
"");
1361 const char* name,
const char* description=
"");
1371 const char* name,
const char* description=
"");
1381 const char* name,
const char* description=
"");
1391 const char* name,
const char* description=
"");
1401 const char* name,
const char* description=
"");
1411 const char* name,
const char* description=
"");
1421 const char* name,
const char* description=
"");
1431 const char* name,
const char* description=
"");
1441 const char* name,
const char* description=
"");
1451 const char* name,
const char* description=
"");
1461 const char* name,
const char* description=
"");
1471 const char* name,
const char* description=
"");
1481 const char* name,
const char* description=
"");
1491 const char* name,
const char* description=
"");
1501 const char* name,
const char* description=
"");
1511 const char* name,
const char* description=
"");
1521 const char* name,
const char* description=
"");
1531 const char* name,
const char* description=
"");
1541 const char* name,
const char* description=
"");
1551 const char* name,
const char* description=
"");
1561 const char* name,
const char* description=
"");
1571 const char* name,
const char* description=
"");
1581 const char* name,
const char* description=
"");
1591 const char* name,
const char* description=
"");
1601 const char* name,
const char* description=
"");
1611 const char* name,
const char* description=
"");
1621 const char* name,
const char* description=
"");
1631 const char* name,
const char* description=
"");
1638 const char* description=
"");
1645 const char* description=
"");
1652 const char* description=
"");
1659 const char* description=
"");
1666 const char* description=
"");
1673 const char* description=
"");
1680 const char* description=
"");
1687 const char* description=
"");
1694 const char* description=
"");
1701 const char* description=
"");
1708 const char* description=
"");
1715 const char* description=
"");
1722 const char* description=
"");
1729 const char* description=
"");
1736 const char* description=
"");
1743 const char* description=
"");
1750 const char* description=
"");
1757 const char* description=
"");
1764 const char* description=
"");
1771 const char* description=
"");
1778 const char* description=
"");
1785 const char* description=
"");
1792 const char* description=
"");
1799 const char* description=
"");
1806 const char* description=
"");
1813 const char* description=
"");
1820 const char* description=
"");
1827 const char* description=
"");
1834 const char* description=
"");
1841 const char* description=
"");
1848 const char* description=
"");
1855 const char* description=
"");
1862 const char* description=
"");
1869 const char* name,
const char* description=
"");
1876 const char* description=
"");
1883 const char* description=
"");
1890 const char* description=
"");
1897 const char* name,
const char* description=
"");
1904 const char* name,
const char* description=
"");
1911 const char* name,
const char* description=
"");
1918 const char* name,
const char* description=
"");
1925 const char* name,
const char* description=
"");
1933 const char* name,
const char* description=
"");
1940 const char* name,
const char* description=
"");
1947 const char* name,
const char* description=
"");
1954 const char* name,
const char* description=
"");
1961 const char* name,
const char* description=
"");
1968 const char* name,
const char* description=
"");
1975 const char* name,
const char* description=
"");
1982 const char* name,
const char* description=
"");
1989 const char* name,
const char* description=
"");
1996 const char* name,
const char* description=
"");
2003 const char* name,
const char* description=
"");
2010 const char* name,
const char* description=
"");
2017 const char* name,
const char* description=
"");
2024 const char* name,
const char* description=
"");
2031 const char* name,
const char* description=
"");
2045 const char* description);
2048 #endif //__PARAMETER_H__
TParameter * get_parameter(const char *name)
template class SGSparseMatrix
std::complex< float64_t > complex128_t
virtual int32_t get_num_parameters()
bool operator==(const TParameter &other) const
TParameter * get_parameter(int32_t idx)
static bool compare_stype(EStructType stype, EPrimitiveType ptype, void *data1, void *data2, float64_t accuracy=0.0, bool tolerant=false)
virtual void print(const char *prefix="")
Datatypes that shogun supports.
virtual bool load(CSerializableFile *file, const char *prefix="")
bool operator<(const TParameter &other) const
bool equals(TParameter *other, float64_t accuracy=0.0, bool tolerant=false)
virtual void add_type(const TSGDataType *type, void *param, const char *name, const char *description)
bool save(CSerializableFile *file, const char *prefix="")
TParameter(const TSGDataType *datatype, void *parameter, const char *name, const char *description)
void add(bool *param, const char *name, const char *description="")
DynArray< TParameter * > m_params
static bool compare_ptype(EPrimitiveType ptype, void *data1, void *data2, float64_t accuracy=0.0, bool tolerant=false)
Class SGObject is the base class of all shogun objects.
Template Dynamic array class that creates an array that can be used like a list or an array...
virtual bool save(CSerializableFile *file, const char *prefix="")
void print(const char *prefix)
static bool copy_ptype(EPrimitiveType ptype, void *source, void *target)
void get_incremental_hash(uint32_t &hash, uint32_t &carry, uint32_t &total_length)
void set_from_parameters(Parameter *params)
bool contains_parameter(const char *name)
void add_vector(bool **param, index_t *length, const char *name, const char *description="")
all of classes and functions are contained in the shogun namespace
bool load(CSerializableFile *file, const char *prefix="")
void add_parameters(Parameter *params)
bool copy(TParameter *target)
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...
void add_matrix(bool **param, index_t *length_y, index_t *length_x, const char *name, const char *description="")
static bool copy_stype(EStructType stype, EPrimitiveType ptype, void *source, void *target)
bool operator>(const TParameter &other) const