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  * Copyright UMC Utrecht and contributors
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef __itkLineSearchOptimizer_h
20 #define __itkLineSearchOptimizer_h
21 
22 #include "itkSingleValuedNonLinearOptimizer.h"
23 
24 #include "itkIntTypes.h" //tmp
25 
26 namespace itk
27 {
28 
38 {
39 public:
40 
44  typedef SmartPointer< const Self > ConstPointer;
45 
46  //itkNewMacro(Self); because this is an abstract base class.
48 
49  typedef Superclass::MeasureType MeasureType;
50  typedef Superclass::ParametersType ParametersType;
51  typedef Superclass::DerivativeType DerivativeType;
52  typedef Superclass::CostFunctionType CostFunctionType;
53 
55  virtual void SetLineSearchDirection( const ParametersType & arg )
56  {
57  this->m_LineSearchDirection = arg;
58  this->Modified();
59  }
60 
61 
62  itkGetConstReferenceMacro( LineSearchDirection, ParametersType );
63 
73  virtual void SetInitialDerivative(
74  const DerivativeType & itkNotUsed( derivative ) ) {}
75  virtual void SetInitialValue( MeasureType itkNotUsed( value ) ) {}
76 
87  virtual void GetCurrentValueAndDerivative(
88  MeasureType & value, DerivativeType & derivative ) const = 0;
89 
90  virtual void GetCurrentDerivative( DerivativeType & derivative ) const = 0;
91 
92  virtual MeasureType GetCurrentValue( void ) const = 0;
93 
99  itkGetConstMacro( CurrentStepLength, double );
100 
110  itkSetMacro( MinimumStepLength, double );
111  itkGetConstMacro( MinimumStepLength, double );
112  itkSetMacro( MaximumStepLength, double );
113  itkGetConstMacro( MaximumStepLength, double );
114  itkSetMacro( InitialStepLengthEstimate, double );
115  itkGetConstMacro( InitialStepLengthEstimate, double );
116 
117 protected:
118 
120  virtual ~LineSearchOptimizer() {}
121  void PrintSelf( std::ostream & os, Indent indent ) const;
122 
124 
130  virtual void SetCurrentStepLength( double step );
131 
133  double DirectionalDerivative( const DerivativeType & derivative ) const;
134 
135 private:
136 
137  LineSearchOptimizer( const Self & ); // purposely not implemented
138  void operator=( const Self & ); // purposely not implemented
139 
140  ParametersType m_LineSearchDirection;
141 
145 
146 };
147 
148 } // end namespace itk
149 
150 #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 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo