ParameterCombination.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) 2011 Heiko Strathmann
00008  * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
00009  */
00010 
00011 #ifndef __PARAMETERCOMBINATION_H__
00012 #define __PARAMETERCOMBINATION_H__
00013 
00014 #include <shogun/lib/DynamicObjectArray.h>
00015 
00016 namespace shogun
00017 {
00018 
00019 class CModelSelectionParameters;
00020 class CMachine;
00021 class Parameter;
00022 
00042 class CParameterCombination : public CSGObject
00043 {
00044 
00045 friend class CModelSelectionParameters;
00046 
00047 public:
00049     CParameterCombination();
00050 
00056     void print_tree(int prefix_num=0) const;
00057 
00059     CParameterCombination(Parameter* param);
00060 
00063     virtual ~CParameterCombination();
00064 
00071     void apply_to_modsel_parameter(Parameter* parameter) const;
00072 
00078     void apply_to_machine(CMachine* machine) const;
00079 
00084     void append_child(CParameterCombination* child);
00085 
00092     CParameterCombination* copy_tree() const;
00093 
00106     static CDynamicObjectArray<CParameterCombination>* leaf_sets_multiplication(
00107             const CDynamicObjectArray<CDynamicObjectArray<CParameterCombination> >& sets,
00108             const CParameterCombination* new_root);
00109 
00114     bool has_children() const
00115     {
00116         return m_child_nodes->get_num_elements()>0;
00117     }
00118 
00126     static DynArray<Parameter*>* parameter_set_multiplication(
00127             const DynArray<Parameter*>& set_1,
00128             const DynArray<Parameter*>& set_2);
00129 
00131     inline virtual const char* get_name() const
00132     {
00133         return "ParameterCombination";
00134     }
00135 
00136 private:
00137     void init();
00138 
00139 private:
00140     Parameter* m_param;
00141     CDynamicObjectArray<CParameterCombination>* m_child_nodes;
00142 };
00143 }
00144 
00145 #endif /* __PARAMETERCOMBINATION_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation