SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Parameter.h
Go to the documentation of this file.
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  * Copyright (C) 2010 Berlin Institute of Technology
00009  */
00010 #ifndef __PARAMETER_H__
00011 #define __PARAMETER_H__
00012 
00013 #include <shogun/lib/common.h>
00014 #include <shogun/io/SGIO.h>
00015 #include <shogun/lib/DataType.h>
00016 #include <shogun/lib/SGVector.h>
00017 #include <shogun/lib/SGMatrix.h>
00018 #include <shogun/io/SerializableFile.h>
00019 #include <shogun/base/DynArray.h>
00020 
00021 namespace shogun
00022 {
00024 struct TParameter
00025 {
00032     explicit TParameter(const TSGDataType* datatype, void* parameter,
00033                         const char* name, const char* description);
00034 
00036     ~TParameter();
00037 
00041     void print(const char* prefix);
00042 
00047     bool save(CSerializableFile* file, const char* prefix="");
00048 
00053     bool load(CSerializableFile* file, const char* prefix="");
00054 
00069     void allocate_data_from_scratch(index_t len_y, index_t len_x,
00070             bool new_cont_call=true);
00071 
00078     void copy_data(const TParameter* source);
00079 
00081     bool operator==(const TParameter& other) const;
00082 
00084     bool operator<(const TParameter& other) const;
00085 
00087     bool operator>(const TParameter& other) const;
00088 
00090     TSGDataType m_datatype;
00092     void* m_parameter;
00094     char* m_name;
00096     char* m_description;
00097 
00105     bool m_delete_data;
00106 
00109     bool m_was_allocated_from_scratch;
00110 
00119     void get_incremental_hash(
00120             uint32_t& hash, uint32_t& carry, uint32_t& total_length);
00121 
00122 private:
00123     char* new_prefix(const char* s1, const char* s2);
00124     void delete_cont();
00125     void new_cont(index_t new_len_y, index_t new_len_x);
00126     bool new_sgserial(CSGObject** param, EPrimitiveType generic,
00127                       const char* sgserializable_name,
00128                       const char* prefix);
00129     bool save_ptype(CSerializableFile* file, const void* param,
00130                     const char* prefix);
00131     bool load_ptype(CSerializableFile* file, void* param,
00132                     const char* prefix);
00133     bool save_stype(CSerializableFile* file, const void* param,
00134                     const char* prefix);
00135     bool load_stype(CSerializableFile* file, void* param,
00136                     const char* prefix);
00137 
00138 };
00139 
00145 class Parameter
00146 {
00147 public:
00149     explicit Parameter();
00151     virtual ~Parameter();
00152 
00156     virtual void print(const char* prefix="");
00157 
00162     virtual bool save(CSerializableFile* file, const char* prefix="");
00163 
00164     /* load from serializable file
00165      * @param file source file
00166      * @param prefix prefix
00167     virtual bool load(CSerializableFile* file, const char* prefix="");
00168      */
00169 
00173     inline virtual int32_t get_num_parameters()
00174     {
00175         return m_params.get_num_elements();
00176     }
00177 
00186     void set_from_parameters(Parameter* params);
00187 
00193     void add_parameters(Parameter* params);
00194 
00199     bool contains_parameter(const char* name);
00200 
00206     inline TParameter* get_parameter(int32_t idx)
00207     {
00208         return m_params.get_element(idx);
00209     }
00210 
00211     /* ************************************************************ */
00212     /* Scalar wrappers  */
00213 
00219     void add(bool* param, const char* name,
00220              const char* description="");
00226     void add(char* param, const char* name,
00227              const char* description="");
00233     void add(int8_t* param, const char* name,
00234              const char* description="");
00240     void add(uint8_t* param, const char* name,
00241              const char* description="");
00247     void add(int16_t* param, const char* name,
00248              const char* description="");
00254     void add(uint16_t* param, const char* name,
00255              const char* description="");
00261     void add(int32_t* param, const char* name,
00262              const char* description="");
00268     void add(uint32_t* param, const char* name,
00269              const char* description="");
00275     void add(int64_t* param, const char* name,
00276              const char* description="");
00282     void add(uint64_t* param, const char* name,
00283              const char* description="");
00289     void add(float32_t* param, const char* name,
00290              const char* description="");
00296     void add(float64_t* param, const char* name,
00297              const char* description="");
00303     void add(floatmax_t* param, const char* name,
00304              const char* description="");
00310     void add(CSGObject** param,
00311              const char* name, const char* description="");
00317     void add(SGString<bool>* param, const char* name,
00318              const char* description="");
00324     void add(SGString<char>* param, const char* name,
00325              const char* description="");
00331     void add(SGString<int8_t>* param, const char* name,
00332              const char* description="");
00338     void add(SGString<uint8_t>* param, const char* name,
00339              const char* description="");
00345     void add(SGString<int16_t>* param, const char* name,
00346              const char* description="");
00352     void add(SGString<uint16_t>* param, const char* name,
00353              const char* description="");
00359     void add(SGString<int32_t>* param, const char* name,
00360              const char* description="");
00366     void add(SGString<uint32_t>* param, const char* name,
00367              const char* description="");
00373     void add(SGString<int64_t>* param, const char* name,
00374              const char* description="");
00380     void add(SGString<uint64_t>* param, const char* name,
00381              const char* description="");
00387     void add(SGString<float32_t>* param, const char* name,
00388              const char* description="");
00394     void add(SGString<float64_t>* param, const char* name,
00395              const char* description="");
00401     void add(SGString<floatmax_t>* param, const char* name,
00402              const char* description="");
00408     void add(SGSparseVector<bool>* param, const char* name,
00409              const char* description="");
00415     void add(SGSparseVector<char>* param, const char* name,
00416              const char* description="");
00422     void add(SGSparseVector<int8_t>* param, const char* name,
00423              const char* description="");
00429     void add(SGSparseVector<uint8_t>* param, const char* name,
00430              const char* description="");
00436     void add(SGSparseVector<int16_t>* param, const char* name,
00437              const char* description="");
00443     void add(SGSparseVector<uint16_t>* param, const char* name,
00444              const char* description="");
00450     void add(SGSparseVector<int32_t>* param, const char* name,
00451              const char* description="");
00457     void add(SGSparseVector<uint32_t>* param, const char* name,
00458              const char* description="");
00464     void add(SGSparseVector<int64_t>* param, const char* name,
00465              const char* description="");
00471     void add(SGSparseVector<uint64_t>* param, const char* name,
00472              const char* description="");
00478     void add(SGSparseVector<float32_t>* param, const char* name,
00479              const char* description="");
00485     void add(SGSparseVector<float64_t>* param, const char* name,
00486              const char* description="");
00492     void add(SGSparseVector<floatmax_t>* param, const char* name,
00493              const char* description="");
00494 
00495     /* ************************************************************ */
00496     /* Vector wrappers  */
00497 
00504     void add_vector(bool** param, index_t* length,
00505                     const char* name, const char* description="");
00512     void add_vector(char** param, index_t* length,
00513                     const char* name, const char* description="");
00520     void add_vector(int8_t** param, index_t* length,
00521                     const char* name, const char* description="");
00528     void add_vector(uint8_t** param, index_t* length,
00529                     const char* name, const char* description="");
00536     void add_vector(int16_t** param, index_t* length,
00537                     const char* name, const char* description="");
00544     void add_vector(uint16_t** param, index_t* length,
00545                     const char* name, const char* description="");
00552     void add_vector(int32_t** param, index_t* length,
00553                     const char* name, const char* description="");
00560     void add_vector(uint32_t** param, index_t* length,
00561                     const char* name, const char* description="");
00568     void add_vector(int64_t** param, index_t* length,
00569                     const char* name, const char* description="");
00576     void add_vector(uint64_t** param, index_t* length,
00577                     const char* name, const char* description="");
00584     void add_vector(float32_t** param, index_t* length,
00585                     const char* name, const char* description="");
00592     void add_vector(float64_t** param, index_t* length,
00593                     const char* name, const char* description="");
00600     void add_vector(floatmax_t** param, index_t* length,
00601                     const char* name, const char* description="");
00608     void add_vector(CSGObject*** param, index_t* length,
00609                     const char* name, const char* description="");
00616     void add_vector(SGString<bool>** param, index_t* length,
00617                     const char* name, const char* description="");
00624     void add_vector(SGString<char>** param, index_t* length,
00625                     const char* name, const char* description="");
00632     void add_vector(SGString<int8_t>** param, index_t* length,
00633                     const char* name, const char* description="");
00640     void add_vector(SGString<uint8_t>** param, index_t* length,
00641                     const char* name, const char* description="");
00648     void add_vector(SGString<int16_t>** param, index_t* length,
00649                     const char* name, const char* description="");
00656     void add_vector(SGString<uint16_t>** param, index_t* length,
00657                     const char* name, const char* description="");
00664     void add_vector(SGString<int32_t>** param, index_t* length,
00665                     const char* name, const char* description="");
00672     void add_vector(SGString<uint32_t>** param, index_t* length,
00673                     const char* name, const char* description="");
00680     void add_vector(SGString<int64_t>** param, index_t* length,
00681                     const char* name, const char* description="");
00688     void add_vector(SGString<uint64_t>** param, index_t* length,
00689                     const char* name, const char* description="");
00696     void add_vector(SGString<float32_t>** param, index_t* length,
00697                     const char* name, const char* description="");
00704     void add_vector(SGString<float64_t>** param, index_t* length,
00705                     const char* name, const char* description="");
00712     void add_vector(SGString<floatmax_t>** param, index_t* length,
00713                     const char* name, const char* description="");
00720     void add_vector(SGSparseVector<bool>** param, index_t* length,
00721                     const char* name, const char* description="");
00728     void add_vector(SGSparseVector<char>** param, index_t* length,
00729                     const char* name, const char* description="");
00736     void add_vector(SGSparseVector<int8_t>** param, index_t* length,
00737                     const char* name, const char* description="");
00744     void add_vector(SGSparseVector<uint8_t>** param, index_t* length,
00745                     const char* name, const char* description="");
00752     void add_vector(SGSparseVector<int16_t>** param, index_t* length,
00753                     const char* name, const char* description="");
00760     void add_vector(SGSparseVector<uint16_t>** param, index_t* length,
00761                     const char* name, const char* description="");
00768     void add_vector(SGSparseVector<int32_t>** param, index_t* length,
00769                     const char* name, const char* description="");
00776     void add_vector(SGSparseVector<uint32_t>** param, index_t* length,
00777                     const char* name, const char* description="");
00784     void add_vector(SGSparseVector<int64_t>** param, index_t* length,
00785                     const char* name, const char* description="");
00792     void add_vector(SGSparseVector<uint64_t>** param, index_t* length,
00793                     const char* name, const char* description="");
00800     void add_vector(SGSparseVector<float32_t>** param, index_t* length,
00801                     const char* name, const char* description="");
00808     void add_vector(SGSparseVector<float64_t>** param, index_t* length,
00809                     const char* name, const char* description="");
00816     void add_vector(SGSparseVector<floatmax_t>** param, index_t* length,
00817                     const char* name, const char* description="");
00818 
00819 
00825     void add(SGVector<bool>* param, const char* name,
00826                     const char* description="");
00832     void add(SGVector<char>* param, const char* name,
00833                     const char* description="");
00839     void add(SGVector<int8_t>* param, const char* name,
00840                     const char* description="");
00846     void add(SGVector<uint8_t>* param, const char* name,
00847                     const char* description="");
00853     void add(SGVector<int16_t>* param, const char* name,
00854                     const char* description="");
00860     void add(SGVector<uint16_t>* param, const char* name,
00861                     const char* description="");
00867     void add(SGVector<int32_t>* param, const char* name,
00868                     const char* description="");
00874     void add(SGVector<uint32_t>* param, const char* name,
00875                     const char* description="");
00881     void add(SGVector<int64_t>* param, const char* name,
00882                     const char* description="");
00888     void add(SGVector<uint64_t>* param, const char* name,
00889                     const char* description="");
00895     void add(SGVector<float32_t>* param, const char* name,
00896                     const char* description="");
00902     void add(SGVector<float64_t>* param, const char* name,
00903                     const char* description="");
00909     void add(SGVector<floatmax_t>* param, const char* name,
00910                     const char* description="");
00916     void add(SGVector<CSGObject*>* param, const char* name,
00917                     const char* description="");
00923     void add(SGVector<SGString<bool> >* param, const char* name,
00924                     const char* description="");
00930     void add(SGVector<SGString<char> >* param, const char* name,
00931                     const char* description="");
00937     void add(SGVector<SGString<int8_t> >* param, const char* name,
00938                     const char* description="");
00944     void add(SGVector<SGString<uint8_t> >* param, const char* name,
00945                     const char* description="");
00951     void add(SGVector<SGString<int16_t> >* param, const char* name,
00952                     const char* description="");
00958     void add(SGVector<SGString<uint16_t> >* param, const char* name,
00959                     const char* description="");
00965     void add(SGVector<SGString<int32_t> >* param, const char* name,
00966                     const char* description="");
00972     void add(SGVector<SGString<uint32_t> >* param, const char* name,
00973                     const char* description="");
00979     void add(SGVector<SGString<int64_t> >* param, const char* name,
00980                     const char* description="");
00986     void add(SGVector<SGString<uint64_t> >* param, const char* name,
00987                     const char* description="");
00993     void add(SGVector<SGString<float32_t> >* param, const char* name,
00994                     const char* description="");
01000     void add(SGVector<SGString<float64_t> >* param, const char* name,
01001                     const char* description="");
01007     void add(SGVector<SGString<floatmax_t> >* param, const char* name,
01008                     const char* description="");
01014     void add(SGVector<SGSparseVector<bool> >* param, const char* name,
01015                     const char* description="");
01021     void add(SGVector<SGSparseVector<char> >* param, const char* name,
01022                     const char* description="");
01028     void add(SGVector<SGSparseVector<int8_t> >* param, const char* name,
01029                     const char* description="");
01035     void add(SGVector<SGSparseVector<uint8_t> >* param,const char* name,
01036                     const char* description="");
01042     void add(SGVector<SGSparseVector<int16_t> >* param, const char* name,
01043                     const char* description="");
01049     void add(SGVector<SGSparseVector<uint16_t> >* param,
01050                     const char* name, const char* description="");
01056     void add(SGVector<SGSparseVector<int32_t> >* param, const char* name,
01057                     const char* description="");
01063     void add(SGVector<SGSparseVector<uint32_t> >* param,const char* name,
01064                     const char* description="");
01070     void add(SGVector<SGSparseVector<int64_t> >* param, const char* name,
01071                     const char* description="");
01077     void add(SGVector<SGSparseVector<uint64_t> >* param,
01078                     const char* name, const char* description="");
01084     void add(SGVector<SGSparseVector<float32_t> >* param,
01085                     const char* name, const char* description="");
01091     void add(SGVector<SGSparseVector<float64_t> >* param,
01092                     const char* name, const char* description="");
01098     void add(SGVector<SGSparseVector<floatmax_t> >* param,
01099                     const char* name, const char* description="");
01100 
01101     /* ************************************************************ */
01102     /* Matrix wrappers  */
01103 
01111     void add_matrix(bool** param,
01112                     index_t* length_y, index_t* length_x,
01113                     const char* name, const char* description="");
01121     void add_matrix(char** param,
01122                     index_t* length_y, index_t* length_x,
01123                     const char* name, const char* description="");
01131     void add_matrix(int8_t** param,
01132                     index_t* length_y, index_t* length_x,
01133                     const char* name, const char* description="");
01141     void add_matrix(uint8_t** param,
01142                     index_t* length_y, index_t* length_x,
01143                     const char* name, const char* description="");
01151     void add_matrix(int16_t** param,
01152                     index_t* length_y, index_t* length_x,
01153                     const char* name, const char* description="");
01161     void add_matrix(uint16_t** param,
01162                     index_t* length_y, index_t* length_x,
01163                     const char* name, const char* description="");
01171     void add_matrix(int32_t** param,
01172                     index_t* length_y, index_t* length_x,
01173                     const char* name, const char* description="");
01181     void add_matrix(uint32_t** param,
01182                     index_t* length_y, index_t* length_x,
01183                     const char* name, const char* description="");
01191     void add_matrix(int64_t** param,
01192                     index_t* length_y, index_t* length_x,
01193                     const char* name, const char* description="");
01201     void add_matrix(uint64_t** param,
01202                     index_t* length_y, index_t* length_x,
01203                     const char* name, const char* description="");
01211     void add_matrix(float32_t** param,
01212                     index_t* length_y, index_t* length_x,
01213                     const char* name, const char* description="");
01221     void add_matrix(float64_t** param,
01222                     index_t* length_y, index_t* length_x,
01223                     const char* name, const char* description="");
01231     void add_matrix(floatmax_t** param,
01232                     index_t* length_y, index_t* length_x,
01233                     const char* name, const char* description="");
01241     void add_matrix(CSGObject*** param,
01242                     index_t* length_y, index_t* length_x,
01243                     const char* name, const char* description="");
01251     void add_matrix(SGString<bool>** param,
01252                     index_t* length_y, index_t* length_x,
01253                     const char* name, const char* description="");
01261     void add_matrix(SGString<char>** param,
01262                     index_t* length_y, index_t* length_x,
01263                     const char* name, const char* description="");
01271     void add_matrix(SGString<int8_t>** param,
01272                     index_t* length_y, index_t* length_x,
01273                     const char* name, const char* description="");
01281     void add_matrix(SGString<uint8_t>** param,
01282                     index_t* length_y, index_t* length_x,
01283                     const char* name, const char* description="");
01291     void add_matrix(SGString<int16_t>** param,
01292                     index_t* length_y, index_t* length_x,
01293                     const char* name, const char* description="");
01301     void add_matrix(SGString<uint16_t>** param,
01302                     index_t* length_y, index_t* length_x,
01303                     const char* name, const char* description="");
01311     void add_matrix(SGString<int32_t>** param,
01312                     index_t* length_y, index_t* length_x,
01313                     const char* name, const char* description="");
01321     void add_matrix(SGString<uint32_t>** param,
01322                     index_t* length_y, index_t* length_x,
01323                     const char* name, const char* description="");
01331     void add_matrix(SGString<int64_t>** param,
01332                     index_t* length_y, index_t* length_x,
01333                     const char* name, const char* description="");
01341     void add_matrix(SGString<uint64_t>** param,
01342                     index_t* length_y, index_t* length_x,
01343                     const char* name, const char* description="");
01351     void add_matrix(SGString<float32_t>** param,
01352                     index_t* length_y, index_t* length_x,
01353                     const char* name, const char* description="");
01361     void add_matrix(SGString<float64_t>** param,
01362                     index_t* length_y, index_t* length_x,
01363                     const char* name, const char* description="");
01371     void add_matrix(SGString<floatmax_t>** param,
01372                     index_t* length_y, index_t* length_x,
01373                     const char* name, const char* description="");
01381     void add_matrix(SGSparseVector<bool>** param,
01382                     index_t* length_y, index_t* length_x,
01383                     const char* name, const char* description="");
01391     void add_matrix(SGSparseVector<char>** param,
01392                     index_t* length_y, index_t* length_x,
01393                     const char* name, const char* description="");
01401     void add_matrix(SGSparseVector<int8_t>** param,
01402                     index_t* length_y, index_t* length_x,
01403                     const char* name, const char* description="");
01411     void add_matrix(SGSparseVector<uint8_t>** param,
01412                     index_t* length_y, index_t* length_x,
01413                     const char* name, const char* description="");
01421     void add_matrix(SGSparseVector<int16_t>** param,
01422                     index_t* length_y, index_t* length_x,
01423                     const char* name, const char* description="");
01431     void add_matrix(SGSparseVector<uint16_t>** param,
01432                     index_t* length_y, index_t* length_x,
01433                     const char* name, const char* description="");
01441     void add_matrix(SGSparseVector<int32_t>** param,
01442                     index_t* length_y, index_t* length_x,
01443                     const char* name, const char* description="");
01451     void add_matrix(SGSparseVector<uint32_t>** param,
01452                     index_t* length_y, index_t* length_x,
01453                     const char* name, const char* description="");
01461     void add_matrix(SGSparseVector<int64_t>** param,
01462                     index_t* length_y, index_t* length_x,
01463                     const char* name, const char* description="");
01471     void add_matrix(SGSparseVector<uint64_t>** param,
01472                     index_t* length_y, index_t* length_x,
01473                     const char* name, const char* description="");
01481     void add_matrix(SGSparseVector<float32_t>** param,
01482                     index_t* length_y, index_t* length_x,
01483                     const char* name, const char* description="");
01491     void add_matrix(SGSparseVector<float64_t>** param,
01492                     index_t* length_y, index_t* length_x,
01493                     const char* name, const char* description="");
01501     void add_matrix(SGSparseVector<floatmax_t>** param,
01502                     index_t* length_y, index_t* length_x,
01503                     const char* name, const char* description="");
01509     void add(SGMatrix<bool>* param, const char* name,
01510                     const char* description="");
01516     void add(SGMatrix<char>* param, const char* name,
01517                     const char* description="");
01523     void add(SGMatrix<int8_t>* param, const char* name,
01524                     const char* description="");
01530     void add(SGMatrix<uint8_t>* param, const char* name,
01531                     const char* description="");
01537     void add(SGMatrix<int16_t>* param, const char* name,
01538                     const char* description="");
01544     void add(SGMatrix<uint16_t>* param, const char* name,
01545                     const char* description="");
01551     void add(SGMatrix<int32_t>* param, const char* name,
01552                     const char* description="");
01558     void add(SGMatrix<uint32_t>* param, const char* name,
01559                     const char* description="");
01565     void add(SGMatrix<int64_t>* param, const char* name,
01566                     const char* description="");
01572     void add(SGMatrix<uint64_t>* param, const char* name,
01573                     const char* description="");
01579     void add(SGMatrix<float32_t>* param, const char* name,
01580                     const char* description="");
01586     void add(SGMatrix<float64_t>* param, const char* name,
01587                     const char* description="");
01593     void add(SGMatrix<floatmax_t>* param, const char* name,
01594                     const char* description="");
01600     void add(SGMatrix<CSGObject*>* param, const char* name,
01601                     const char* description="");
01607     void add(SGMatrix<SGString<bool> >* param, const char* name,
01608                     const char* description="");
01614     void add(SGMatrix<SGString<char> >* param, const char* name,
01615                     const char* description="");
01621     void add(SGMatrix<SGString<int8_t> >* param, const char* name,
01622                     const char* description="");
01628     void add(SGMatrix<SGString<uint8_t> >* param, const char* name,
01629                     const char* description="");
01635     void add(SGMatrix<SGString<int16_t> >* param, const char* name,
01636                     const char* description="");
01642     void add(SGMatrix<SGString<uint16_t> >* param, const char* name,
01643                     const char* description="");
01649     void add(SGMatrix<SGString<int32_t> >* param, const char* name,
01650                     const char* description="");
01656     void add(SGMatrix<SGString<uint32_t> >* param, const char* name,
01657                     const char* description="");
01663     void add(SGMatrix<SGString<int64_t> >* param, const char* name,
01664                     const char* description="");
01670     void add(SGMatrix<SGString<uint64_t> >* param, const char* name,
01671                     const char* description="");
01677     void add(SGMatrix<SGString<float32_t> >* param, const char* name,
01678                     const char* description="");
01684     void add(SGMatrix<SGString<float64_t> >* param, const char* name,
01685                     const char* description="");
01691     void add(SGMatrix<SGString<floatmax_t> >* param, const char* name,
01692                     const char* description="");
01698     void add(SGMatrix<SGSparseVector<bool> >* param, const char* name,
01699                     const char* description="");
01705     void add(SGMatrix<SGSparseVector<char> >* param, const char* name,
01706                     const char* description="");
01712     void add(SGMatrix<SGSparseVector<int8_t> >* param, const char* name,
01713                     const char* description="");
01719     void add(SGMatrix<SGSparseVector<uint8_t> >* param,const char* name,
01720                     const char* description="");
01726     void add(SGMatrix<SGSparseVector<int16_t> >* param, const char* name,
01727                     const char* description="");
01733     void add(SGMatrix<SGSparseVector<uint16_t> >* param,
01734                     const char* name, const char* description="");
01740     void add(SGMatrix<SGSparseVector<int32_t> >* param, const char* name,
01741                     const char* description="");
01747     void add(SGMatrix<SGSparseVector<uint32_t> >* param,const char* name,
01748                     const char* description="");
01754     void add(SGMatrix<SGSparseVector<int64_t> >* param, const char* name,
01755                     const char* description="");
01761     void add(SGMatrix<SGSparseVector<uint64_t> >* param,
01762                     const char* name, const char* description="");
01768     void add(SGMatrix<SGSparseVector<float32_t> >* param,
01769                     const char* name, const char* description="");
01775     void add(SGMatrix<SGSparseVector<float64_t> >* param,
01776                     const char* name, const char* description="");
01782     void add(SGMatrix<SGSparseVector<floatmax_t> >* param,
01783                     const char* name, const char* description="");
01784 
01785 protected:
01786 
01788     DynArray<TParameter*> m_params;
01789 
01796     virtual void add_type(const TSGDataType* type, void* param,
01797                           const char* name,
01798                           const char* description);
01799 };
01800 }
01801 #endif //__PARAMETER_H__
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation