SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Parameter.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2010 Soeren Sonnenburg
8  * Written (W) 2011-2013 Heiko Strathmann
9  * Copyright (C) 2010 Berlin Institute of Technology
10  */
11 #ifndef __PARAMETER_H__
12 #define __PARAMETER_H__
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/lib/common.h>
17 #include <shogun/lib/DataType.h>
18 #include <shogun/base/DynArray.h>
19 
20 namespace shogun
21 {
22 
23 class CSGObject;
24 class CSerializableFile;
25 template <class ST> class SGString;
26 template <class T> class SGMatrix;
27 template <class T> class SGSparseMatrix;
28 template <class T> class SGVector;
29 template <class T> class SGSparseVector;
30 
32 struct TParameter
33 {
40  explicit TParameter(const TSGDataType* datatype, void* parameter,
41  const char* name, const char* description);
42 
44  ~TParameter();
45 
49  void print(const char* prefix);
50 
55  bool save(CSerializableFile* file, const char* prefix="");
56 
61  bool load(CSerializableFile* file, const char* prefix="");
62 
76  void allocate_data_from_scratch(SGVector<index_t> dims, bool new_cont_call=true);
77 
84  void copy_data(const TParameter* source);
85 
94  bool equals(TParameter* other, float64_t accuracy=0.0, bool tolerant=false);
95 
109  static bool compare_ptype(EPrimitiveType ptype, void* data1, void* data2,
110  float64_t accuracy=0.0, bool tolerant=false);
111 
126  static bool compare_stype(EStructType stype, EPrimitiveType ptype,
127  void* data1, void* data2, float64_t accuracy=0.0, bool tolerant=false);
128 
135  static bool copy_ptype(EPrimitiveType ptype, void* source, void* target);
136 
144  static bool copy_stype(EStructType stype, EPrimitiveType ptype,
145  void* source, void* target);
146 
151  bool copy(TParameter* target);
152 
153 
154 
156  bool operator==(const TParameter& other) const;
157 
159  bool operator<(const TParameter& other) const;
160 
162  bool operator>(const TParameter& other) const;
163 
167  void* m_parameter;
169  char* m_name;
172 
181 
185 
195  uint32_t& hash, uint32_t& carry, uint32_t& total_length);
196 
200  bool is_valid();
201 
202 private:
203  char* new_prefix(const char* s1, const char* s2);
204  void delete_cont();
205  void new_cont(SGVector<index_t> dims);
206  bool new_sgserial(CSGObject** param, EPrimitiveType generic,
207  const char* sgserializable_name,
208  const char* prefix);
209  bool save_ptype(CSerializableFile* file, const void* param,
210  const char* prefix);
211  bool load_ptype(CSerializableFile* file, void* param,
212  const char* prefix);
213  bool save_stype(CSerializableFile* file, const void* param,
214  const char* prefix);
215  bool load_stype(CSerializableFile* file, void* param,
216  const char* prefix);
217 
218 };
219 
226 {
227 public:
229  explicit Parameter();
231  virtual ~Parameter();
232 
236  virtual void print(const char* prefix="");
237 
242  virtual bool save(CSerializableFile* file, const char* prefix="");
243 
244  /* load from serializable file
245  * @param file source file
246  * @param prefix prefix
247  virtual bool load(CSerializableFile* file, const char* prefix="");
248  */
249 
253  virtual int32_t get_num_parameters()
254  {
255  return m_params.get_num_elements();
256  }
257 
266  void set_from_parameters(Parameter* params);
267 
273  void add_parameters(Parameter* params);
274 
279  bool contains_parameter(const char* name);
280 
286  inline TParameter* get_parameter(int32_t idx)
287  {
288  return m_params.get_element(idx);
289  }
290 
296  inline TParameter* get_parameter(const char* name)
297  {
298  TParameter* result=NULL;
299 
300  for (index_t i=0; i<m_params.get_num_elements(); ++i)
301  {
302  result=m_params.get_element(i);
303  if (!strcmp(name, result->m_name))
304  break;
305  else
306  result=NULL;
307  }
308 
309  return result;
310  }
311 
312  /* ************************************************************ */
313  /* Scalar wrappers */
314 
320  void add(bool* param, const char* name,
321  const char* description="");
327  void add(char* param, const char* name,
328  const char* description="");
334  void add(int8_t* param, const char* name,
335  const char* description="");
341  void add(uint8_t* param, const char* name,
342  const char* description="");
348  void add(int16_t* param, const char* name,
349  const char* description="");
355  void add(uint16_t* param, const char* name,
356  const char* description="");
362  void add(int32_t* param, const char* name,
363  const char* description="");
369  void add(uint32_t* param, const char* name,
370  const char* description="");
376  void add(int64_t* param, const char* name,
377  const char* description="");
383  void add(uint64_t* param, const char* name,
384  const char* description="");
390  void add(float32_t* param, const char* name,
391  const char* description="");
397  void add(float64_t* param, const char* name,
398  const char* description="");
404  void add(floatmax_t* param, const char* name,
405  const char* description="");
411  void add(complex128_t* param, const char* name,
412  const char* description="");
418  void add(CSGObject** param,
419  const char* name, const char* description="");
425  void add(SGString<bool>* param, const char* name,
426  const char* description="");
432  void add(SGString<char>* param, const char* name,
433  const char* description="");
439  void add(SGString<int8_t>* param, const char* name,
440  const char* description="");
446  void add(SGString<uint8_t>* param, const char* name,
447  const char* description="");
453  void add(SGString<int16_t>* param, const char* name,
454  const char* description="");
460  void add(SGString<uint16_t>* param, const char* name,
461  const char* description="");
467  void add(SGString<int32_t>* param, const char* name,
468  const char* description="");
474  void add(SGString<uint32_t>* param, const char* name,
475  const char* description="");
481  void add(SGString<int64_t>* param, const char* name,
482  const char* description="");
488  void add(SGString<uint64_t>* param, const char* name,
489  const char* description="");
495  void add(SGString<float32_t>* param, const char* name,
496  const char* description="");
502  void add(SGString<float64_t>* param, const char* name,
503  const char* description="");
509  void add(SGString<floatmax_t>* param, const char* name,
510  const char* description="");
516  void add(SGSparseVector<bool>* param, const char* name,
517  const char* description="");
523  void add(SGSparseVector<char>* param, const char* name,
524  const char* description="");
530  void add(SGSparseVector<int8_t>* param, const char* name,
531  const char* description="");
537  void add(SGSparseVector<uint8_t>* param, const char* name,
538  const char* description="");
544  void add(SGSparseVector<int16_t>* param, const char* name,
545  const char* description="");
551  void add(SGSparseVector<uint16_t>* param, const char* name,
552  const char* description="");
558  void add(SGSparseVector<int32_t>* param, const char* name,
559  const char* description="");
565  void add(SGSparseVector<uint32_t>* param, const char* name,
566  const char* description="");
572  void add(SGSparseVector<int64_t>* param, const char* name,
573  const char* description="");
579  void add(SGSparseVector<uint64_t>* param, const char* name,
580  const char* description="");
586  void add(SGSparseVector<float32_t>* param, const char* name,
587  const char* description="");
593  void add(SGSparseVector<float64_t>* param, const char* name,
594  const char* description="");
600  void add(SGSparseVector<floatmax_t>* param, const char* name,
601  const char* description="");
607  void add(SGSparseVector<complex128_t>* param, const char* name,
608  const char* description="");
609 
610  /* ************************************************************ */
611  /* Vector wrappers */
612 
619  void add_vector(bool** param, index_t* length,
620  const char* name, const char* description="");
627  void add_vector(char** param, index_t* length,
628  const char* name, const char* description="");
635  void add_vector(int8_t** param, index_t* length,
636  const char* name, const char* description="");
643  void add_vector(uint8_t** param, index_t* length,
644  const char* name, const char* description="");
651  void add_vector(int16_t** param, index_t* length,
652  const char* name, const char* description="");
659  void add_vector(uint16_t** param, index_t* length,
660  const char* name, const char* description="");
667  void add_vector(int32_t** param, index_t* length,
668  const char* name, const char* description="");
675  void add_vector(uint32_t** param, index_t* length,
676  const char* name, const char* description="");
683  void add_vector(int64_t** param, index_t* length,
684  const char* name, const char* description="");
691  void add_vector(uint64_t** param, index_t* length,
692  const char* name, const char* description="");
699  void add_vector(float32_t** param, index_t* length,
700  const char* name, const char* description="");
707  void add_vector(float64_t** param, index_t* length,
708  const char* name, const char* description="");
715  void add_vector(floatmax_t** param, index_t* length,
716  const char* name, const char* description="");
723  void add_vector(complex128_t** param, index_t* length,
724  const char* name, const char* description="");
731  void add_vector(CSGObject*** param, index_t* length,
732  const char* name, const char* description="");
739  void add_vector(SGString<bool>** param, index_t* length,
740  const char* name, const char* description="");
747  void add_vector(SGString<char>** param, index_t* length,
748  const char* name, const char* description="");
755  void add_vector(SGString<int8_t>** param, index_t* length,
756  const char* name, const char* description="");
763  void add_vector(SGString<uint8_t>** param, index_t* length,
764  const char* name, const char* description="");
771  void add_vector(SGString<int16_t>** param, index_t* length,
772  const char* name, const char* description="");
779  void add_vector(SGString<uint16_t>** param, index_t* length,
780  const char* name, const char* description="");
787  void add_vector(SGString<int32_t>** param, index_t* length,
788  const char* name, const char* description="");
795  void add_vector(SGString<uint32_t>** param, index_t* length,
796  const char* name, const char* description="");
803  void add_vector(SGString<int64_t>** param, index_t* length,
804  const char* name, const char* description="");
811  void add_vector(SGString<uint64_t>** param, index_t* length,
812  const char* name, const char* description="");
819  void add_vector(SGString<float32_t>** param, index_t* length,
820  const char* name, const char* description="");
827  void add_vector(SGString<float64_t>** param, index_t* length,
828  const char* name, const char* description="");
835  void add_vector(SGString<floatmax_t>** param, index_t* length,
836  const char* name, const char* description="");
843  void add_vector(SGSparseVector<bool>** param, index_t* length,
844  const char* name, const char* description="");
851  void add_vector(SGSparseVector<char>** param, index_t* length,
852  const char* name, const char* description="");
859  void add_vector(SGSparseVector<int8_t>** param, index_t* length,
860  const char* name, const char* description="");
867  void add_vector(SGSparseVector<uint8_t>** param, index_t* length,
868  const char* name, const char* description="");
875  void add_vector(SGSparseVector<int16_t>** param, index_t* length,
876  const char* name, const char* description="");
883  void add_vector(SGSparseVector<uint16_t>** param, index_t* length,
884  const char* name, const char* description="");
891  void add_vector(SGSparseVector<int32_t>** param, index_t* length,
892  const char* name, const char* description="");
899  void add_vector(SGSparseVector<uint32_t>** param, index_t* length,
900  const char* name, const char* description="");
907  void add_vector(SGSparseVector<int64_t>** param, index_t* length,
908  const char* name, const char* description="");
915  void add_vector(SGSparseVector<uint64_t>** param, index_t* length,
916  const char* name, const char* description="");
923  void add_vector(SGSparseVector<float32_t>** param, index_t* length,
924  const char* name, const char* description="");
931  void add_vector(SGSparseVector<float64_t>** param, index_t* length,
932  const char* name, const char* description="");
939  void add_vector(SGSparseVector<floatmax_t>** param, index_t* length,
940  const char* name, const char* description="");
947  void add_vector(SGSparseVector<complex128_t>** param, index_t* length,
948  const char* name, const char* description="");
949 
950 
956  void add(SGVector<bool>* param, const char* name,
957  const char* description="");
963  void add(SGVector<char>* param, const char* name,
964  const char* description="");
970  void add(SGVector<int8_t>* param, const char* name,
971  const char* description="");
977  void add(SGVector<uint8_t>* param, const char* name,
978  const char* description="");
984  void add(SGVector<int16_t>* param, const char* name,
985  const char* description="");
991  void add(SGVector<uint16_t>* param, const char* name,
992  const char* description="");
998  void add(SGVector<int32_t>* param, const char* name,
999  const char* description="");
1005  void add(SGVector<uint32_t>* param, const char* name,
1006  const char* description="");
1012  void add(SGVector<int64_t>* param, const char* name,
1013  const char* description="");
1019  void add(SGVector<uint64_t>* param, const char* name,
1020  const char* description="");
1026  void add(SGVector<float32_t>* param, const char* name,
1027  const char* description="");
1033  void add(SGVector<float64_t>* param, const char* name,
1034  const char* description="");
1040  void add(SGVector<floatmax_t>* param, const char* name,
1041  const char* description="");
1047  void add(SGVector<complex128_t>* param, const char* name,
1048  const char* description="");
1054  void add(SGVector<CSGObject*>* param, const char* name,
1055  const char* description="");
1061  void add(SGVector<SGString<bool> >* param, const char* name,
1062  const char* description="");
1068  void add(SGVector<SGString<char> >* param, const char* name,
1069  const char* description="");
1075  void add(SGVector<SGString<int8_t> >* param, const char* name,
1076  const char* description="");
1082  void add(SGVector<SGString<uint8_t> >* param, const char* name,
1083  const char* description="");
1089  void add(SGVector<SGString<int16_t> >* param, const char* name,
1090  const char* description="");
1096  void add(SGVector<SGString<uint16_t> >* param, const char* name,
1097  const char* description="");
1103  void add(SGVector<SGString<int32_t> >* param, const char* name,
1104  const char* description="");
1110  void add(SGVector<SGString<uint32_t> >* param, const char* name,
1111  const char* description="");
1117  void add(SGVector<SGString<int64_t> >* param, const char* name,
1118  const char* description="");
1124  void add(SGVector<SGString<uint64_t> >* param, const char* name,
1125  const char* description="");
1131  void add(SGVector<SGString<float32_t> >* param, const char* name,
1132  const char* description="");
1138  void add(SGVector<SGString<float64_t> >* param, const char* name,
1139  const char* description="");
1145  void add(SGVector<SGString<floatmax_t> >* param, const char* name,
1146  const char* description="");
1152  void add(SGVector<SGSparseVector<bool> >* param, const char* name,
1153  const char* description="");
1159  void add(SGVector<SGSparseVector<char> >* param, const char* name,
1160  const char* description="");
1166  void add(SGVector<SGSparseVector<int8_t> >* param, const char* name,
1167  const char* description="");
1173  void add(SGVector<SGSparseVector<uint8_t> >* param,const char* name,
1174  const char* description="");
1180  void add(SGVector<SGSparseVector<int16_t> >* param, const char* name,
1181  const char* description="");
1187  void add(SGVector<SGSparseVector<uint16_t> >* param,
1188  const char* name, const char* description="");
1194  void add(SGVector<SGSparseVector<int32_t> >* param, const char* name,
1195  const char* description="");
1201  void add(SGVector<SGSparseVector<uint32_t> >* param,const char* name,
1202  const char* description="");
1208  void add(SGVector<SGSparseVector<int64_t> >* param, const char* name,
1209  const char* description="");
1215  void add(SGVector<SGSparseVector<uint64_t> >* param,
1216  const char* name, const char* description="");
1222  void add(SGVector<SGSparseVector<float32_t> >* param,
1223  const char* name, const char* description="");
1229  void add(SGVector<SGSparseVector<float64_t> >* param,
1230  const char* name, const char* description="");
1236  void add(SGVector<SGSparseVector<floatmax_t> >* param,
1237  const char* name, const char* description="");
1244  const char* name, const char* description="");
1245 
1246  /* ************************************************************ */
1247  /* Matrix wrappers */
1248 
1256  void add_matrix(bool** param,
1257  index_t* length_y, index_t* length_x,
1258  const char* name, const char* description="");
1266  void add_matrix(char** param,
1267  index_t* length_y, index_t* length_x,
1268  const char* name, const char* description="");
1276  void add_matrix(int8_t** param,
1277  index_t* length_y, index_t* length_x,
1278  const char* name, const char* description="");
1286  void add_matrix(uint8_t** param,
1287  index_t* length_y, index_t* length_x,
1288  const char* name, const char* description="");
1296  void add_matrix(int16_t** param,
1297  index_t* length_y, index_t* length_x,
1298  const char* name, const char* description="");
1306  void add_matrix(uint16_t** param,
1307  index_t* length_y, index_t* length_x,
1308  const char* name, const char* description="");
1316  void add_matrix(int32_t** param,
1317  index_t* length_y, index_t* length_x,
1318  const char* name, const char* description="");
1326  void add_matrix(uint32_t** param,
1327  index_t* length_y, index_t* length_x,
1328  const char* name, const char* description="");
1336  void add_matrix(int64_t** param,
1337  index_t* length_y, index_t* length_x,
1338  const char* name, const char* description="");
1346  void add_matrix(uint64_t** param,
1347  index_t* length_y, index_t* length_x,
1348  const char* name, const char* description="");
1356  void add_matrix(float32_t** param,
1357  index_t* length_y, index_t* length_x,
1358  const char* name, const char* description="");
1366  void add_matrix(float64_t** param,
1367  index_t* length_y, index_t* length_x,
1368  const char* name, const char* description="");
1376  void add_matrix(floatmax_t** param,
1377  index_t* length_y, index_t* length_x,
1378  const char* name, const char* description="");
1386  void add_matrix(complex128_t** param,
1387  index_t* length_y, index_t* length_x,
1388  const char* name, const char* description="");
1396  void add_matrix(CSGObject*** param,
1397  index_t* length_y, index_t* length_x,
1398  const char* name, const char* description="");
1406  void add_matrix(SGString<bool>** param,
1407  index_t* length_y, index_t* length_x,
1408  const char* name, const char* description="");
1416  void add_matrix(SGString<char>** param,
1417  index_t* length_y, index_t* length_x,
1418  const char* name, const char* description="");
1426  void add_matrix(SGString<int8_t>** param,
1427  index_t* length_y, index_t* length_x,
1428  const char* name, const char* description="");
1436  void add_matrix(SGString<uint8_t>** param,
1437  index_t* length_y, index_t* length_x,
1438  const char* name, const char* description="");
1446  void add_matrix(SGString<int16_t>** param,
1447  index_t* length_y, index_t* length_x,
1448  const char* name, const char* description="");
1456  void add_matrix(SGString<uint16_t>** param,
1457  index_t* length_y, index_t* length_x,
1458  const char* name, const char* description="");
1466  void add_matrix(SGString<int32_t>** param,
1467  index_t* length_y, index_t* length_x,
1468  const char* name, const char* description="");
1476  void add_matrix(SGString<uint32_t>** param,
1477  index_t* length_y, index_t* length_x,
1478  const char* name, const char* description="");
1486  void add_matrix(SGString<int64_t>** param,
1487  index_t* length_y, index_t* length_x,
1488  const char* name, const char* description="");
1496  void add_matrix(SGString<uint64_t>** param,
1497  index_t* length_y, index_t* length_x,
1498  const char* name, const char* description="");
1506  void add_matrix(SGString<float32_t>** param,
1507  index_t* length_y, index_t* length_x,
1508  const char* name, const char* description="");
1516  void add_matrix(SGString<float64_t>** param,
1517  index_t* length_y, index_t* length_x,
1518  const char* name, const char* description="");
1526  void add_matrix(SGString<floatmax_t>** param,
1527  index_t* length_y, index_t* length_x,
1528  const char* name, const char* description="");
1536  void add_matrix(SGSparseVector<bool>** param,
1537  index_t* length_y, index_t* length_x,
1538  const char* name, const char* description="");
1546  void add_matrix(SGSparseVector<char>** param,
1547  index_t* length_y, index_t* length_x,
1548  const char* name, const char* description="");
1556  void add_matrix(SGSparseVector<int8_t>** param,
1557  index_t* length_y, index_t* length_x,
1558  const char* name, const char* description="");
1566  void add_matrix(SGSparseVector<uint8_t>** param,
1567  index_t* length_y, index_t* length_x,
1568  const char* name, const char* description="");
1576  void add_matrix(SGSparseVector<int16_t>** param,
1577  index_t* length_y, index_t* length_x,
1578  const char* name, const char* description="");
1586  void add_matrix(SGSparseVector<uint16_t>** param,
1587  index_t* length_y, index_t* length_x,
1588  const char* name, const char* description="");
1596  void add_matrix(SGSparseVector<int32_t>** param,
1597  index_t* length_y, index_t* length_x,
1598  const char* name, const char* description="");
1606  void add_matrix(SGSparseVector<uint32_t>** param,
1607  index_t* length_y, index_t* length_x,
1608  const char* name, const char* description="");
1616  void add_matrix(SGSparseVector<int64_t>** param,
1617  index_t* length_y, index_t* length_x,
1618  const char* name, const char* description="");
1626  void add_matrix(SGSparseVector<uint64_t>** param,
1627  index_t* length_y, index_t* length_x,
1628  const char* name, const char* description="");
1637  index_t* length_y, index_t* length_x,
1638  const char* name, const char* description="");
1647  index_t* length_y, index_t* length_x,
1648  const char* name, const char* description="");
1657  index_t* length_y, index_t* length_x,
1658  const char* name, const char* description="");
1667  index_t* length_y, index_t* length_x,
1668  const char* name, const char* description="");
1674  void add(SGMatrix<bool>* param, const char* name,
1675  const char* description="");
1681  void add(SGMatrix<char>* param, const char* name,
1682  const char* description="");
1688  void add(SGMatrix<int8_t>* param, const char* name,
1689  const char* description="");
1695  void add(SGMatrix<uint8_t>* param, const char* name,
1696  const char* description="");
1702  void add(SGMatrix<int16_t>* param, const char* name,
1703  const char* description="");
1709  void add(SGMatrix<uint16_t>* param, const char* name,
1710  const char* description="");
1716  void add(SGMatrix<int32_t>* param, const char* name,
1717  const char* description="");
1723  void add(SGMatrix<uint32_t>* param, const char* name,
1724  const char* description="");
1730  void add(SGMatrix<int64_t>* param, const char* name,
1731  const char* description="");
1737  void add(SGMatrix<uint64_t>* param, const char* name,
1738  const char* description="");
1744  void add(SGMatrix<float32_t>* param, const char* name,
1745  const char* description="");
1751  void add(SGMatrix<float64_t>* param, const char* name,
1752  const char* description="");
1758  void add(SGMatrix<floatmax_t>* param, const char* name,
1759  const char* description="");
1765  void add(SGMatrix<complex128_t>* param, const char* name,
1766  const char* description="");
1772  void add(SGMatrix<CSGObject*>* param, const char* name,
1773  const char* description="");
1779  void add(SGMatrix<SGString<bool> >* param, const char* name,
1780  const char* description="");
1786  void add(SGMatrix<SGString<char> >* param, const char* name,
1787  const char* description="");
1793  void add(SGMatrix<SGString<int8_t> >* param, const char* name,
1794  const char* description="");
1800  void add(SGMatrix<SGString<uint8_t> >* param, const char* name,
1801  const char* description="");
1807  void add(SGMatrix<SGString<int16_t> >* param, const char* name,
1808  const char* description="");
1814  void add(SGMatrix<SGString<uint16_t> >* param, const char* name,
1815  const char* description="");
1821  void add(SGMatrix<SGString<int32_t> >* param, const char* name,
1822  const char* description="");
1828  void add(SGMatrix<SGString<uint32_t> >* param, const char* name,
1829  const char* description="");
1835  void add(SGMatrix<SGString<int64_t> >* param, const char* name,
1836  const char* description="");
1842  void add(SGMatrix<SGString<uint64_t> >* param, const char* name,
1843  const char* description="");
1849  void add(SGMatrix<SGString<float32_t> >* param, const char* name,
1850  const char* description="");
1856  void add(SGMatrix<SGString<float64_t> >* param, const char* name,
1857  const char* description="");
1863  void add(SGMatrix<SGString<floatmax_t> >* param, const char* name,
1864  const char* description="");
1870  void add(SGMatrix<SGSparseVector<bool> >* param, const char* name,
1871  const char* description="");
1877  void add(SGMatrix<SGSparseVector<char> >* param, const char* name,
1878  const char* description="");
1884  void add(SGMatrix<SGSparseVector<int8_t> >* param, const char* name,
1885  const char* description="");
1891  void add(SGMatrix<SGSparseVector<uint8_t> >* param,const char* name,
1892  const char* description="");
1898  void add(SGMatrix<SGSparseVector<int16_t> >* param, const char* name,
1899  const char* description="");
1905  void add(SGMatrix<SGSparseVector<uint16_t> >* param,
1906  const char* name, const char* description="");
1912  void add(SGMatrix<SGSparseVector<int32_t> >* param, const char* name,
1913  const char* description="");
1919  void add(SGMatrix<SGSparseVector<uint32_t> >* param,const char* name,
1920  const char* description="");
1926  void add(SGMatrix<SGSparseVector<int64_t> >* param, const char* name,
1927  const char* description="");
1933  void add(SGMatrix<SGSparseVector<uint64_t> >* param,
1934  const char* name, const char* description="");
1940  void add(SGMatrix<SGSparseVector<float32_t> >* param,
1941  const char* name, const char* description="");
1947  void add(SGMatrix<SGSparseVector<float64_t> >* param,
1948  const char* name, const char* description="");
1954  void add(SGMatrix<SGSparseVector<floatmax_t> >* param,
1955  const char* name, const char* description="");
1962  const char* name, const char* description="");
1963 
1969  void add(SGSparseMatrix<bool>* param,
1970  const char* name, const char* description="");
1976  void add(SGSparseMatrix<char>* param,
1977  const char* name, const char* description="");
1983  void add(SGSparseMatrix<int8_t>* param,
1984  const char* name, const char* description="");
1990  void add(SGSparseMatrix<uint8_t>* param,
1991  const char* name, const char* description="");
1997  void add(SGSparseMatrix<int16_t>* param,
1998  const char* name, const char* description="");
2004  void add(SGSparseMatrix<uint16_t>* param,
2005  const char* name, const char* description="");
2011  void add(SGSparseMatrix<int32_t>* param,
2012  const char* name, const char* description="");
2018  void add(SGSparseMatrix<uint32_t>* param,
2019  const char* name, const char* description="");
2025  void add(SGSparseMatrix<int64_t>* param,
2026  const char* name, const char* description="");
2032  void add(SGSparseMatrix<uint64_t>* param,
2033  const char* name, const char* description="");
2039  void add(SGSparseMatrix<float32_t>* param,
2040  const char* name, const char* description="");
2046  void add(SGSparseMatrix<float64_t>* param,
2047  const char* name, const char* description="");
2053  void add(SGSparseMatrix<floatmax_t>* param,
2054  const char* name, const char* description="");
2060  void add(SGSparseMatrix<complex128_t>* param,
2061  const char* name, const char* description="");
2067  void add(SGSparseMatrix<CSGObject*>* param,
2068  const char* name, const char* description="");
2069 protected:
2070 
2073 
2080  virtual void add_type(const TSGDataType* type, void* param,
2081  const char* name,
2082  const char* description);
2083 };
2084 }
2085 #endif //__PARAMETER_H__

SHOGUN Machine Learning Toolbox - Documentation