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
26namespace itk
27{
28
38{
39public:
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
74 const DerivativeType & itkNotUsed( derivative ) ) {}
75 virtual void SetInitialValue( MeasureType itkNotUsed( value ) ) {}
76
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
117protected:
118
121 void PrintSelf( std::ostream & os, Indent indent ) const override;
122
124
130 virtual void SetCurrentStepLength( double step );
131
133 double DirectionalDerivative( const DerivativeType & derivative ) const;
134
135private:
136
137 LineSearchOptimizer( const Self & ); // purposely not implemented
138 void operator=( const Self & ); // purposely not implemented
139
141
145
146};
147
148} // end namespace itk
149
150#endif // #ifndef __itkLineSearchOptimizer_h
A base class for LineSearch optimizers.
virtual void GetCurrentDerivative(DerivativeType &derivative) const =0
LineSearchOptimizer(const Self &)
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::ParametersType ParametersType
Superclass::MeasureType MeasureType
virtual void SetCurrentStepLength(double step)
double DirectionalDerivative(const DerivativeType &derivative) const
void operator=(const Self &)
virtual MeasureType GetCurrentValue(void) const =0
Superclass::CostFunctionType CostFunctionType
virtual void SetLineSearchDirection(const ParametersType &arg)
Superclass::DerivativeType DerivativeType
SingleValuedNonLinearOptimizer Superclass
virtual void SetInitialDerivative(const DerivativeType &)
virtual void SetInitialValue(MeasureType)
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
virtual void GetCurrentValueAndDerivative(MeasureType &value, DerivativeType &derivative) const =0


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo