PCL
pcl::TwoSidedEstimate Struct Reference

Two-sided descriptive statistical estimate. More...

#include <Math.h>

Public Member Functions

 TwoSidedEstimate ()=default
 
template<typename T >
 TwoSidedEstimate (const T &x)
 
template<typename T1 , typename T2 >
 TwoSidedEstimate (const T1 &l, const T2 &h)
 
 TwoSidedEstimate (const TwoSidedEstimate &)=default
 
 TwoSidedEstimate (TwoSidedEstimate &&)=default
 
bool IsValid () const noexcept
 
double Mean () const noexcept
 
 operator double () const noexcept
 
TwoSidedEstimate operator* (double x) const noexcept
 
TwoSidedEstimateoperator*= (double x) noexcept
 
TwoSidedEstimate operator/ (const TwoSidedEstimate &e) const noexcept
 
TwoSidedEstimate operator/ (double x) const noexcept
 
TwoSidedEstimateoperator/= (const TwoSidedEstimate &e) noexcept
 
TwoSidedEstimateoperator/= (double x) noexcept
 
TwoSidedEstimateoperator= (const TwoSidedEstimate &)=default
 
TwoSidedEstimateoperator= (TwoSidedEstimate &&)=default
 
double Total () const noexcept
 

Public Attributes

double high = 0
 High estimate component.
 
double low = 0
 Low estimate component.
 

Detailed Description

This POD structure is returned by functions implementing two-sided scale estimators. Given a sample X = {x_0,...,x_n-1} and a reference center value m (typically, the median of X), a two-sided scale estimate is computed as two separate components: A low estimate for all x in X such that x ≤ m, and a high estimate for all x in X such that x > m.

Two-sided scale estimates are important in normalization for accurate outlier rejection and sample distribution characterization, especially for skewed or asymmetric distributions.

See also
TwoSidedAvgDev(), TwoSidedMAD(), TwoSidedBiweightMidvariance()

Definition at line 3527 of file Math.h.

Constructor & Destructor Documentation

◆ TwoSidedEstimate() [1/5]

pcl::TwoSidedEstimate::TwoSidedEstimate ( )
default

Default constructor. Both components are initialized to zero.

◆ TwoSidedEstimate() [2/5]

pcl::TwoSidedEstimate::TwoSidedEstimate ( const TwoSidedEstimate )
default

Copy constructor.

◆ TwoSidedEstimate() [3/5]

pcl::TwoSidedEstimate::TwoSidedEstimate ( TwoSidedEstimate &&  )
default

Move constructor.

◆ TwoSidedEstimate() [4/5]

template<typename T1 , typename T2 >
pcl::TwoSidedEstimate::TwoSidedEstimate ( const T1 &  l,
const T2 &  h 
)
inline

Constructor from separate low and high components.

Definition at line 3561 of file Math.h.

◆ TwoSidedEstimate() [5/5]

template<typename T >
pcl::TwoSidedEstimate::TwoSidedEstimate ( const T &  x)
inline

Constructor from a unique component value x, which is assigned to both the low and high estimate components.

Definition at line 3572 of file Math.h.

Member Function Documentation

◆ IsValid()

bool pcl::TwoSidedEstimate::IsValid ( ) const
inlinenoexcept

Returns true iff this two-sided scale estimate is valid. A two-sided scale estimate is valid if both the low and high components are finite, positive and nonzero with respect to the machine epsilon for the type double.

Definition at line 3583 of file Math.h.

References high, pcl::IsFinite(), and low.

◆ Mean()

double pcl::TwoSidedEstimate::Mean ( ) const
inlinenoexcept

Returns the arithmetic mean of the low and high estimate components if both are nonzero. Otherwise returns the maximum component.

Definition at line 3601 of file Math.h.

References high, and low.

Referenced by operator double().

◆ operator double()

pcl::TwoSidedEstimate::operator double ( ) const
inlineexplicitnoexcept

Conversion to scalar. Equivalent to Mean().

Definition at line 3615 of file Math.h.

References Mean().

◆ operator*()

TwoSidedEstimate pcl::TwoSidedEstimate::operator* ( double  x) const
inlinenoexcept

Returns the result of multiplying this two-sided estimate by a scalar.

Definition at line 3655 of file Math.h.

References high, and low.

◆ operator*=()

TwoSidedEstimate& pcl::TwoSidedEstimate::operator*= ( double  x)
inlinenoexcept

Assignment-multiplication by a scalar. Returns a reference to this object.

Definition at line 3624 of file Math.h.

References high, and low.

◆ operator/() [1/2]

TwoSidedEstimate pcl::TwoSidedEstimate::operator/ ( const TwoSidedEstimate e) const
inlinenoexcept

Returns the result of the component wise division of this two-sided estimate by another two-sided estimate.

Definition at line 3672 of file Math.h.

References high, and low.

◆ operator/() [2/2]

TwoSidedEstimate pcl::TwoSidedEstimate::operator/ ( double  x) const
inlinenoexcept

Returns the result of dividing this two-sided estimate by a scalar.

Definition at line 3663 of file Math.h.

References high, and low.

◆ operator/=() [1/2]

TwoSidedEstimate& pcl::TwoSidedEstimate::operator/= ( const TwoSidedEstimate e)
inlinenoexcept

Assignment-division by a two-sided estimate. Returns a reference to this object.

Definition at line 3645 of file Math.h.

References high, and low.

◆ operator/=() [2/2]

TwoSidedEstimate& pcl::TwoSidedEstimate::operator/= ( double  x)
inlinenoexcept

Assignment-division by a scalar. Returns a reference to this object.

Definition at line 3634 of file Math.h.

References high, and low.

◆ operator=() [1/2]

TwoSidedEstimate& pcl::TwoSidedEstimate::operator= ( const TwoSidedEstimate )
default

Copy assignment operator.

◆ operator=() [2/2]

TwoSidedEstimate& pcl::TwoSidedEstimate::operator= ( TwoSidedEstimate &&  )
default

Move assignment operator.

◆ Total()

double pcl::TwoSidedEstimate::Total ( ) const
inlinenoexcept

Returns the sum of the low and high estimate components.

Definition at line 3592 of file Math.h.

References high, and low.


The documentation for this struct was generated from the following file: