ConicBundle
SumModelParametersObject.hxx
Go to the documentation of this file.
1 
2 
3 #ifndef CONICBUNDLE_SUMMODELPARAMETERSOBJECT_HXX
4 #define CONICBUNDLE_SUMMODELPARAMETERSOBJECT_HXX
5 
13 #include "SumModel.hxx"
15 
16 namespace ConicBundle {
21 
40  class SumModelParametersObject: public virtual CBout, public BundleParameters
41 {
42 protected:
43  //int max_model_size; // maximum number of minorants to be selected for the cutting model (numbers<=1 for no limit, numbers >=2 impose a strict limit)
44  //int max_bundle_size; // suggested maximum number of latest minorants stored for use in a model, for constructing variable metric information etc. (negative numbers give no preference; the size may be increased internally in case of confliciting requirements, eg. in n_model_size or by variable metric routines)
45  //int update_rule; // in case several update rules are available
46 
48 
49 public:
51  int init(const BundleParameters& bp){
53  const SumModelParametersObject* smpo=dynamic_cast<const SumModelParametersObject*>(&bp);
54  if (smpo){
55  max_local_models=smpo->max_local_models;
56  return 0;
57  }
58  return 0;
59  }
60 
62  SumModelParametersObject(CBout* cb=0,int cbinc=-1):
63  CBout(cb,cbinc),BundleParameters(),max_local_models(0)
64  {}
65 
67  virtual ~SumModelParametersObject();
68 
70  virtual int get_max_local_models() const
71  { return max_local_models;}
72 
74  virtual int set_max_local_models(int mlm)
75  { max_local_models=mlm; return 0;}
76 
78  virtual int select_models(SumModel::ModelMap& modelmap)=0;
79 
80 };
81 
82 
84 
85 }
86 
87 #endif
88 
int max_local_models
when combining models, aim for this number of local models
Definition: SumModelParametersObject.hxx:47
virtual int get_max_local_models() const
returns the value of the variable
Definition: SumModelParametersObject.hxx:70
abstract interface for SumModel for the models selection routine when using SumBundle and SumBundleHa...
Definition: SumModelParametersObject.hxx:40
Header declaring the class ConicBundle::SumBundleParametersObject.
virtual int select_models(SumModel::ModelMap &modelmap)=0
generate a suggestion list on which to include in the SumBundle (the othersi should keep their local ...
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
base class for uniform use of WARNINGS and ERRORS (at some point in time)
Definition: CBout.hxx:30
std::map< const FunctionObject *, ModelData * > ModelMap
a ModelMap maps FunctionObject pointers (these must be unique) to their ModelData ...
Definition: SumModel.hxx:141
virtual int init(const BundleParameters &bp)
initialize to given values
Definition: CBSolver.hxx:900
Serves for specifying parameters regarding the construction of cutting models.
Definition: CBSolver.hxx:891
virtual int set_max_local_models(int mlm)
returns the value of the variable
Definition: SumModelParametersObject.hxx:74
SumModelParametersObject(CBout *cb=0, int cbinc=-1)
default constructor
Definition: SumModelParametersObject.hxx:62
Header declaring the class ConicBundle::SumModel.
virtual ~SumModelParametersObject()
virtual destructor, implemented in SumModelParameters.cxx
int init(const BundleParameters &bp)
initialize BundleParameters to the given values; if bp is a SumModelParametersObject alos set max_loc...
Definition: SumModelParametersObject.hxx:51