ITK  5.2.0
Insight Toolkit
itkSingleValuedCostFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 #ifndef itkSingleValuedCostFunction_h
19 #define itkSingleValuedCostFunction_h
20 
21 #include "itkCostFunction.h"
22 #include "itkNumericTraits.h"
23 #include "ITKOptimizersExport.h"
24 
25 namespace itk
26 {
34 class ITKOptimizers_EXPORT SingleValuedCostFunction : public CostFunction
35 {
36 public:
37  ITK_DISALLOW_COPY_AND_MOVE(SingleValuedCostFunction);
38 
44 
47 
50  using MeasureType = double;
51 
54  using ParametersType = Superclass::ParametersType;
55  using ParametersValueType = Superclass::ParametersValueType;
56 
60 
63  virtual MeasureType
64  GetValue(const ParametersType & parameters) const = 0;
65 
68  virtual void
69  GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const = 0;
70 
73  virtual void
74  GetValueAndDerivative(const ParametersType & parameters, MeasureType & value, DerivativeType & derivative) const;
75 
76 protected:
77  SingleValuedCostFunction() = default;
78  ~SingleValuedCostFunction() override;
79 };
80 } // end namespace itk
81 
82 #endif
itk::SingleValuedCostFunction::MeasureType
double MeasureType
Definition: itkSingleValuedCostFunction.h:50
itk::OptimizerParameters< TInternalComputationValueType >
itk::CostFunction
CostFunctionTemplate< double > CostFunction
Definition: itkCostFunction.h:69
itk::SmartPointer< Self >
itkCostFunction.h
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::SingleValuedCostFunction
This class is a base for the CostFunctions returning a single value.
Definition: itkSingleValuedCostFunction.h:34
itk::CostFunctionTemplate::ParametersValueType
TInternalComputationValueType ParametersValueType
Definition: itkCostFunction.h:52
itk::CostFunctionTemplate
Definition: itkCostFunction.h:36
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Array
Array class with size defined at construction time.
Definition: itkArray.h:47
itkNumericTraits.h