SHOGUN  v3.0.0
 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/common.h>
15 #include <shogun/io/SGIO.h>
16 #include <shogun/lib/DataType.h>
17 #include <shogun/lib/SGVector.h>
18 #include <shogun/lib/SGMatrix.h>
21 #include <shogun/base/DynArray.h>
22 
23 namespace shogun
24 {
26 struct TParameter
27 {
34  explicit TParameter(const TSGDataType* datatype, void* parameter,
35  const char* name, const char* description);
36 
38  ~TParameter();
39 
43  void print(const char* prefix);
44 
49  bool save(CSerializableFile* file, const char* prefix="");
50 
55  bool load(CSerializableFile* file, const char* prefix="");
56 
70  void allocate_data_from_scratch(SGVector<index_t> dims, bool new_cont_call=true);
71 
78  void copy_data(const TParameter* source);
79 
87  bool equals(TParameter* other, float64_t accuracy=0.0);
88 
101  static bool compare_ptype(EPrimitiveType ptype, void* data1, void* data2,
102  floatmax_t accuracy=0.0);
103 
118  static bool compare_stype(EStructType stype, EPrimitiveType ptype,
119  void* data1, void* data2, floatmax_t accuracy=0.0);
120 
121  static bool copy_ptype(EPrimitiveType ptype, void* source, void* target);
122  static bool copy_stype(EStructType stype, EPrimitiveType ptype,
123  void* source, void* target);
124  bool copy(TParameter* target);
125 
126 
127 
129  bool operator==(const TParameter& other) const;
130 
132  bool operator<(const TParameter& other) const;
133 
135  bool operator>(const TParameter& other) const;
136 
140  void* m_parameter;
142  char* m_name;
145 
154 
158 
168  uint32_t& hash, uint32_t& carry, uint32_t& total_length);
169 
173  bool is_valid();
174 
175 private:
176  char* new_prefix(const char* s1, const char* s2);
177  void delete_cont();
178  void new_cont(SGVector<index_t> dims);
179  bool new_sgserial(CSGObject** param, EPrimitiveType generic,
180  const char* sgserializable_name,
181  const char* prefix);
182  bool save_ptype(CSerializableFile* file, const void* param,
183  const char* prefix);
184  bool load_ptype(CSerializableFile* file, void* param,
185  const char* prefix);
186  bool save_stype(CSerializableFile* file, const void* param,
187  const char* prefix);
188  bool load_stype(CSerializableFile* file, void* param,
189  const char* prefix);
190 
191 };
192 
199 {
200 public:
202  explicit Parameter();
204  virtual ~Parameter();
205 
209  virtual void print(const char* prefix="");
210 
215  virtual bool save(CSerializableFile* file, const char* prefix="");
216 
217  /* load from serializable file
218  * @param file source file
219  * @param prefix prefix
220  virtual bool load(CSerializableFile* file, const char* prefix="");
221  */
222 
226  virtual int32_t get_num_parameters()
227  {
228  return m_params.get_num_elements();
229  }
230 
239  void set_from_parameters(Parameter* params);
240 
246  void add_parameters(Parameter* params);
247 
252  bool contains_parameter(const char* name);
253 
259  inline TParameter* get_parameter(int32_t idx)
260  {
261  return m_params.get_element(idx);
262  }
263 
269  inline TParameter* get_parameter(const char* name)
270  {
271  TParameter* result=NULL;
272 
273  for (index_t i=0; i<m_params.get_num_elements(); ++i)
274  {
275  result=m_params.get_element(i);
276  if (!strcmp(name, result->m_name))
277  break;
278  else
279  result=NULL;
280  }
281 
282  return result;
283  }
284 
285  /* ************************************************************ */
286  /* Scalar wrappers */
287 
293  void add(bool* param, const char* name,
294  const char* description="");
300  void add(char* param, const char* name,
301  const char* description="");
307  void add(int8_t* param, const char* name,
308  const char* description="");
314  void add(uint8_t* param, const char* name,
315  const char* description="");
321  void add(int16_t* param, const char* name,
322  const char* description="");
328  void add(uint16_t* param, const char* name,
329  const char* description="");
335  void add(int32_t* param, const char* name,
336  const char* description="");
342  void add(uint32_t* param, const char* name,
343  const char* description="");
349  void add(int64_t* param, const char* name,
350  const char* description="");
356  void add(uint64_t* param, const char* name,
357  const char* description="");
363  void add(float32_t* param, const char* name,
364  const char* description="");
370  void add(float64_t* param, const char* name,
371  const char* description="");
377  void add(floatmax_t* param, const char* name,
378  const char* description="");
384  void add(complex128_t* param, const char* name,
385  const char* description="");
391  void add(CSGObject** param,
392  const char* name, const char* description="");
398  void add(SGString<bool>* param, const char* name,
399  const char* description="");
405  void add(SGString<char>* param, const char* name,
406  const char* description="");
412  void add(SGString<int8_t>* param, const char* name,
413  const char* description="");
419  void add(SGString<uint8_t>* param, const char* name,
420  const char* description="");
426  void add(SGString<int16_t>* param, const char* name,
427  const char* description="");
433  void add(SGString<uint16_t>* param, const char* name,
434  const char* description="");
440  void add(SGString<int32_t>* param, const char* name,
441  const char* description="");
447  void add(SGString<uint32_t>* param, const char* name,
448  const char* description="");
454  void add(SGString<int64_t>* param, const char* name,
455  const char* description="");
461  void add(SGString<uint64_t>* param, const char* name,
462  const char* description="");
468  void add(SGString<float32_t>* param, const char* name,
469  const char* description="");
475  void add(SGString<float64_t>* param, const char* name,
476  const char* description="");
482  void add(SGString<floatmax_t>* param, const char* name,
483  const char* description="");
489  void add(SGSparseVector<bool>* param, const char* name,
490  const char* description="");
496  void add(SGSparseVector<char>* param, const char* name,
497  const char* description="");
503  void add(SGSparseVector<int8_t>* param, const char* name,
504  const char* description="");
510  void add(SGSparseVector<uint8_t>* param, const char* name,
511  const char* description="");
517  void add(SGSparseVector<int16_t>* param, const char* name,
518  const char* description="");
524  void add(SGSparseVector<uint16_t>* param, const char* name,
525  const char* description="");
531  void add(SGSparseVector<int32_t>* param, const char* name,
532  const char* description="");
538  void add(SGSparseVector<uint32_t>* param, const char* name,
539  const char* description="");
545  void add(SGSparseVector<int64_t>* param, const char* name,
546  const char* description="");
552  void add(SGSparseVector<uint64_t>* param, const char* name,
553  const char* description="");
559  void add(SGSparseVector<float32_t>* param, const char* name,
560  const char* description="");
566  void add(SGSparseVector<float64_t>* param, const char* name,
567  const char* description="");
573  void add(SGSparseVector<floatmax_t>* param, const char* name,
574  const char* description="");
580  void add(SGSparseVector<complex128_t>* param, const char* name,
581  const char* description="");
582 
583  /* ************************************************************ */
584  /* Vector wrappers */
585 
592  void add_vector(bool** param, index_t* length,
593  const char* name, const char* description="");
600  void add_vector(char** param, index_t* length,
601  const char* name, const char* description="");
608  void add_vector(int8_t** param, index_t* length,
609  const char* name, const char* description="");
616  void add_vector(uint8_t** param, index_t* length,
617  const char* name, const char* description="");
624  void add_vector(int16_t** param, index_t* length,
625  const char* name, const char* description="");
632  void add_vector(uint16_t** param, index_t* length,
633  const char* name, const char* description="");
640  void add_vector(int32_t** param, index_t* length,
641  const char* name, const char* description="");
648  void add_vector(uint32_t** param, index_t* length,
649  const char* name, const char* description="");
656  void add_vector(int64_t** param, index_t* length,
657  const char* name, const char* description="");
664  void add_vector(uint64_t** param, index_t* length,
665  const char* name, const char* description="");
672  void add_vector(float32_t** param, index_t* length,
673  const char* name, const char* description="");
680  void add_vector(float64_t** param, index_t* length,
681  const char* name, const char* description="");
688  void add_vector(floatmax_t** param, index_t* length,
689  const char* name, const char* description="");
696  void add_vector(complex128_t** param, index_t* length,
697  const char* name, const char* description="");
704  void add_vector(CSGObject*** param, index_t* length,
705  const char* name, const char* description="");
712  void add_vector(SGString<bool>** param, index_t* length,
713  const char* name, const char* description="");
720  void add_vector(SGString<char>** param, index_t* length,
721  const char* name, const char* description="");
728  void add_vector(SGString<int8_t>** param, index_t* length,
729  const char* name, const char* description="");
736  void add_vector(SGString<uint8_t>** param, index_t* length,
737  const char* name, const char* description="");
744  void add_vector(SGString<int16_t>** param, index_t* length,
745  const char* name, const char* description="");
752  void add_vector(SGString<uint16_t>** param, index_t* length,
753  const char* name, const char* description="");
760  void add_vector(SGString<int32_t>** param, index_t* length,
761  const char* name, const char* description="");
768  void add_vector(SGString<uint32_t>** param, index_t* length,
769  const char* name, const char* description="");
776  void add_vector(SGString<int64_t>** param, index_t* length,
777  const char* name, const char* description="");
784  void add_vector(SGString<uint64_t>** param, index_t* length,
785  const char* name, const char* description="");
792  void add_vector(SGString<float32_t>** param, index_t* length,
793  const char* name, const char* description="");
800  void add_vector(SGString<float64_t>** param, index_t* length,
801  const char* name, const char* description="");
808  void add_vector(SGString<floatmax_t>** param, index_t* length,
809  const char* name, const char* description="");
816  void add_vector(SGSparseVector<bool>** param, index_t* length,
817  const char* name, const char* description="");
824  void add_vector(SGSparseVector<char>** param, index_t* length,
825  const char* name, const char* description="");
832  void add_vector(SGSparseVector<int8_t>** param, index_t* length,
833  const char* name, const char* description="");
840  void add_vector(SGSparseVector<uint8_t>** param, index_t* length,
841  const char* name, const char* description="");
848  void add_vector(SGSparseVector<int16_t>** param, index_t* length,
849  const char* name, const char* description="");
856  void add_vector(SGSparseVector<uint16_t>** param, index_t* length,
857  const char* name, const char* description="");
864  void add_vector(SGSparseVector<int32_t>** param, index_t* length,
865  const char* name, const char* description="");
872  void add_vector(SGSparseVector<uint32_t>** param, index_t* length,
873  const char* name, const char* description="");
880  void add_vector(SGSparseVector<int64_t>** param, index_t* length,
881  const char* name, const char* description="");
888  void add_vector(SGSparseVector<uint64_t>** param, index_t* length,
889  const char* name, const char* description="");
896  void add_vector(SGSparseVector<float32_t>** param, index_t* length,
897  const char* name, const char* description="");
904  void add_vector(SGSparseVector<float64_t>** param, index_t* length,
905  const char* name, const char* description="");
912  void add_vector(SGSparseVector<floatmax_t>** param, index_t* length,
913  const char* name, const char* description="");
920  void add_vector(SGSparseVector<complex128_t>** param, index_t* length,
921  const char* name, const char* description="");
922 
923 
929  void add(SGVector<bool>* param, const char* name,
930  const char* description="");
936  void add(SGVector<char>* param, const char* name,
937  const char* description="");
943  void add(SGVector<int8_t>* param, const char* name,
944  const char* description="");
950  void add(SGVector<uint8_t>* param, const char* name,
951  const char* description="");
957  void add(SGVector<int16_t>* param, const char* name,
958  const char* description="");
964  void add(SGVector<uint16_t>* param, const char* name,
965  const char* description="");
971  void add(SGVector<int32_t>* param, const char* name,
972  const char* description="");
978  void add(SGVector<uint32_t>* param, const char* name,
979  const char* description="");
985  void add(SGVector<int64_t>* param, const char* name,
986  const char* description="");
992  void add(SGVector<uint64_t>* param, const char* name,
993  const char* description="");
999  void add(SGVector<float32_t>* param, const char* name,
1000  const char* description="");
1006  void add(SGVector<float64_t>* param, const char* name,
1007  const char* description="");
1013  void add(SGVector<floatmax_t>* param, const char* name,
1014  const char* description="");
1020  void add(SGVector<complex128_t>* param, const char* name,
1021  const char* description="");
1027  void add(SGVector<CSGObject*>* param, const char* name,
1028  const char* description="");
1034  void add(SGVector<SGString<bool> >* param, const char* name,
1035  const char* description="");
1041  void add(SGVector<SGString<char> >* param, const char* name,
1042  const char* description="");
1048  void add(SGVector<SGString<int8_t> >* param, const char* name,
1049  const char* description="");
1055  void add(SGVector<SGString<uint8_t> >* param, const char* name,
1056  const char* description="");
1062  void add(SGVector<SGString<int16_t> >* param, const char* name,
1063  const char* description="");
1069  void add(SGVector<SGString<uint16_t> >* param, const char* name,
1070  const char* description="");
1076  void add(SGVector<SGString<int32_t> >* param, const char* name,
1077  const char* description="");
1083  void add(SGVector<SGString<uint32_t> >* param, const char* name,
1084  const char* description="");
1090  void add(SGVector<SGString<int64_t> >* param, const char* name,
1091  const char* description="");
1097  void add(SGVector<SGString<uint64_t> >* param, const char* name,
1098  const char* description="");
1104  void add(SGVector<SGString<float32_t> >* param, const char* name,
1105  const char* description="");
1111  void add(SGVector<SGString<float64_t> >* param, const char* name,
1112  const char* description="");
1118  void add(SGVector<SGString<floatmax_t> >* param, const char* name,
1119  const char* description="");
1125  void add(SGVector<SGSparseVector<bool> >* param, const char* name,
1126  const char* description="");
1132  void add(SGVector<SGSparseVector<char> >* param, const char* name,
1133  const char* description="");
1139  void add(SGVector<SGSparseVector<int8_t> >* param, const char* name,
1140  const char* description="");
1146  void add(SGVector<SGSparseVector<uint8_t> >* param,const char* name,
1147  const char* description="");
1153  void add(SGVector<SGSparseVector<int16_t> >* param, const char* name,
1154  const char* description="");
1160  void add(SGVector<SGSparseVector<uint16_t> >* param,
1161  const char* name, const char* description="");
1167  void add(SGVector<SGSparseVector<int32_t> >* param, const char* name,
1168  const char* description="");
1174  void add(SGVector<SGSparseVector<uint32_t> >* param,const char* name,
1175  const char* description="");
1181  void add(SGVector<SGSparseVector<int64_t> >* param, const char* name,
1182  const char* description="");
1188  void add(SGVector<SGSparseVector<uint64_t> >* param,
1189  const char* name, const char* description="");
1195  void add(SGVector<SGSparseVector<float32_t> >* param,
1196  const char* name, const char* description="");
1202  void add(SGVector<SGSparseVector<float64_t> >* param,
1203  const char* name, const char* description="");
1209  void add(SGVector<SGSparseVector<floatmax_t> >* param,
1210  const char* name, const char* description="");
1217  const char* name, const char* description="");
1218 
1219  /* ************************************************************ */
1220  /* Matrix wrappers */
1221 
1229  void add_matrix(bool** param,
1230  index_t* length_y, index_t* length_x,
1231  const char* name, const char* description="");
1239  void add_matrix(char** param,
1240  index_t* length_y, index_t* length_x,
1241  const char* name, const char* description="");
1249  void add_matrix(int8_t** param,
1250  index_t* length_y, index_t* length_x,
1251  const char* name, const char* description="");
1259  void add_matrix(uint8_t** param,
1260  index_t* length_y, index_t* length_x,
1261  const char* name, const char* description="");
1269  void add_matrix(int16_t** param,
1270  index_t* length_y, index_t* length_x,
1271  const char* name, const char* description="");
1279  void add_matrix(uint16_t** param,
1280  index_t* length_y, index_t* length_x,
1281  const char* name, const char* description="");
1289  void add_matrix(int32_t** param,
1290  index_t* length_y, index_t* length_x,
1291  const char* name, const char* description="");
1299  void add_matrix(uint32_t** param,
1300  index_t* length_y, index_t* length_x,
1301  const char* name, const char* description="");
1309  void add_matrix(int64_t** param,
1310  index_t* length_y, index_t* length_x,
1311  const char* name, const char* description="");
1319  void add_matrix(uint64_t** param,
1320  index_t* length_y, index_t* length_x,
1321  const char* name, const char* description="");
1329  void add_matrix(float32_t** param,
1330  index_t* length_y, index_t* length_x,
1331  const char* name, const char* description="");
1339  void add_matrix(float64_t** param,
1340  index_t* length_y, index_t* length_x,
1341  const char* name, const char* description="");
1349  void add_matrix(floatmax_t** param,
1350  index_t* length_y, index_t* length_x,
1351  const char* name, const char* description="");
1359  void add_matrix(complex128_t** param,
1360  index_t* length_y, index_t* length_x,
1361  const char* name, const char* description="");
1369  void add_matrix(CSGObject*** param,
1370  index_t* length_y, index_t* length_x,
1371  const char* name, const char* description="");
1379  void add_matrix(SGString<bool>** param,
1380  index_t* length_y, index_t* length_x,
1381  const char* name, const char* description="");
1389  void add_matrix(SGString<char>** param,
1390  index_t* length_y, index_t* length_x,
1391  const char* name, const char* description="");
1399  void add_matrix(SGString<int8_t>** param,
1400  index_t* length_y, index_t* length_x,
1401  const char* name, const char* description="");
1409  void add_matrix(SGString<uint8_t>** param,
1410  index_t* length_y, index_t* length_x,
1411  const char* name, const char* description="");
1419  void add_matrix(SGString<int16_t>** param,
1420  index_t* length_y, index_t* length_x,
1421  const char* name, const char* description="");
1429  void add_matrix(SGString<uint16_t>** param,
1430  index_t* length_y, index_t* length_x,
1431  const char* name, const char* description="");
1439  void add_matrix(SGString<int32_t>** param,
1440  index_t* length_y, index_t* length_x,
1441  const char* name, const char* description="");
1449  void add_matrix(SGString<uint32_t>** param,
1450  index_t* length_y, index_t* length_x,
1451  const char* name, const char* description="");
1459  void add_matrix(SGString<int64_t>** param,
1460  index_t* length_y, index_t* length_x,
1461  const char* name, const char* description="");
1469  void add_matrix(SGString<uint64_t>** param,
1470  index_t* length_y, index_t* length_x,
1471  const char* name, const char* description="");
1479  void add_matrix(SGString<float32_t>** param,
1480  index_t* length_y, index_t* length_x,
1481  const char* name, const char* description="");
1489  void add_matrix(SGString<float64_t>** param,
1490  index_t* length_y, index_t* length_x,
1491  const char* name, const char* description="");
1499  void add_matrix(SGString<floatmax_t>** param,
1500  index_t* length_y, index_t* length_x,
1501  const char* name, const char* description="");
1509  void add_matrix(SGSparseVector<bool>** param,
1510  index_t* length_y, index_t* length_x,
1511  const char* name, const char* description="");
1519  void add_matrix(SGSparseVector<char>** param,
1520  index_t* length_y, index_t* length_x,
1521  const char* name, const char* description="");
1529  void add_matrix(SGSparseVector<int8_t>** param,
1530  index_t* length_y, index_t* length_x,
1531  const char* name, const char* description="");
1539  void add_matrix(SGSparseVector<uint8_t>** param,
1540  index_t* length_y, index_t* length_x,
1541  const char* name, const char* description="");
1549  void add_matrix(SGSparseVector<int16_t>** param,
1550  index_t* length_y, index_t* length_x,
1551  const char* name, const char* description="");
1559  void add_matrix(SGSparseVector<uint16_t>** param,
1560  index_t* length_y, index_t* length_x,
1561  const char* name, const char* description="");
1569  void add_matrix(SGSparseVector<int32_t>** param,
1570  index_t* length_y, index_t* length_x,
1571  const char* name, const char* description="");
1579  void add_matrix(SGSparseVector<uint32_t>** param,
1580  index_t* length_y, index_t* length_x,
1581  const char* name, const char* description="");
1589  void add_matrix(SGSparseVector<int64_t>** param,
1590  index_t* length_y, index_t* length_x,
1591  const char* name, const char* description="");
1599  void add_matrix(SGSparseVector<uint64_t>** param,
1600  index_t* length_y, index_t* length_x,
1601  const char* name, const char* description="");
1610  index_t* length_y, index_t* length_x,
1611  const char* name, const char* description="");
1620  index_t* length_y, index_t* length_x,
1621  const char* name, const char* description="");
1630  index_t* length_y, index_t* length_x,
1631  const char* name, const char* description="");
1640  index_t* length_y, index_t* length_x,
1641  const char* name, const char* description="");
1647  void add(SGMatrix<bool>* param, const char* name,
1648  const char* description="");
1654  void add(SGMatrix<char>* param, const char* name,
1655  const char* description="");
1661  void add(SGMatrix<int8_t>* param, const char* name,
1662  const char* description="");
1668  void add(SGMatrix<uint8_t>* param, const char* name,
1669  const char* description="");
1675  void add(SGMatrix<int16_t>* param, const char* name,
1676  const char* description="");
1682  void add(SGMatrix<uint16_t>* param, const char* name,
1683  const char* description="");
1689  void add(SGMatrix<int32_t>* param, const char* name,
1690  const char* description="");
1696  void add(SGMatrix<uint32_t>* param, const char* name,
1697  const char* description="");
1703  void add(SGMatrix<int64_t>* param, const char* name,
1704  const char* description="");
1710  void add(SGMatrix<uint64_t>* param, const char* name,
1711  const char* description="");
1717  void add(SGMatrix<float32_t>* param, const char* name,
1718  const char* description="");
1724  void add(SGMatrix<float64_t>* param, const char* name,
1725  const char* description="");
1731  void add(SGMatrix<floatmax_t>* param, const char* name,
1732  const char* description="");
1738  void add(SGMatrix<complex128_t>* param, const char* name,
1739  const char* description="");
1745  void add(SGMatrix<CSGObject*>* param, const char* name,
1746  const char* description="");
1752  void add(SGMatrix<SGString<bool> >* param, const char* name,
1753  const char* description="");
1759  void add(SGMatrix<SGString<char> >* param, const char* name,
1760  const char* description="");
1766  void add(SGMatrix<SGString<int8_t> >* param, const char* name,
1767  const char* description="");
1773  void add(SGMatrix<SGString<uint8_t> >* param, const char* name,
1774  const char* description="");
1780  void add(SGMatrix<SGString<int16_t> >* param, const char* name,
1781  const char* description="");
1787  void add(SGMatrix<SGString<uint16_t> >* param, const char* name,
1788  const char* description="");
1794  void add(SGMatrix<SGString<int32_t> >* param, const char* name,
1795  const char* description="");
1801  void add(SGMatrix<SGString<uint32_t> >* param, const char* name,
1802  const char* description="");
1808  void add(SGMatrix<SGString<int64_t> >* param, const char* name,
1809  const char* description="");
1815  void add(SGMatrix<SGString<uint64_t> >* param, const char* name,
1816  const char* description="");
1822  void add(SGMatrix<SGString<float32_t> >* param, const char* name,
1823  const char* description="");
1829  void add(SGMatrix<SGString<float64_t> >* param, const char* name,
1830  const char* description="");
1836  void add(SGMatrix<SGString<floatmax_t> >* param, const char* name,
1837  const char* description="");
1843  void add(SGMatrix<SGSparseVector<bool> >* param, const char* name,
1844  const char* description="");
1850  void add(SGMatrix<SGSparseVector<char> >* param, const char* name,
1851  const char* description="");
1857  void add(SGMatrix<SGSparseVector<int8_t> >* param, const char* name,
1858  const char* description="");
1864  void add(SGMatrix<SGSparseVector<uint8_t> >* param,const char* name,
1865  const char* description="");
1871  void add(SGMatrix<SGSparseVector<int16_t> >* param, const char* name,
1872  const char* description="");
1878  void add(SGMatrix<SGSparseVector<uint16_t> >* param,
1879  const char* name, const char* description="");
1885  void add(SGMatrix<SGSparseVector<int32_t> >* param, const char* name,
1886  const char* description="");
1892  void add(SGMatrix<SGSparseVector<uint32_t> >* param,const char* name,
1893  const char* description="");
1899  void add(SGMatrix<SGSparseVector<int64_t> >* param, const char* name,
1900  const char* description="");
1906  void add(SGMatrix<SGSparseVector<uint64_t> >* param,
1907  const char* name, const char* description="");
1913  void add(SGMatrix<SGSparseVector<float32_t> >* param,
1914  const char* name, const char* description="");
1920  void add(SGMatrix<SGSparseVector<float64_t> >* param,
1921  const char* name, const char* description="");
1927  void add(SGMatrix<SGSparseVector<floatmax_t> >* param,
1928  const char* name, const char* description="");
1935  const char* name, const char* description="");
1936 
1942  void add(SGSparseMatrix<bool>* param,
1943  const char* name, const char* description="");
1949  void add(SGSparseMatrix<char>* param,
1950  const char* name, const char* description="");
1956  void add(SGSparseMatrix<int8_t>* param,
1957  const char* name, const char* description="");
1963  void add(SGSparseMatrix<uint8_t>* param,
1964  const char* name, const char* description="");
1970  void add(SGSparseMatrix<int16_t>* param,
1971  const char* name, const char* description="");
1977  void add(SGSparseMatrix<uint16_t>* param,
1978  const char* name, const char* description="");
1984  void add(SGSparseMatrix<int32_t>* param,
1985  const char* name, const char* description="");
1991  void add(SGSparseMatrix<uint32_t>* param,
1992  const char* name, const char* description="");
1998  void add(SGSparseMatrix<int64_t>* param,
1999  const char* name, const char* description="");
2005  void add(SGSparseMatrix<uint64_t>* param,
2006  const char* name, const char* description="");
2012  void add(SGSparseMatrix<float32_t>* param,
2013  const char* name, const char* description="");
2019  void add(SGSparseMatrix<float64_t>* param,
2020  const char* name, const char* description="");
2026  void add(SGSparseMatrix<floatmax_t>* param,
2027  const char* name, const char* description="");
2033  void add(SGSparseMatrix<complex128_t>* param,
2034  const char* name, const char* description="");
2040  void add(SGSparseMatrix<CSGObject*>* param,
2041  const char* name, const char* description="");
2042 protected:
2043 
2046 
2053  virtual void add_type(const TSGDataType* type, void* param,
2054  const char* name,
2055  const char* description);
2056 };
2057 }
2058 #endif //__PARAMETER_H__

SHOGUN Machine Learning Toolbox - Documentation