00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __mitkLBFGSBOptimizer_h
00012 #define __mitkLBFGSBOptimizer_h
00013
00014 #include "mitkOptimizer.h"
00015
00016
00017 typedef mitk_nl_vector<long> VectorModeType;
00018 typedef long ScalarModeType;
00019
00024 class MITK_REGISTRATION_API mitkLBFGSBOptimizer : public mitkOptimizer
00025 {
00026 public:
00027 MITK_TYPE(mitkLBFGSBOptimizer, mitkOptimizer)
00028
00029 virtual void PrintSelf(ostream &os);
00030
00031 mitkLBFGSBOptimizer();
00032
00033 void GetValue( const VectorParameterType& x, ScalarParameterType& f, VectorParameterType& g);
00034
00036 void SetLowerBound(const VectorParameterType& bound) { m_LowerBound = bound; }
00037 const VectorParameterType& GetLowerBound() { return m_LowerBound; }
00038
00040 void SetUpperBound(const VectorParameterType& bound) { m_UpperBound = bound; }
00041 const VectorParameterType& GetUpperBound() { return m_UpperBound; }
00042
00049 void SetBoundSelection(const VectorModeType& selection) { m_BoundSelection = selection; }
00050 const VectorModeType& GetBoundSelection() { return m_BoundSelection; }
00051
00058 void SetCostFunctionConvergenceFactor(double factor) { m_CostFunctionConvergenceFactor = factor; }
00059 const double GetCostFunctionConvergenceFactor() { return m_CostFunctionConvergenceFactor; }
00060
00065 void SetProjectedGradientTolerance( double tol) { m_ProjectedGradientTolerance = tol; }
00066 const double GetProjectedGradientTolerance() { return m_ProjectedGradientTolerance; }
00067
00069 void SetMaximumEvaluations( unsigned int eval ) { m_MaximumEvaluations = eval; }
00070 const unsigned int GetMaximumEvaluations() { return m_MaximumEvaluations; }
00071
00073 void SetMaximumCorrections( unsigned int corr ) { m_MaximumCorrections = corr; }
00074 const unsigned int GetMaximumCorrections() {return m_MaximumCorrections; }
00075
00076 unsigned int m_CurrentIteration;
00077
00078 protected:
00079 virtual ~mitkLBFGSBOptimizer();
00080 virtual bool Execute();
00081
00082 VectorParameterType m_LowerBound;
00083 VectorParameterType m_UpperBound;
00084 VectorModeType m_BoundSelection;
00085
00086 double m_CostFunctionConvergenceFactor;
00087 double m_ProjectedGradientTolerance;
00088 unsigned int m_MaximumEvaluations;
00089 unsigned int m_MaximumCorrections;
00090
00091 ScalarParameterType m_Value;
00092 double m_InfinityNormOfProjectedGradient;
00093
00094 private:
00095 mitkLBFGSBOptimizer(const mitkLBFGSBOptimizer&);
00096 void operator = (const mitkLBFGSBOptimizer&);
00097
00098 };
00099
00100
00101
00102
00103
00104
00105 #endif
00106