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

itkOnePlusOneEvolutionaryOptimizer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkOnePlusOneEvolutionaryOptimizer.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/16 21:46:28 $
00007   Version:   $Revision: 1.12 $
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 __itkOnePlusOneEvolutionaryOptimizer_h
00018 #define __itkOnePlusOneEvolutionaryOptimizer_h
00019 
00020 #include <itkSingleValuedNonLinearOptimizer.h>
00021 #include <itkRandomVariateGeneratorBase.h>
00022 
00023 namespace itk
00024 {
00025 
00068 class ITK_EXPORT OnePlusOneEvolutionaryOptimizer: 
00069     public SingleValuedNonLinearOptimizer
00070 {
00071 public:
00073   typedef OnePlusOneEvolutionaryOptimizer     Self ;
00074   typedef SingleValuedNonLinearOptimizer      Superclass;
00075   typedef SmartPointer<Self>                  Pointer;
00076   typedef SmartPointer<const Self>            ConstPointer;
00077   
00079   itkNewMacro(Self);
00080  
00082   itkTypeMacro(OnePlusOneEvolutionaryOptimizer, SingleValuedNonLinearOptimizer );
00083  
00085   typedef  SingleValuedCostFunction         CostFunctionType;
00086   typedef  CostFunctionType::Pointer        CostFunctionPointer;
00087 
00089   typedef Statistics::RandomVariateGeneratorBase NormalVariateGeneratorType ;
00090   
00092   itkSetMacro( MaximumIteration, unsigned int );
00093   itkGetConstMacro( MaximumIteration, unsigned int );
00094 
00096   itkGetConstMacro( GrowthFactor, double );
00097 
00099   itkGetConstMacro( ShrinkFactor, double );
00100 
00102   itkGetConstMacro( InitialRadius, double );
00103 
00106   itkSetMacro( Epsilon, double );   
00107   itkGetConstMacro( Epsilon, double );   
00108 
00109   void SetNormalVariateGenerator(NormalVariateGeneratorType* generator) ;
00110 
00117   void Initialize(double initialRadius, double grow = -1, double shrink = -1) ;
00118 
00119   MeasureType GetCurrentCost()
00120   { return m_CurrentCost ; }
00121 
00122   itkGetConstMacro( CurrentIteration, unsigned int) ;
00126   void StartOptimization() ;
00127 
00131   void StopOptimization() 
00132   { m_Stop = true ; }
00133 
00134 protected:
00135   OnePlusOneEvolutionaryOptimizer() ;
00136   virtual ~OnePlusOneEvolutionaryOptimizer() ;
00137   void PrintSelf(std::ostream& os, Indent indent) const;
00138 
00139 private:
00140   
00142   NormalVariateGeneratorType* m_RandomGenerator ;
00143 
00145   unsigned int m_MaximumIteration ;
00146 
00148   unsigned int m_CurrentIteration ;
00149 
00152   double m_Epsilon ;
00153 
00155   double m_InitialRadius ;
00156 
00158   double m_GrowthFactor ;
00159 
00161   double m_ShrinkFactor ;
00162 
00164   bool m_Initialized ;
00165 
00167   MeasureType       m_CurrentCost;
00168 
00173   bool m_Stop ;
00174 } ; // end of class
00175 
00176 } // end of namespace itk
00177 
00178 #endif

Generated at Wed Mar 12 01:13:09 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000