OTB  9.0.0
Orfeo Toolbox
otbFlexibleDistanceWithMissingValue.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  * Copyright (C) 2007-2012 Institut Mines Telecom / Telecom Bretagne
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 
23 #ifndef otbFlexibleDistanceWithMissingValue_h
24 #define otbFlexibleDistanceWithMissingValue_h
25 
27 
28 namespace otb
29 {
30 
31 namespace Statistics
32 {
33 
55 template <class TVector>
57 {
58 public:
62  typedef itk::SmartPointer<Self> Pointer;
63  typedef itk::SmartPointer<const Self> ConstPointer;
64 
65  typedef typename Superclass::MeasurementVectorSizeType MeasurementVectorSizeType;
66 
69 
71  itkNewMacro(Self);
72 
74  typedef typename TVector::ValueType ValueType;
75 
77  double Evaluate(const TVector& x) const override;
78 
80  double Evaluate(const TVector& x1, const TVector& x2) const override;
81 
84  double Evaluate(const ValueType& a, const ValueType& b) const;
85 
88  bool IsWithinRange(const TVector& x, const double radius) const
89  {
90  return Superclass::IsWithinRange(x, radius);
91  }
92 
96  static double Alpha;
97  static double Beta;
98  static void SetAlphaBeta(double a, double b);
100 
102  static bool IsEuclidean();
103 
104 protected:
106  {
107  }
109  {
110  }
111 }; // end of class
112 
114 template <class TVector>
116 
117 template <class TVector>
119 
120 } // end namespace statistics
121 
122 } // end namespace otb
123 
124 #ifndef OTB_MANUAL_INSTANTIATION
126 #endif
127 
128 #endif
otbFlexibleDistanceWithMissingValue.hxx
otb::Statistics::FlexibleDistanceWithMissingValue
Non-Euclidean distance function facing missing value.
Definition: otbFlexibleDistanceWithMissingValue.h:56
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Statistics::FlexibleDistanceWithMissingValue::Self
FlexibleDistanceWithMissingValue Self
Definition: otbFlexibleDistanceWithMissingValue.h:60
otb::Statistics::FlexibleDistanceWithMissingValue::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbFlexibleDistanceWithMissingValue.h:63
otb::Statistics::FlexibleDistanceWithMissingValue::Superclass
otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2< TVector > Superclass
Definition: otbFlexibleDistanceWithMissingValue.h:61
otb::Statistics::FlexibleDistanceWithMissingValue::IsWithinRange
bool IsWithinRange(const TVector &x, const double radius) const
Definition: otbFlexibleDistanceWithMissingValue.h:88
otb::Statistics::FlexibleDistanceWithMissingValue::~FlexibleDistanceWithMissingValue
~FlexibleDistanceWithMissingValue() override
Definition: otbFlexibleDistanceWithMissingValue.h:108
otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2
Euclidean comparison distance function facing missing value. The square root is not performed in this...
Definition: otbEuclideanDistanceMetricWithMissingValuePow2.h:53
otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2::ValueType
TVector::ValueType ValueType
Definition: otbEuclideanDistanceMetricWithMissingValuePow2.h:67
otbEuclideanDistanceMetricWithMissingValuePow2.h
otb::Statistics::FlexibleDistanceWithMissingValue::Alpha
static double Alpha
Definition: otbFlexibleDistanceWithMissingValue.h:96
otb::Statistics::FlexibleDistanceWithMissingValue::FlexibleDistanceWithMissingValue
FlexibleDistanceWithMissingValue()
Definition: otbFlexibleDistanceWithMissingValue.h:105
otb::Statistics::FlexibleDistanceWithMissingValue::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbFlexibleDistanceWithMissingValue.h:62
otb::Statistics::FlexibleDistanceWithMissingValue::MeasurementVectorSizeType
Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
Definition: otbFlexibleDistanceWithMissingValue.h:65
otb::Statistics::FlexibleDistanceWithMissingValue::ValueType
TVector::ValueType ValueType
Definition: otbFlexibleDistanceWithMissingValue.h:71
otb::Statistics::FlexibleDistanceWithMissingValue::Beta
static double Beta
Definition: otbFlexibleDistanceWithMissingValue.h:97