Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkLBFGSBOptimizer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkLBFGSBOptimizer.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/11/04 20:40:41 $
00007   Version:   $Revision: 1.5 $
00008 
00009   Copyright (c) 2002 Insight Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkLBFGSBOptimizer_h
00018 #define __itkLBFGSBOptimizer_h
00019 
00020 #include "itkSingleValuedNonLinearOptimizer.h"
00021 #include <string>
00022 
00023 namespace itk
00024 {
00025   
00051 class ITK_EXPORT LBFGSBOptimizer : 
00052     public SingleValuedNonLinearOptimizer
00053 {
00054 public:
00056   typedef LBFGSBOptimizer                     Self;
00057   typedef SingleValuedNonLinearOptimizer      Superclass;
00058   typedef SmartPointer<Self>                  Pointer;
00059   typedef SmartPointer<const Self>            ConstPointer;
00060   
00062   itkNewMacro(Self);
00063 
00065   itkTypeMacro( LBFGSBOptimizer, SingleValuedNonLinearOptimizer );
00066 
00070   typedef Array<double>             BoundValueType;
00071 
00075   typedef Array<int>                BoundSelectionType;
00076 
00078   void StartOptimization( void );
00079 
00081   typedef  SingleValuedCostFunction         CostFunctionType;
00082   typedef  CostFunctionType::Pointer        CostFunctionPointer;
00083   typedef  CostFunctionType::MeasureType    MeasureType;
00084 
00086   virtual void SetLowerBound( const BoundValueType & value );
00087   virtual const BoundValueType & GetLowerBound();
00088 
00090   virtual void SetUpperBound( const BoundValueType & value );
00091   virtual const BoundValueType & GetUpperBound();
00092 
00099   virtual void SetBoundSelection( const BoundSelectionType & select );
00100   virtual const BoundSelectionType & GetBoundSelection();
00101 
00108   itkSetMacro( CostFunctionConvergenceFactor, double );
00109   itkGetMacro( CostFunctionConvergenceFactor, double );
00110 
00115   itkSetMacro( ProjectedGradientTolerance, double );
00116   itkGetMacro( ProjectedGradientTolerance, double );
00117 
00119   itkSetMacro( MaximumNumberOfIterations, unsigned int );
00120   itkGetMacro( MaximumNumberOfIterations, unsigned int );
00121 
00123   itkSetMacro( MaximumNumberOfEvaluations, unsigned int );
00124   itkGetMacro( MaximumNumberOfEvaluations, unsigned int );
00125 
00127   itkSetMacro( MaximumNumberOfCorrections, unsigned int );
00128   itkGetMacro( MaximumNumberOfCorrections, unsigned int );
00129 
00131   void SetScales( const ScalesType & )
00132     {
00133     itkExceptionMacro( << "This optimizer does not support scales." );
00134     }
00135 
00137   itkGetConstReferenceMacro( CurrentIteration, unsigned int );
00138 
00140   itkGetConstReferenceMacro( Value, MeasureType );
00141 
00144   itkGetConstReferenceMacro( InfinityNormOfProjectedGradient, double );
00145 
00146 protected:
00147   LBFGSBOptimizer();
00148   virtual ~LBFGSBOptimizer();
00149   void PrintSelf(std::ostream& os, Indent indent) const;
00150 
00151 
00152 private:
00153   LBFGSBOptimizer(const Self&); //purposely not implemented
00154   void operator=(const Self&); //purposely not implemented
00155   
00156   BoundValueType        m_LowerBound;
00157   BoundValueType        m_UpperBound;
00158   BoundSelectionType    m_BoundSelection;
00159 
00160   double                m_CostFunctionConvergenceFactor;
00161   double                m_ProjectedGradientTolerance;
00162   unsigned int          m_MaximumNumberOfIterations;
00163   unsigned int          m_MaximumNumberOfEvaluations;
00164   unsigned int          m_MaximumNumberOfCorrections;
00165 
00166   unsigned int          m_CurrentIteration;
00167   MeasureType           m_Value;
00168   double                m_InfinityNormOfProjectedGradient;
00169 
00170 };
00171 
00172 } // end namespace itk
00173 
00174 
00175 
00176 #endif
00177 
00178 
00179 

Generated at Wed May 24 23:32:50 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000