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 
57 
58  itkGetConstReferenceMacro( LineSearchDirection, ParametersType );
59 
69  virtual void SetInitialDerivative(
70  const DerivativeType & itkNotUsed( derivative ) ) {}
71  virtual void SetInitialValue( MeasureType itkNotUsed( value ) ) {}
72 
83  virtual void GetCurrentValueAndDerivative(
84  MeasureType & value, DerivativeType & derivative ) const = 0;
85 
86  virtual void GetCurrentDerivative( DerivativeType & derivative ) const = 0;
87 
88  virtual MeasureType GetCurrentValue( void ) const = 0;
89 
95  itkGetConstMacro( CurrentStepLength, double );
96 
106  itkSetMacro( MinimumStepLength, double );
107  itkGetConstMacro( MinimumStepLength, double );
108  itkSetMacro( MaximumStepLength, double );
109  itkGetConstMacro( MaximumStepLength, double );
110  itkSetMacro( InitialStepLengthEstimate, double );
111  itkGetConstMacro( InitialStepLengthEstimate, double );
112 
113 protected:
114 
116  virtual ~LineSearchOptimizer() {}
117  void PrintSelf( std::ostream & os, Indent indent ) const;
118 
120 
126  virtual void SetCurrentStepLength( double step );
127 
129  double DirectionalDerivative( const DerivativeType & derivative ) const;
130 
131 private:
132 
133  LineSearchOptimizer( const Self & ); // purposely not implemented
134  void operator=( const Self & ); // purposely not implemented
135 
137 
141 
142 };
143 
144 } // end namespace itk
145 
146 #endif // #ifndef __itkLineSearchOptimizer_h
SingleValuedNonLinearOptimizer Superclass
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
virtual void GetCurrentValueAndDerivative(MeasureType &value, DerivativeType &derivative) const =0
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
virtual void SetInitialDerivative(const DerivativeType &)
Superclass::ParametersType ParametersType
virtual void SetLineSearchDirection(const ParametersType &arg)


Generated on 11-03-2014 for elastix by doxygen 1.8.6 elastix logo