SHOGUN
v3.2.0
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2010 Soeren Sonnenburg 00008 * Written (W) 2011-2013 Heiko Strathmann 00009 * Copyright (C) 2010 Berlin Institute of Technology 00010 */ 00011 #ifndef __PARAMETER_H__ 00012 #define __PARAMETER_H__ 00013 00014 #include <shogun/lib/common.h> 00015 #include <shogun/io/SGIO.h> 00016 #include <shogun/lib/DataType.h> 00017 #include <shogun/lib/SGVector.h> 00018 #include <shogun/lib/SGMatrix.h> 00019 #include <shogun/lib/SGSparseMatrix.h> 00020 #include <shogun/io/SerializableFile.h> 00021 #include <shogun/base/DynArray.h> 00022 00023 namespace shogun 00024 { 00026 struct TParameter 00027 { 00034 explicit TParameter(const TSGDataType* datatype, void* parameter, 00035 const char* name, const char* description); 00036 00038 ~TParameter(); 00039 00043 void print(const char* prefix); 00044 00049 bool save(CSerializableFile* file, const char* prefix=""); 00050 00055 bool load(CSerializableFile* file, const char* prefix=""); 00056 00070 void allocate_data_from_scratch(SGVector<index_t> dims, bool new_cont_call=true); 00071 00078 void copy_data(const TParameter* source); 00079 00087 bool equals(TParameter* other, float64_t accuracy=0.0); 00088 00101 static bool compare_ptype(EPrimitiveType ptype, void* data1, void* data2, 00102 floatmax_t accuracy=0.0); 00103 00117 static bool compare_stype(EStructType stype, EPrimitiveType ptype, 00118 void* data1, void* data2, floatmax_t accuracy=0.0); 00119 00126 static bool copy_ptype(EPrimitiveType ptype, void* source, void* target); 00127 00135 static bool copy_stype(EStructType stype, EPrimitiveType ptype, 00136 void* source, void* target); 00137 00142 bool copy(TParameter* target); 00143 00144 00145 00147 bool operator==(const TParameter& other) const; 00148 00150 bool operator<(const TParameter& other) const; 00151 00153 bool operator>(const TParameter& other) const; 00154 00156 TSGDataType m_datatype; 00158 void* m_parameter; 00160 char* m_name; 00162 char* m_description; 00163 00171 bool m_delete_data; 00172 00175 bool m_was_allocated_from_scratch; 00176 00185 void get_incremental_hash( 00186 uint32_t& hash, uint32_t& carry, uint32_t& total_length); 00187 00191 bool is_valid(); 00192 00193 private: 00194 char* new_prefix(const char* s1, const char* s2); 00195 void delete_cont(); 00196 void new_cont(SGVector<index_t> dims); 00197 bool new_sgserial(CSGObject** param, EPrimitiveType generic, 00198 const char* sgserializable_name, 00199 const char* prefix); 00200 bool save_ptype(CSerializableFile* file, const void* param, 00201 const char* prefix); 00202 bool load_ptype(CSerializableFile* file, void* param, 00203 const char* prefix); 00204 bool save_stype(CSerializableFile* file, const void* param, 00205 const char* prefix); 00206 bool load_stype(CSerializableFile* file, void* param, 00207 const char* prefix); 00208 00209 }; 00210 00216 class Parameter 00217 { 00218 public: 00220 explicit Parameter(); 00222 virtual ~Parameter(); 00223 00227 virtual void print(const char* prefix=""); 00228 00233 virtual bool save(CSerializableFile* file, const char* prefix=""); 00234 00235 /* load from serializable file 00236 * @param file source file 00237 * @param prefix prefix 00238 virtual bool load(CSerializableFile* file, const char* prefix=""); 00239 */ 00240 00244 virtual int32_t get_num_parameters() 00245 { 00246 return m_params.get_num_elements(); 00247 } 00248 00257 void set_from_parameters(Parameter* params); 00258 00264 void add_parameters(Parameter* params); 00265 00270 bool contains_parameter(const char* name); 00271 00277 inline TParameter* get_parameter(int32_t idx) 00278 { 00279 return m_params.get_element(idx); 00280 } 00281 00287 inline TParameter* get_parameter(const char* name) 00288 { 00289 TParameter* result=NULL; 00290 00291 for (index_t i=0; i<m_params.get_num_elements(); ++i) 00292 { 00293 result=m_params.get_element(i); 00294 if (!strcmp(name, result->m_name)) 00295 break; 00296 else 00297 result=NULL; 00298 } 00299 00300 return result; 00301 } 00302 00303 /* ************************************************************ */ 00304 /* Scalar wrappers */ 00305 00311 void add(bool* param, const char* name, 00312 const char* description=""); 00318 void add(char* param, const char* name, 00319 const char* description=""); 00325 void add(int8_t* param, const char* name, 00326 const char* description=""); 00332 void add(uint8_t* param, const char* name, 00333 const char* description=""); 00339 void add(int16_t* param, const char* name, 00340 const char* description=""); 00346 void add(uint16_t* param, const char* name, 00347 const char* description=""); 00353 void add(int32_t* param, const char* name, 00354 const char* description=""); 00360 void add(uint32_t* param, const char* name, 00361 const char* description=""); 00367 void add(int64_t* param, const char* name, 00368 const char* description=""); 00374 void add(uint64_t* param, const char* name, 00375 const char* description=""); 00381 void add(float32_t* param, const char* name, 00382 const char* description=""); 00388 void add(float64_t* param, const char* name, 00389 const char* description=""); 00395 void add(floatmax_t* param, const char* name, 00396 const char* description=""); 00402 void add(complex128_t* param, const char* name, 00403 const char* description=""); 00409 void add(CSGObject** param, 00410 const char* name, const char* description=""); 00416 void add(SGString<bool>* param, const char* name, 00417 const char* description=""); 00423 void add(SGString<char>* param, const char* name, 00424 const char* description=""); 00430 void add(SGString<int8_t>* param, const char* name, 00431 const char* description=""); 00437 void add(SGString<uint8_t>* param, const char* name, 00438 const char* description=""); 00444 void add(SGString<int16_t>* param, const char* name, 00445 const char* description=""); 00451 void add(SGString<uint16_t>* param, const char* name, 00452 const char* description=""); 00458 void add(SGString<int32_t>* param, const char* name, 00459 const char* description=""); 00465 void add(SGString<uint32_t>* param, const char* name, 00466 const char* description=""); 00472 void add(SGString<int64_t>* param, const char* name, 00473 const char* description=""); 00479 void add(SGString<uint64_t>* param, const char* name, 00480 const char* description=""); 00486 void add(SGString<float32_t>* param, const char* name, 00487 const char* description=""); 00493 void add(SGString<float64_t>* param, const char* name, 00494 const char* description=""); 00500 void add(SGString<floatmax_t>* param, const char* name, 00501 const char* description=""); 00507 void add(SGSparseVector<bool>* param, const char* name, 00508 const char* description=""); 00514 void add(SGSparseVector<char>* param, const char* name, 00515 const char* description=""); 00521 void add(SGSparseVector<int8_t>* param, const char* name, 00522 const char* description=""); 00528 void add(SGSparseVector<uint8_t>* param, const char* name, 00529 const char* description=""); 00535 void add(SGSparseVector<int16_t>* param, const char* name, 00536 const char* description=""); 00542 void add(SGSparseVector<uint16_t>* param, const char* name, 00543 const char* description=""); 00549 void add(SGSparseVector<int32_t>* param, const char* name, 00550 const char* description=""); 00556 void add(SGSparseVector<uint32_t>* param, const char* name, 00557 const char* description=""); 00563 void add(SGSparseVector<int64_t>* param, const char* name, 00564 const char* description=""); 00570 void add(SGSparseVector<uint64_t>* param, const char* name, 00571 const char* description=""); 00577 void add(SGSparseVector<float32_t>* param, const char* name, 00578 const char* description=""); 00584 void add(SGSparseVector<float64_t>* param, const char* name, 00585 const char* description=""); 00591 void add(SGSparseVector<floatmax_t>* param, const char* name, 00592 const char* description=""); 00598 void add(SGSparseVector<complex128_t>* param, const char* name, 00599 const char* description=""); 00600 00601 /* ************************************************************ */ 00602 /* Vector wrappers */ 00603 00610 void add_vector(bool** param, index_t* length, 00611 const char* name, const char* description=""); 00618 void add_vector(char** param, index_t* length, 00619 const char* name, const char* description=""); 00626 void add_vector(int8_t** param, index_t* length, 00627 const char* name, const char* description=""); 00634 void add_vector(uint8_t** param, index_t* length, 00635 const char* name, const char* description=""); 00642 void add_vector(int16_t** param, index_t* length, 00643 const char* name, const char* description=""); 00650 void add_vector(uint16_t** param, index_t* length, 00651 const char* name, const char* description=""); 00658 void add_vector(int32_t** param, index_t* length, 00659 const char* name, const char* description=""); 00666 void add_vector(uint32_t** param, index_t* length, 00667 const char* name, const char* description=""); 00674 void add_vector(int64_t** param, index_t* length, 00675 const char* name, const char* description=""); 00682 void add_vector(uint64_t** param, index_t* length, 00683 const char* name, const char* description=""); 00690 void add_vector(float32_t** param, index_t* length, 00691 const char* name, const char* description=""); 00698 void add_vector(float64_t** param, index_t* length, 00699 const char* name, const char* description=""); 00706 void add_vector(floatmax_t** param, index_t* length, 00707 const char* name, const char* description=""); 00714 void add_vector(complex128_t** param, index_t* length, 00715 const char* name, const char* description=""); 00722 void add_vector(CSGObject*** param, index_t* length, 00723 const char* name, const char* description=""); 00730 void add_vector(SGString<bool>** param, index_t* length, 00731 const char* name, const char* description=""); 00738 void add_vector(SGString<char>** param, index_t* length, 00739 const char* name, const char* description=""); 00746 void add_vector(SGString<int8_t>** param, index_t* length, 00747 const char* name, const char* description=""); 00754 void add_vector(SGString<uint8_t>** param, index_t* length, 00755 const char* name, const char* description=""); 00762 void add_vector(SGString<int16_t>** param, index_t* length, 00763 const char* name, const char* description=""); 00770 void add_vector(SGString<uint16_t>** param, index_t* length, 00771 const char* name, const char* description=""); 00778 void add_vector(SGString<int32_t>** param, index_t* length, 00779 const char* name, const char* description=""); 00786 void add_vector(SGString<uint32_t>** param, index_t* length, 00787 const char* name, const char* description=""); 00794 void add_vector(SGString<int64_t>** param, index_t* length, 00795 const char* name, const char* description=""); 00802 void add_vector(SGString<uint64_t>** param, index_t* length, 00803 const char* name, const char* description=""); 00810 void add_vector(SGString<float32_t>** param, index_t* length, 00811 const char* name, const char* description=""); 00818 void add_vector(SGString<float64_t>** param, index_t* length, 00819 const char* name, const char* description=""); 00826 void add_vector(SGString<floatmax_t>** param, index_t* length, 00827 const char* name, const char* description=""); 00834 void add_vector(SGSparseVector<bool>** param, index_t* length, 00835 const char* name, const char* description=""); 00842 void add_vector(SGSparseVector<char>** param, index_t* length, 00843 const char* name, const char* description=""); 00850 void add_vector(SGSparseVector<int8_t>** param, index_t* length, 00851 const char* name, const char* description=""); 00858 void add_vector(SGSparseVector<uint8_t>** param, index_t* length, 00859 const char* name, const char* description=""); 00866 void add_vector(SGSparseVector<int16_t>** param, index_t* length, 00867 const char* name, const char* description=""); 00874 void add_vector(SGSparseVector<uint16_t>** param, index_t* length, 00875 const char* name, const char* description=""); 00882 void add_vector(SGSparseVector<int32_t>** param, index_t* length, 00883 const char* name, const char* description=""); 00890 void add_vector(SGSparseVector<uint32_t>** param, index_t* length, 00891 const char* name, const char* description=""); 00898 void add_vector(SGSparseVector<int64_t>** param, index_t* length, 00899 const char* name, const char* description=""); 00906 void add_vector(SGSparseVector<uint64_t>** param, index_t* length, 00907 const char* name, const char* description=""); 00914 void add_vector(SGSparseVector<float32_t>** param, index_t* length, 00915 const char* name, const char* description=""); 00922 void add_vector(SGSparseVector<float64_t>** param, index_t* length, 00923 const char* name, const char* description=""); 00930 void add_vector(SGSparseVector<floatmax_t>** param, index_t* length, 00931 const char* name, const char* description=""); 00938 void add_vector(SGSparseVector<complex128_t>** param, index_t* length, 00939 const char* name, const char* description=""); 00940 00941 00947 void add(SGVector<bool>* param, const char* name, 00948 const char* description=""); 00954 void add(SGVector<char>* param, const char* name, 00955 const char* description=""); 00961 void add(SGVector<int8_t>* param, const char* name, 00962 const char* description=""); 00968 void add(SGVector<uint8_t>* param, const char* name, 00969 const char* description=""); 00975 void add(SGVector<int16_t>* param, const char* name, 00976 const char* description=""); 00982 void add(SGVector<uint16_t>* param, const char* name, 00983 const char* description=""); 00989 void add(SGVector<int32_t>* param, const char* name, 00990 const char* description=""); 00996 void add(SGVector<uint32_t>* param, const char* name, 00997 const char* description=""); 01003 void add(SGVector<int64_t>* param, const char* name, 01004 const char* description=""); 01010 void add(SGVector<uint64_t>* param, const char* name, 01011 const char* description=""); 01017 void add(SGVector<float32_t>* param, const char* name, 01018 const char* description=""); 01024 void add(SGVector<float64_t>* param, const char* name, 01025 const char* description=""); 01031 void add(SGVector<floatmax_t>* param, const char* name, 01032 const char* description=""); 01038 void add(SGVector<complex128_t>* param, const char* name, 01039 const char* description=""); 01045 void add(SGVector<CSGObject*>* param, const char* name, 01046 const char* description=""); 01052 void add(SGVector<SGString<bool> >* param, const char* name, 01053 const char* description=""); 01059 void add(SGVector<SGString<char> >* param, const char* name, 01060 const char* description=""); 01066 void add(SGVector<SGString<int8_t> >* param, const char* name, 01067 const char* description=""); 01073 void add(SGVector<SGString<uint8_t> >* param, const char* name, 01074 const char* description=""); 01080 void add(SGVector<SGString<int16_t> >* param, const char* name, 01081 const char* description=""); 01087 void add(SGVector<SGString<uint16_t> >* param, const char* name, 01088 const char* description=""); 01094 void add(SGVector<SGString<int32_t> >* param, const char* name, 01095 const char* description=""); 01101 void add(SGVector<SGString<uint32_t> >* param, const char* name, 01102 const char* description=""); 01108 void add(SGVector<SGString<int64_t> >* param, const char* name, 01109 const char* description=""); 01115 void add(SGVector<SGString<uint64_t> >* param, const char* name, 01116 const char* description=""); 01122 void add(SGVector<SGString<float32_t> >* param, const char* name, 01123 const char* description=""); 01129 void add(SGVector<SGString<float64_t> >* param, const char* name, 01130 const char* description=""); 01136 void add(SGVector<SGString<floatmax_t> >* param, const char* name, 01137 const char* description=""); 01143 void add(SGVector<SGSparseVector<bool> >* param, const char* name, 01144 const char* description=""); 01150 void add(SGVector<SGSparseVector<char> >* param, const char* name, 01151 const char* description=""); 01157 void add(SGVector<SGSparseVector<int8_t> >* param, const char* name, 01158 const char* description=""); 01164 void add(SGVector<SGSparseVector<uint8_t> >* param,const char* name, 01165 const char* description=""); 01171 void add(SGVector<SGSparseVector<int16_t> >* param, const char* name, 01172 const char* description=""); 01178 void add(SGVector<SGSparseVector<uint16_t> >* param, 01179 const char* name, const char* description=""); 01185 void add(SGVector<SGSparseVector<int32_t> >* param, const char* name, 01186 const char* description=""); 01192 void add(SGVector<SGSparseVector<uint32_t> >* param,const char* name, 01193 const char* description=""); 01199 void add(SGVector<SGSparseVector<int64_t> >* param, const char* name, 01200 const char* description=""); 01206 void add(SGVector<SGSparseVector<uint64_t> >* param, 01207 const char* name, const char* description=""); 01213 void add(SGVector<SGSparseVector<float32_t> >* param, 01214 const char* name, const char* description=""); 01220 void add(SGVector<SGSparseVector<float64_t> >* param, 01221 const char* name, const char* description=""); 01227 void add(SGVector<SGSparseVector<floatmax_t> >* param, 01228 const char* name, const char* description=""); 01234 void add(SGVector<SGSparseVector<complex128_t> >* param, 01235 const char* name, const char* description=""); 01236 01237 /* ************************************************************ */ 01238 /* Matrix wrappers */ 01239 01247 void add_matrix(bool** param, 01248 index_t* length_y, index_t* length_x, 01249 const char* name, const char* description=""); 01257 void add_matrix(char** param, 01258 index_t* length_y, index_t* length_x, 01259 const char* name, const char* description=""); 01267 void add_matrix(int8_t** param, 01268 index_t* length_y, index_t* length_x, 01269 const char* name, const char* description=""); 01277 void add_matrix(uint8_t** param, 01278 index_t* length_y, index_t* length_x, 01279 const char* name, const char* description=""); 01287 void add_matrix(int16_t** param, 01288 index_t* length_y, index_t* length_x, 01289 const char* name, const char* description=""); 01297 void add_matrix(uint16_t** param, 01298 index_t* length_y, index_t* length_x, 01299 const char* name, const char* description=""); 01307 void add_matrix(int32_t** param, 01308 index_t* length_y, index_t* length_x, 01309 const char* name, const char* description=""); 01317 void add_matrix(uint32_t** param, 01318 index_t* length_y, index_t* length_x, 01319 const char* name, const char* description=""); 01327 void add_matrix(int64_t** param, 01328 index_t* length_y, index_t* length_x, 01329 const char* name, const char* description=""); 01337 void add_matrix(uint64_t** param, 01338 index_t* length_y, index_t* length_x, 01339 const char* name, const char* description=""); 01347 void add_matrix(float32_t** param, 01348 index_t* length_y, index_t* length_x, 01349 const char* name, const char* description=""); 01357 void add_matrix(float64_t** param, 01358 index_t* length_y, index_t* length_x, 01359 const char* name, const char* description=""); 01367 void add_matrix(floatmax_t** param, 01368 index_t* length_y, index_t* length_x, 01369 const char* name, const char* description=""); 01377 void add_matrix(complex128_t** param, 01378 index_t* length_y, index_t* length_x, 01379 const char* name, const char* description=""); 01387 void add_matrix(CSGObject*** param, 01388 index_t* length_y, index_t* length_x, 01389 const char* name, const char* description=""); 01397 void add_matrix(SGString<bool>** param, 01398 index_t* length_y, index_t* length_x, 01399 const char* name, const char* description=""); 01407 void add_matrix(SGString<char>** param, 01408 index_t* length_y, index_t* length_x, 01409 const char* name, const char* description=""); 01417 void add_matrix(SGString<int8_t>** param, 01418 index_t* length_y, index_t* length_x, 01419 const char* name, const char* description=""); 01427 void add_matrix(SGString<uint8_t>** param, 01428 index_t* length_y, index_t* length_x, 01429 const char* name, const char* description=""); 01437 void add_matrix(SGString<int16_t>** param, 01438 index_t* length_y, index_t* length_x, 01439 const char* name, const char* description=""); 01447 void add_matrix(SGString<uint16_t>** param, 01448 index_t* length_y, index_t* length_x, 01449 const char* name, const char* description=""); 01457 void add_matrix(SGString<int32_t>** param, 01458 index_t* length_y, index_t* length_x, 01459 const char* name, const char* description=""); 01467 void add_matrix(SGString<uint32_t>** param, 01468 index_t* length_y, index_t* length_x, 01469 const char* name, const char* description=""); 01477 void add_matrix(SGString<int64_t>** param, 01478 index_t* length_y, index_t* length_x, 01479 const char* name, const char* description=""); 01487 void add_matrix(SGString<uint64_t>** param, 01488 index_t* length_y, index_t* length_x, 01489 const char* name, const char* description=""); 01497 void add_matrix(SGString<float32_t>** param, 01498 index_t* length_y, index_t* length_x, 01499 const char* name, const char* description=""); 01507 void add_matrix(SGString<float64_t>** param, 01508 index_t* length_y, index_t* length_x, 01509 const char* name, const char* description=""); 01517 void add_matrix(SGString<floatmax_t>** param, 01518 index_t* length_y, index_t* length_x, 01519 const char* name, const char* description=""); 01527 void add_matrix(SGSparseVector<bool>** param, 01528 index_t* length_y, index_t* length_x, 01529 const char* name, const char* description=""); 01537 void add_matrix(SGSparseVector<char>** param, 01538 index_t* length_y, index_t* length_x, 01539 const char* name, const char* description=""); 01547 void add_matrix(SGSparseVector<int8_t>** param, 01548 index_t* length_y, index_t* length_x, 01549 const char* name, const char* description=""); 01557 void add_matrix(SGSparseVector<uint8_t>** param, 01558 index_t* length_y, index_t* length_x, 01559 const char* name, const char* description=""); 01567 void add_matrix(SGSparseVector<int16_t>** param, 01568 index_t* length_y, index_t* length_x, 01569 const char* name, const char* description=""); 01577 void add_matrix(SGSparseVector<uint16_t>** param, 01578 index_t* length_y, index_t* length_x, 01579 const char* name, const char* description=""); 01587 void add_matrix(SGSparseVector<int32_t>** param, 01588 index_t* length_y, index_t* length_x, 01589 const char* name, const char* description=""); 01597 void add_matrix(SGSparseVector<uint32_t>** param, 01598 index_t* length_y, index_t* length_x, 01599 const char* name, const char* description=""); 01607 void add_matrix(SGSparseVector<int64_t>** param, 01608 index_t* length_y, index_t* length_x, 01609 const char* name, const char* description=""); 01617 void add_matrix(SGSparseVector<uint64_t>** param, 01618 index_t* length_y, index_t* length_x, 01619 const char* name, const char* description=""); 01627 void add_matrix(SGSparseVector<float32_t>** param, 01628 index_t* length_y, index_t* length_x, 01629 const char* name, const char* description=""); 01637 void add_matrix(SGSparseVector<float64_t>** param, 01638 index_t* length_y, index_t* length_x, 01639 const char* name, const char* description=""); 01647 void add_matrix(SGSparseVector<floatmax_t>** param, 01648 index_t* length_y, index_t* length_x, 01649 const char* name, const char* description=""); 01657 void add_matrix(SGSparseVector<complex128_t>** param, 01658 index_t* length_y, index_t* length_x, 01659 const char* name, const char* description=""); 01665 void add(SGMatrix<bool>* param, const char* name, 01666 const char* description=""); 01672 void add(SGMatrix<char>* param, const char* name, 01673 const char* description=""); 01679 void add(SGMatrix<int8_t>* param, const char* name, 01680 const char* description=""); 01686 void add(SGMatrix<uint8_t>* param, const char* name, 01687 const char* description=""); 01693 void add(SGMatrix<int16_t>* param, const char* name, 01694 const char* description=""); 01700 void add(SGMatrix<uint16_t>* param, const char* name, 01701 const char* description=""); 01707 void add(SGMatrix<int32_t>* param, const char* name, 01708 const char* description=""); 01714 void add(SGMatrix<uint32_t>* param, const char* name, 01715 const char* description=""); 01721 void add(SGMatrix<int64_t>* param, const char* name, 01722 const char* description=""); 01728 void add(SGMatrix<uint64_t>* param, const char* name, 01729 const char* description=""); 01735 void add(SGMatrix<float32_t>* param, const char* name, 01736 const char* description=""); 01742 void add(SGMatrix<float64_t>* param, const char* name, 01743 const char* description=""); 01749 void add(SGMatrix<floatmax_t>* param, const char* name, 01750 const char* description=""); 01756 void add(SGMatrix<complex128_t>* param, const char* name, 01757 const char* description=""); 01763 void add(SGMatrix<CSGObject*>* param, const char* name, 01764 const char* description=""); 01770 void add(SGMatrix<SGString<bool> >* param, const char* name, 01771 const char* description=""); 01777 void add(SGMatrix<SGString<char> >* param, const char* name, 01778 const char* description=""); 01784 void add(SGMatrix<SGString<int8_t> >* param, const char* name, 01785 const char* description=""); 01791 void add(SGMatrix<SGString<uint8_t> >* param, const char* name, 01792 const char* description=""); 01798 void add(SGMatrix<SGString<int16_t> >* param, const char* name, 01799 const char* description=""); 01805 void add(SGMatrix<SGString<uint16_t> >* param, const char* name, 01806 const char* description=""); 01812 void add(SGMatrix<SGString<int32_t> >* param, const char* name, 01813 const char* description=""); 01819 void add(SGMatrix<SGString<uint32_t> >* param, const char* name, 01820 const char* description=""); 01826 void add(SGMatrix<SGString<int64_t> >* param, const char* name, 01827 const char* description=""); 01833 void add(SGMatrix<SGString<uint64_t> >* param, const char* name, 01834 const char* description=""); 01840 void add(SGMatrix<SGString<float32_t> >* param, const char* name, 01841 const char* description=""); 01847 void add(SGMatrix<SGString<float64_t> >* param, const char* name, 01848 const char* description=""); 01854 void add(SGMatrix<SGString<floatmax_t> >* param, const char* name, 01855 const char* description=""); 01861 void add(SGMatrix<SGSparseVector<bool> >* param, const char* name, 01862 const char* description=""); 01868 void add(SGMatrix<SGSparseVector<char> >* param, const char* name, 01869 const char* description=""); 01875 void add(SGMatrix<SGSparseVector<int8_t> >* param, const char* name, 01876 const char* description=""); 01882 void add(SGMatrix<SGSparseVector<uint8_t> >* param,const char* name, 01883 const char* description=""); 01889 void add(SGMatrix<SGSparseVector<int16_t> >* param, const char* name, 01890 const char* description=""); 01896 void add(SGMatrix<SGSparseVector<uint16_t> >* param, 01897 const char* name, const char* description=""); 01903 void add(SGMatrix<SGSparseVector<int32_t> >* param, const char* name, 01904 const char* description=""); 01910 void add(SGMatrix<SGSparseVector<uint32_t> >* param,const char* name, 01911 const char* description=""); 01917 void add(SGMatrix<SGSparseVector<int64_t> >* param, const char* name, 01918 const char* description=""); 01924 void add(SGMatrix<SGSparseVector<uint64_t> >* param, 01925 const char* name, const char* description=""); 01931 void add(SGMatrix<SGSparseVector<float32_t> >* param, 01932 const char* name, const char* description=""); 01938 void add(SGMatrix<SGSparseVector<float64_t> >* param, 01939 const char* name, const char* description=""); 01945 void add(SGMatrix<SGSparseVector<floatmax_t> >* param, 01946 const char* name, const char* description=""); 01952 void add(SGMatrix<SGSparseVector<complex128_t> >* param, 01953 const char* name, const char* description=""); 01954 01960 void add(SGSparseMatrix<bool>* param, 01961 const char* name, const char* description=""); 01967 void add(SGSparseMatrix<char>* param, 01968 const char* name, const char* description=""); 01974 void add(SGSparseMatrix<int8_t>* param, 01975 const char* name, const char* description=""); 01981 void add(SGSparseMatrix<uint8_t>* param, 01982 const char* name, const char* description=""); 01988 void add(SGSparseMatrix<int16_t>* param, 01989 const char* name, const char* description=""); 01995 void add(SGSparseMatrix<uint16_t>* param, 01996 const char* name, const char* description=""); 02002 void add(SGSparseMatrix<int32_t>* param, 02003 const char* name, const char* description=""); 02009 void add(SGSparseMatrix<uint32_t>* param, 02010 const char* name, const char* description=""); 02016 void add(SGSparseMatrix<int64_t>* param, 02017 const char* name, const char* description=""); 02023 void add(SGSparseMatrix<uint64_t>* param, 02024 const char* name, const char* description=""); 02030 void add(SGSparseMatrix<float32_t>* param, 02031 const char* name, const char* description=""); 02037 void add(SGSparseMatrix<float64_t>* param, 02038 const char* name, const char* description=""); 02044 void add(SGSparseMatrix<floatmax_t>* param, 02045 const char* name, const char* description=""); 02051 void add(SGSparseMatrix<complex128_t>* param, 02052 const char* name, const char* description=""); 02058 void add(SGSparseMatrix<CSGObject*>* param, 02059 const char* name, const char* description=""); 02060 protected: 02061 02063 DynArray<TParameter*> m_params; 02064 02071 virtual void add_type(const TSGDataType* type, void* param, 02072 const char* name, 02073 const char* description); 02074 }; 02075 } 02076 #endif //__PARAMETER_H__