OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | List of all members
otb::Statistics::FlexibleDistanceWithMissingValue< TVector > Class Template Reference

#include <otbFlexibleDistanceWithMissingValue.h>

+ Inheritance diagram for otb::Statistics::FlexibleDistanceWithMissingValue< TVector >:
+ Collaboration diagram for otb::Statistics::FlexibleDistanceWithMissingValue< TVector >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
 
typedef itk::SmartPointer< SelfPointer
 
typedef FlexibleDistanceWithMissingValue Self
 
typedef otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2< TVector > Superclass
 
typedef TVector::ValueType ValueType
 
- Public Types inherited from otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2< TVector >
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
 
typedef itk::SmartPointer< SelfPointer
 
typedef EuclideanDistanceMetricWithMissingValuePow2 Self
 
typedef itk::Statistics::EuclideanDistanceMetric< TVector > Superclass
 
typedef TVector::ValueType ValueType
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
double Evaluate (const TVector &x) const override
 
double Evaluate (const TVector &x1, const TVector &x2) const override
 
double Evaluate (const ValueType &a, const ValueType &b) const
 
virtual const char * GetNameOfClass () const
 
bool IsWithinRange (const TVector &x, const double radius) const
 
- Public Member Functions inherited from otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2< TVector >
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
double Evaluate (const TVector &x) const override
 
double Evaluate (const TVector &x1, const TVector &x2) const override
 
double Evaluate (const ValueType &a, const ValueType &b) const
 
bool IsWithinRange (const TVector &x, const double radius) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2< TVector >
static bool IsMissingValue (const ValueType &v)
 
static Pointer New ()
 
static void SetToMissingValue (ValueType &v)
 
static double Alpha = 1.0
 
static double Beta = 2.0
 
static void SetAlphaBeta (double a, double b)
 
static bool IsEuclidean ()
 
 FlexibleDistanceWithMissingValue ()
 
 ~FlexibleDistanceWithMissingValue () override
 

Additional Inherited Members

- Protected Member Functions inherited from otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2< TVector >
 EuclideanDistanceMetricWithMissingValuePow2 ()
 
 ~EuclideanDistanceMetricWithMissingValuePow2 () override
 

Detailed Description

template<class TVector>
class otb::Statistics::FlexibleDistanceWithMissingValue< TVector >

Non-Euclidean distance function facing missing value.

This class is derived from EuclideanDistanceMetricWithMissingValuePow2 class to deal with missing data. In addition, the initial Evaluate method performs a flexible calculation of distance when a component does contain data.

The general formulation is defined as: $ d(x, y) = \sum_i | x_i^a - y_i^a |^b. $

The class can be templated over any container that holds data elements, as for template of EuclideanDistanceMetric.

The only restriction is that elements have to support

NaN

.

See also
EuclideanDistanceMetricWithMissingValuePow2

Definition at line 56 of file otbFlexibleDistanceWithMissingValue.h.

Member Typedef Documentation

◆ ConstPointer

template<class TVector >
typedef itk::SmartPointer<const Self> otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::ConstPointer

Definition at line 63 of file otbFlexibleDistanceWithMissingValue.h.

◆ MeasurementVectorSizeType

template<class TVector >
typedef Superclass::MeasurementVectorSizeType otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::MeasurementVectorSizeType

Definition at line 65 of file otbFlexibleDistanceWithMissingValue.h.

◆ Pointer

template<class TVector >
typedef itk::SmartPointer<Self> otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::Pointer

Definition at line 62 of file otbFlexibleDistanceWithMissingValue.h.

◆ Self

Standard "Self" typedef.

Definition at line 60 of file otbFlexibleDistanceWithMissingValue.h.

◆ Superclass

Definition at line 61 of file otbFlexibleDistanceWithMissingValue.h.

◆ ValueType

template<class TVector >
typedef TVector::ValueType otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::ValueType

Type of the component of a vector

Definition at line 71 of file otbFlexibleDistanceWithMissingValue.h.

Constructor & Destructor Documentation

◆ FlexibleDistanceWithMissingValue()

template<class TVector >
otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::FlexibleDistanceWithMissingValue ( )
inlineprotected

Set the value of the parameter a and b. Those parameters are defined as static component in order to call it far away from the instantiation of the class (through the SOME training for instance)

Static variable instantiation

Definition at line 105 of file otbFlexibleDistanceWithMissingValue.h.

◆ ~FlexibleDistanceWithMissingValue()

template<class TVector >
otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::~FlexibleDistanceWithMissingValue ( )
inlineoverrideprotected

Set the value of the parameter a and b. Those parameters are defined as static component in order to call it far away from the instantiation of the class (through the SOME training for instance)

Static variable instantiation

Definition at line 108 of file otbFlexibleDistanceWithMissingValue.h.

Member Function Documentation

◆ CreateAnother()

template<class TVector >
virtual::itk::LightObject::Pointer otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::CreateAnother ( void  ) const

◆ Evaluate() [1/3]

template<class TVector >
double otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::Evaluate ( const TVector &  x) const
inlineoverride

Gets the distance between the origin and x

Definition at line 61 of file otbFlexibleDistanceWithMissingValue.hxx.

◆ Evaluate() [2/3]

template<class TVector >
double otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::Evaluate ( const TVector &  x1,
const TVector &  x2 
) const
inlineoverride

Gets the distance between x1 and x2

Definition at line 36 of file otbFlexibleDistanceWithMissingValue.hxx.

◆ Evaluate() [3/3]

template<class TVector >
double otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::Evaluate ( const ValueType a,
const ValueType b 
) const
inline

Gets the coordinate distance between a and b. NOTE: a and b should be type of component

Definition at line 91 of file otbFlexibleDistanceWithMissingValue.hxx.

◆ GetNameOfClass()

template<class TVector >
virtual const char* otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from otb::Statistics::EuclideanDistanceMetricWithMissingValuePow2< TVector >.

◆ IsEuclidean()

template<class TVector >
bool otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::IsEuclidean
static

test if it is ordinary Euclidean distance

Definition at line 112 of file otbFlexibleDistanceWithMissingValue.hxx.

◆ IsWithinRange()

template<class TVector >
bool otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::IsWithinRange ( const TVector &  x,
const double  radius 
) const
inline

Returns true if the distance between x and the origin is less than radius

Definition at line 88 of file otbFlexibleDistanceWithMissingValue.h.

◆ New()

template<class TVector >
static Pointer otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::New ( )
static

Method for creation through the object factory.

◆ SetAlphaBeta()

template<class TVector >
void otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::SetAlphaBeta ( double  a,
double  b 
)
static

Set the value of the parameter a and b. Those parameters are defined as static component in order to call it far away from the instantiation of the class (through the SOME training for instance)

Static variable instantiation

Definition at line 105 of file otbFlexibleDistanceWithMissingValue.hxx.

Member Data Documentation

◆ Alpha

template<class TVector >
double otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::Alpha = 1.0
static

Set the value of the parameter a and b. Those parameters are defined as static component in order to call it far away from the instantiation of the class (through the SOME training for instance)

Static variable instantiation

Definition at line 96 of file otbFlexibleDistanceWithMissingValue.h.

◆ Beta

template<class TVector >
double otb::Statistics::FlexibleDistanceWithMissingValue< TVector >::Beta = 2.0
static

Set the value of the parameter a and b. Those parameters are defined as static component in order to call it far away from the instantiation of the class (through the SOME training for instance)

Static variable instantiation

Definition at line 97 of file otbFlexibleDistanceWithMissingValue.h.


The documentation for this class was generated from the following files: