go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkLineSearchOptimizer.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkLineSearchOptimizer_h
16 #define __itkLineSearchOptimizer_h
17 
18 #include "itkSingleValuedNonLinearOptimizer.h"
19 
20 #include "itkIntTypes.h"//tmp
21 
22 namespace itk
23 {
24 
34 {
35 public:
36 
39  typedef SmartPointer<Self> Pointer;
40  typedef SmartPointer<const Self> ConstPointer;
41 
42  //itkNewMacro(Self); because this is an abstract base class.
44 
45  typedef Superclass::MeasureType MeasureType;
46  typedef Superclass::ParametersType ParametersType;
47  typedef Superclass::DerivativeType DerivativeType;
48  typedef Superclass::CostFunctionType CostFunctionType;
49 
51  virtual void SetLineSearchDirection( const ParametersType & arg )
52  {
53  this->m_LineSearchDirection = arg;
54  this->Modified();
55  }
56  itkGetConstReferenceMacro( LineSearchDirection, ParametersType );
57 
67  virtual void SetInitialDerivative(
68  const DerivativeType & itkNotUsed( derivative ) ) {};
69  virtual void SetInitialValue( MeasureType itkNotUsed( value ) ) {};
70 
81  virtual void GetCurrentValueAndDerivative(
82  MeasureType & value, DerivativeType & derivative ) const = 0;
83  virtual void GetCurrentDerivative( DerivativeType & derivative ) const = 0;
84  virtual MeasureType GetCurrentValue( void ) const = 0;
85 
91  itkGetConstMacro( CurrentStepLength, double );
92 
102  itkSetMacro( MinimumStepLength, double );
103  itkGetConstMacro( MinimumStepLength, double );
104  itkSetMacro( MaximumStepLength, double );
105  itkGetConstMacro( MaximumStepLength, double );
106  itkSetMacro( InitialStepLengthEstimate, double );
107  itkGetConstMacro( InitialStepLengthEstimate, double );
108 
109 protected:
110 
112  virtual ~LineSearchOptimizer() {};
113  void PrintSelf( std::ostream& os, Indent indent ) const;
114 
116 
122  virtual void SetCurrentStepLength( double step );
123 
125  double DirectionalDerivative( const DerivativeType & derivative ) const;
126 
127 private:
128  LineSearchOptimizer(const Self&); //purposely not implemented
129  void operator=(const Self&); //purposely not implemented
130 
132 
136 
137 }; // end class LineSearchOptimizer
138 
139 } // end namespace itk
140 
141 #endif // #ifndef __itkLineSearchOptimizer_h
SingleValuedNonLinearOptimizer Superclass
virtual void GetCurrentValueAndDerivative(MeasureType &value, DerivativeType &derivative) const =0
SmartPointer< Self > Pointer
void PrintSelf(std::ostream &os, Indent indent) const
virtual MeasureType GetCurrentValue(void) const =0
void operator=(const Self &)
double DirectionalDerivative(const DerivativeType &derivative) const
A base class for LineSearch optimizers.
Superclass::DerivativeType DerivativeType
virtual void SetCurrentStepLength(double step)
virtual void SetInitialValue(MeasureType)
virtual void GetCurrentDerivative(DerivativeType &derivative) const =0
Superclass::CostFunctionType CostFunctionType
Superclass::MeasureType MeasureType
SmartPointer< const Self > ConstPointer
virtual void SetInitialDerivative(const DerivativeType &)
Superclass::ParametersType ParametersType
virtual void SetLineSearchDirection(const ParametersType &arg)


Generated on 04-01-2014 for elastix by doxygen 1.8.5 elastix logo