20#ifndef __stir_recon_buildblock_SumOfGeneralisedObjectiveFunctions_H__
21#define __stir_recon_buildblock_SumOfGeneralisedObjectiveFunctions_H__
37template <
typename ObjFuncT,
typename TargetT,
typename ParentT = GeneralisedObjectiveFunction<TargetT>>
38class SumOfGeneralisedObjectiveFunctions :
public ParentT
40 typedef ParentT base_type;
41 typedef SumOfGeneralisedObjectiveFunctions<ObjFuncT, TargetT, ParentT> self_type;
44 inline SumOfGeneralisedObjectiveFunctions();
46 template <
typename IterT>
47 inline SumOfGeneralisedObjectiveFunctions(IterT begin, IterT end);
49 inline virtual ~SumOfGeneralisedObjectiveFunctions();
51 template <
typename IterT>
52 inline void set_functions(IterT begin, IterT end);
84 typedef std::vector<ObjFuncT> _functions_type;
85 typedef typename _functions_type::iterator _functions_iterator_type;
86 typedef typename _functions_type::const_iterator _functions_const_iterator_type;
87 _functions_type _functions;
Declaration of class stir::GeneralisedObjectiveFunction.
Implementation of class stir::SumOfGeneralisedObjectiveFunctions.
virtual TargetT * construct_target_ptr() const =0
Creates a suitable target as determined by the parameters.
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
virtual Succeeded set_up(shared_ptr< TargetT > const &target_sptr)
Has to be called before using this object.
Definition SumOfGeneralisedObjectiveFunctions.inl:64
virtual int set_num_subsets(const int num_subsets)
Attempts to change the number of subsets.
Definition SumOfGeneralisedObjectiveFunctions.inl:114
virtual double actual_compute_objective_function_without_penalty(const TargetT ¤t_estimate, const int subset_num)
Implementation of function that computes the objective function for the current subset.
Definition SumOfGeneralisedObjectiveFunctions.inl:97
virtual void compute_sub_gradient_without_penalty(TargetT &gradient, const TargetT ¤t_estimate, const int subset_num)
This computes the gradient of the unregularised objective function at the current_estimate.
Definition SumOfGeneralisedObjectiveFunctions.inl:82
virtual bool actual_subsets_are_approximately_balanced(std::string &warning_message) const
Implementation of function that checks subset balancing.
Definition SumOfGeneralisedObjectiveFunctions.inl:131
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...