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: 2005/03/07 03:39:58 $
00007   Version:   $Revision: 1.22 $
00008 
00009   Copyright (c) Insight Software 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( Maximize, bool );
00093   itkBooleanMacro( Maximize );
00094 
00096   itkSetMacro( MaximumIteration, unsigned int );
00097   itkGetConstReferenceMacro( MaximumIteration, unsigned int );
00098 
00100   itkSetMacro( GrowthFactor, double );
00101   itkGetConstReferenceMacro( GrowthFactor, double );
00102 
00104   itkSetMacro( ShrinkFactor, double );
00105   itkGetConstReferenceMacro( ShrinkFactor, double );
00106 
00108   itkSetMacro( InitialRadius, double ) ;
00109   itkGetConstReferenceMacro( InitialRadius, double );
00110 
00111 
00114   itkSetMacro( Epsilon, double );   
00115   itkGetConstReferenceMacro( Epsilon, double );   
00116 
00118   itkGetConstReferenceMacro( FrobeniusNorm, double );   
00119 
00120   void SetNormalVariateGenerator(NormalVariateGeneratorType* generator) ;
00121 
00128   void Initialize(double initialRadius, double grow = -1, double shrink = -1) ;
00129 
00131   itkGetConstReferenceMacro( CurrentCost, MeasureType );
00132   MeasureType GetValue() const { return this->GetCurrentCost(); }
00133 
00135   itkGetConstReferenceMacro( CurrentIteration, unsigned int) ;
00136 
00140   void StartOptimization() ;
00141 
00145   void StopOptimization() 
00146   { m_Stop = true ; }
00147 
00148 protected:
00149   OnePlusOneEvolutionaryOptimizer() ;
00150   OnePlusOneEvolutionaryOptimizer(const OnePlusOneEvolutionaryOptimizer&) ;
00151   virtual ~OnePlusOneEvolutionaryOptimizer() ;
00152   void PrintSelf(std::ostream& os, Indent indent) const;
00153 
00154 private:
00155   
00157   NormalVariateGeneratorType::Pointer m_RandomGenerator ;
00158 
00160   unsigned int m_MaximumIteration ;
00161 
00163   unsigned int m_CurrentIteration ;
00164 
00166   bool m_Maximize;
00167 
00170   double m_Epsilon ;
00171 
00173   double m_InitialRadius ;
00174 
00176   double m_GrowthFactor ;
00177 
00179   double m_ShrinkFactor ;
00180 
00182   bool m_Initialized ;
00183 
00185   MeasureType       m_CurrentCost;
00186 
00191   bool m_Stop ;
00192 
00195   double m_FrobeniusNorm;
00196   
00197 } ; // end of class
00198 
00199 } // end of namespace itk
00200 
00201 #endif

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