ConicBundle
AFTData.hxx
Go to the documentation of this file.
1 
2 
3 #ifndef CONICBUNDLE_AFTDATA_HXX
4 #define CONICBUNDLE_AFTDATA_HXX
5 
6 
15 #include "BundleData.hxx"
16 
17 namespace ConicBundle {
18 
23 
58 class AFTData:public BundleData
59 {
60 public:
61  //===== variables =====
62 
63  //FunctionTask function_task; ///< see FunctionData::FunctionTask
64  //CH_Matrix_Classes::Real function_factor; ///< >0, interpreted according to function_t //CH_Matrix_Classes::Integer modification_id; ///< increased on any modification applied to the AffineFunctionTransformation
67 
68  //CH_Matrix_Classes::Integer center_ub_mid; ///< modification_id for which center_ub was computed, <0 if not initialized
69  //CH_Matrix_Classes::Real center_ub; ///< (untransformed) upper bound on function value returned for aft_center with aftpoint_id aft_center_id
70  //CH_Matrix_Classes::Real center_relprec; ///< relative precision by which it was computed
74  //CH_Matrix_Classes::Integer center_id; ///< point id of the generating center
77 
78  //CH_Matrix_Classes::Integer cand_ub_mid; ///< modification_id for which cand_ub was computed, <0 if not initialized
79  //CH_Matrix_Classes::Real cand_ub; ///< (untransformed) upper bound on function value returned for aft_cand with aftpoint_id aft_cand_id
80  //CH_Matrix_Classes::Real cand_relprec; ///< relative precision by which it was computed
84  //CH_Matrix_Classes::Integer cand_id; ///< point id of the generating cand
87 
88 
90  //MinorantPointer aggregate; ///< the aggregate linear minorant of the model (including @a function_factor and @a function_task)
91  //CH_Matrix_Classes::Integer aggregate_id; ///< the aggregate id assigned when computed (but not nec. stored) here, at the same time as aggregate_available is set to true
93 
94 
95  //===== methods =====
97  virtual ~AFTData();
98 
100  virtual void clear(CH_Matrix_Classes::Integer start_modification_id=0);
101 
103  AFTData(CH_Matrix_Classes::Integer start_modification_id=0){clear(start_modification_id);}
104 
106  virtual int init(const BundleData* bd);
107 
109  BundleData* clone() const;
110 
112  virtual int do_step(CH_Matrix_Classes::Integer point_id);
113 
115  virtual int synchronize_ids(CH_Matrix_Classes::Integer& new_center_ub_fid,
116  CH_Matrix_Classes::Integer new_center_id,
117  CH_Matrix_Classes::Integer old_center_id,
118  CH_Matrix_Classes::Integer& new_cand_ub_fid,
119  CH_Matrix_Classes::Integer new_cand_id,
120  CH_Matrix_Classes::Integer old_cand_id,
121  CH_Matrix_Classes::Integer& new_aggregate_id,
122  CH_Matrix_Classes::Integer new_prex_id=0);
123 
125  virtual bool center_modified(CH_Matrix_Classes::Integer& function_id,
127 
129  virtual bool model_aggregate_modified(CH_Matrix_Classes::Integer last_aggr_id);
131  virtual void clear_model(bool discard_minorants_only=false);
132 
134  virtual void clear_aggregates();
135 
136  // as in BundleData
137  //virtual int call_primal_extender(PrimalExtender&,bool /*include_candidates*/=true){return 1;}
138 
139  // as in BundleData
140  //virtual int apply_modification(const GroundsetModification&,MinorantExtender* mex){return 1;}
141 
142  // as in BundleData
143  //virtual int get_approximate_primal(PrimalData& ) const {return 1;}
144 
145  // as in BundleData
146  //virtual int get_center_primal(PrimalData& ) const {return 1;}
147 
148  //as in BundleData
149  //virtual int get_candidate_primal(PrimalData& ) const {return 1;}
150 
151  //as in BundleData
152  //virtual const SumBundle& get_sumbundle() const {return sumbundle;}
153 
154 };
155 
156 
158 
159 }
160 
161 #endif
162 
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
virtual void clear_aggregates()
delete all kinds of aggregates but keep explicit parts of the cutting model
CH_Matrix_Classes::Integer center_id
point id of the stored center
Definition: BundleData.hxx:96
CH_Matrix_Classes::Integer center_ub_fid
the function id returned on its computation
Definition: AFTData.hxx:71
CH_Matrix_Classes::Integer aggregate_fid
the function&#39;s aggregate id for which this aggregate was computed (this was returned by model for get...
Definition: AFTData.hxx:89
virtual bool model_aggregate_modified(CH_Matrix_Classes::Integer last_aggr_id)
check whether aggregate is available and has the same id
CH_Matrix_Classes::Integer aftpoint_id
increased whenever "a new point" (neither cand nor center) enters from outside or is created by chang...
Definition: AFTData.hxx:65
BundleData * clone() const
return a pointer to a clone of this
CH_Matrix_Classes::Integer cand_ub_fid
the function id returned on its computation
Definition: AFTData.hxx:81
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
virtual int do_step(CH_Matrix_Classes::Integer point_id)
if the candidate information is available and consitent for point_id, copy it from cand to center and...
CH_Matrix_Classes::Integer center_pid
aftpoint_id of the AFT-transformed center
Definition: AFTData.hxx:73
CH_Matrix_Classes::Matrix aft_center
AFT-transformed center.
Definition: AFTData.hxx:75
bool aggregate_available
true if still valid, false if outdated or not initialized
Definition: AFTData.hxx:92
CH_Matrix_Classes::Integer center_mid
modification_id for which center_offset and aft_center were computed, <0 if not initialized ...
Definition: AFTData.hxx:72
CH_Matrix_Classes::Integer cand_mid
modification_id for which cand_offset and aft_cand were computed, <0 if not initialized ...
Definition: AFTData.hxx:82
Header declaring the class ConicBundle::BundleData (see ConicBundle::SumBlockModel) ...
Matrix class for real values of type Real
Definition: matrix.hxx:74
virtual void clear_model(bool discard_minorants_only=false)
clear the cutting modle and all function evaluatoins
CH_Matrix_Classes::Integer cand_pid
aftpoint_id of the AFT-transformed cand
Definition: AFTData.hxx:83
virtual void clear(CH_Matrix_Classes::Integer start_modification_id=0)
reset to initial state (also used by the default constructor)
AFTData(CH_Matrix_Classes::Integer start_modification_id=0)
calls clear()
Definition: AFTData.hxx:103
CH_Matrix_Classes::Real center_offset
constant plus linear y term for modification id center_mid and center with point id center_id ...
Definition: AFTData.hxx:76
virtual int synchronize_ids(CH_Matrix_Classes::Integer &new_center_ub_fid, CH_Matrix_Classes::Integer new_center_id, CH_Matrix_Classes::Integer old_center_id, CH_Matrix_Classes::Integer &new_cand_ub_fid, CH_Matrix_Classes::Integer new_cand_id, CH_Matrix_Classes::Integer old_cand_id, CH_Matrix_Classes::Integer &new_aggregate_id, CH_Matrix_Classes::Integer new_prex_id=0)
synchronize ids in any case by discarding inconsistent parts but return number of errors ...
CH_Matrix_Classes::Integer function_id
the most recent (largest) function id known (-1 on initializaton or if model==0)
Definition: AFTData.hxx:66
CH_Matrix_Classes::Matrix aft_cand
AFT-transformed cand.
Definition: AFTData.hxx:85
base class for use with SumBlockModel for storing and managing essential data of evaluations and the ...
Definition: BundleData.hxx:77
CH_Matrix_Classes::Real cand_offset
constant plus linear y term for modification id center_mid and cand with point id cand_id ...
Definition: AFTData.hxx:86
virtual int init(const BundleData *bd)
initialize from other BundleData
virtual bool center_modified(CH_Matrix_Classes::Integer &function_id, CH_Matrix_Classes::Integer center_id)
check whether center computation is still valid for this point and modification id ...
specialized BundleData class for use with AFTModel for storing and managing essential data of evaluat...
Definition: AFTData.hxx:58