PCL

Classes  
struct  pcl::TwoSidedEstimate 
Twosided descriptive statistical estimate. More...  
Functions  
template<typename T >  
double  pcl::AvgDev (const T *i, const T *j, double center) 
template<typename T >  
double  pcl::AvgDev (const T *i, const T *j) 
template<typename T >  
double  pcl::BendMidvariance (const T *x, const T *xn, double center, double beta=0.2) 
template<typename T >  
double  pcl::BiweightMidvariance (const T *x, const T *xn, double center, double sigma, int k=9, bool reducedLength=false) 
template<typename T >  
double  pcl::MAD (const T *i, const T *j, double center) 
template<typename T >  
double  pcl::MAD (const T *i, const T *j) 
template<typename T >  
double  pcl::Mean (const T *i, const T *j) 
template<class T >  
double  pcl::Median (const T *i, const T *j) 
template<typename T >  
double  pcl::MedianDestructive (T *i, T *j) 
template<typename T , class BP >  
double  pcl::MedianDestructive (T *i, T *j, BP p) 
template<typename T >  
double  pcl::Modulus (const T *i, const T *j) 
template<typename T >  
double  pcl::OrderStatistic (const T *i, const T *j, distance_type k) 
template<typename T >  
double  pcl::OrderStatisticDestructive (T *i, T *j, distance_type k) 
template<typename T , class BP >  
double  pcl::OrderStatisticDestructive (const T *i, const T *j, distance_type k, BP p) 
template<typename T >  
TwoSidedEstimate  pcl::Pow (const TwoSidedEstimate &e, T x) 
template<typename T >  
double  pcl::Qn (T *x, T *xn) 
template<typename T >  
double  pcl::Sn (T *x, T *xn) 
TwoSidedEstimate  pcl::Sqrt (const TwoSidedEstimate &e) 
template<typename T >  
double  pcl::StableAvgDev (const T *i, const T *j, double center) 
template<typename T >  
double  pcl::StableAvgDev (const T *i, const T *j) 
template<typename T >  
double  pcl::StableMean (const T *i, const T *j) 
template<typename T >  
double  pcl::StableModulus (const T *i, const T *j) 
template<typename T >  
double  pcl::StableSum (const T *i, const T *j) 
template<typename T >  
double  pcl::StableSumOfSquares (const T *i, const T *j) 
template<typename T >  
double  pcl::StdDev (const T *i, const T *j, double center) 
template<typename T >  
double  pcl::StdDev (const T *i, const T *j) 
template<typename T >  
double  pcl::Sum (const T *i, const T *j) 
template<typename T >  
double  pcl::SumOfSquares (const T *i, const T *j) 
template<typename T >  
double  pcl::TrimmedMean (const T *i, const T *j, distance_type l=1, distance_type h=1) 
template<typename T >  
double  pcl::TrimmedMeanDestructive (T *i, T *j, distance_type l=1, distance_type h=1) 
template<typename T >  
double  pcl::TrimmedMeanOfSquares (const T *i, const T *j, distance_type l=1, distance_type h=1) 
template<typename T >  
double  pcl::TrimmedMeanOfSquaresDestructive (T *i, T *j, distance_type l=1, distance_type h=1) 
template<typename T >  
TwoSidedEstimate  pcl::TwoSidedAvgDev (const T *i, const T *j, double center) 
template<typename T >  
TwoSidedEstimate  pcl::TwoSidedAvgDev (const T *i, const T *j) 
template<typename T >  
TwoSidedEstimate  pcl::TwoSidedBiweightMidvariance (const T *x, const T *xn, double center, const TwoSidedEstimate &sigma, int k=9, bool reducedLength=false) 
template<typename T >  
TwoSidedEstimate  pcl::TwoSidedMAD (const T *i, const T *j, double center) 
template<typename T >  
TwoSidedEstimate  pcl::TwoSidedMAD (const T *i, const T *j) 
template<typename T >  
double  pcl::Variance (const T *i, const T *j, double center) 
template<typename T >  
double  pcl::Variance (const T *i, const T *j) 

inline 
Returns the average absolute deviation of the values in a sequence [i,j) with respect to the specified center value.
When the median of the sequence is used as the center value, this function returns the average absolute deviation from the median, which is a wellknown estimator of dispersion.
For sequences of less than two elements, this function returns zero.
See the remarks made for the Sum() function, which are equally applicable in this case. See StableAvgDev() for a (slow) numerically stable version of this function.
Definition at line 3139 of file Math.h.
Referenced by pcl::GenericVector< sample *>::AvgDev(), and pcl::GenericMatrix< coefficient >::AvgDev().

inline 
Returns the average absolute deviation from the median of the values in a sequence [i,j).
The average absolute deviation from the median is a wellknown estimator of dispersion.
For sequences of less than two elements, this function returns zero.
See the remarks made for the Sum() function, which are equally applicable in this case. See StableAvgDev() for a (slow) numerically stable version of this function.
double pcl::BendMidvariance  (  const T *  x, 
const T *  xn,  
double  center,  
double  beta = 0.2 

) 
Returns a percentage bend midvariance (PBMV) for the elements in a sequence [x,xn).
x,xn  Define a sequence of sample data points for which the PBWV estimator will be calculated. 
center  Reference center value. Normally, the median of the sample should be used. 
beta  Rejection parameter in the [0,0.5] range. Higher values improve robustness to outliers (i.e., increase the breakdown point of the estimator) at the expense of a lower efficiency. The default value is beta=0.2. 
The square root of the percentage bend midvariance is a robust estimator of scale. With the default beta=0.2, its Gaussian efficiency is 67%. With beta=0.1, its efficiency is 85% but its breakdown is only 0.1.
For sequences of less than two elements, this function returns zero.
References
Rand R. Wilcox (2012), Introduction to Robust Estimation and Hypothesis Testing, 3rd Edition, Elsevier Inc., Section 3.12.3.
Definition at line 4203 of file Math.h.
Referenced by pcl::GenericVector< sample *>::BendMidvariance(), and pcl::GenericMatrix< coefficient >::BendMidvariance().
double pcl::BiweightMidvariance  (  const T *  x, 
const T *  xn,  
double  center,  
double  sigma,  
int  k = 9 , 

bool  reducedLength = false 

) 
Returns a biweight midvariance (BWMV) for the elements in a sequence [x,xn).
x,xn  Define a sequence of sample data points for which the BWMV estimator will be calculated. 
center  Reference center value. Normally, the median of the sample should be used. 
sigma  A reference estimate of dispersion. Normally, the median absolute deviation from the median (MAD) of the sample should be used. 
k  Rejection limit in sigma units. The default value is k=9. 
reducedLength  If true, reduce the sample size to exclude rejected elements. This tends to approximate the true dispersion of the data more accurately for relatively small samples, or samples with large amounts of outliers. Note that this departs from the standard definition of biweight midvariance, where the total number of data items is used to scale the variance estimate. If false, use the full sample size, including rejected elements, which gives a standard biweight midvariance estimate. 
The square root of the biweight midvariance is a robust estimator of scale. It is an efficient estimator with respect to many statistical distributions (about 87% Gaussian efficiency), and appears to have a breakdown point close to 0.5 (the same as MAD).
For sequences of less than two elements, this function returns zero.
References
Rand R. Wilcox (2017), Introduction to Robust Estimation and Hypothesis Testing, 4th Edition, Elsevier Inc., Section 3.12.1.
Definition at line 4064 of file Math.h.
Referenced by pcl::GenericVector< sample *>::BiweightMidvariance(), and pcl::GenericMatrix< coefficient >::BiweightMidvariance().

inline 
Returns the median absolute deviation (MAD) of the values in a sequence [i,j) with respect to the specified center value.
The MAD is a wellknown robust estimator of scale.
For sequences of less than two elements, this function returns zero.
Definition at line 3496 of file Math.h.
Referenced by pcl::GenericVector< sample *>::BiweightMidvariance(), pcl::GenericMatrix< coefficient >::BiweightMidvariance(), pcl::GenericVector< sample *>::MAD(), and pcl::GenericMatrix< coefficient >::MAD().

inline 
Returns the median absolute deviation from the median (MAD) for the values in a sequence [i,j).
The MAD is a wellknown robust estimator of scale.
For sequences of less than two elements, this function returns zero.

inline 
Returns the arithmetic mean of a sequence [i,j).
For empty sequences, this function returns zero.
See the remarks made for the Sum() function, which are equally applicable in this case. See StableMean() for a (slow) numerically stable version of this function.
Definition at line 2444 of file Math.h.
Referenced by pcl::GenericVector< sample *>::Mean(), and pcl::GenericMatrix< coefficient >::Mean().

inline 
Returns the median value of a sequence [i,j).
For scalar data types the following algorithms are used:
double
).For nonscalar data types, this function requires the following type conversion operator publicly defined for the type T:
This operator will be used to generate a temporary dynamic array of double
values with the length of the input sequence, which will be used to compute the median with the algorithms enumerated above.
References (selection networks)
References (quick select algorithm)
Definition at line 2613 of file Math.h.
Referenced by pcl::GenericVector< sample *>::BiweightMidvariance(), pcl::GenericMatrix< coefficient >::BiweightMidvariance(), pcl::GenericVector< sample *>::Median(), pcl::GenericMatrix< coefficient >::Median(), pcl::GenericVector< sample *>::TwoSidedBiweightMidvariance(), and pcl::GenericMatrix< coefficient >::TwoSidedBiweightMidvariance().

inline 
Returns the median value of a sequence [i,j), altering the existing order of elements in the input sequence.
This function is intended for sequences of nonscalar objects where the order of elements is irrelevant, and hence generation of a working duplicate is unnecessary. The following type conversion operator must be publicly defined for the type T:
The following algorithms are used:
References (selection networks)
References (quick select algorithm)

inline 
Returns the median value of a sequence [i,j), altering the existing order of elements in the input sequence.
Element comparison is given by a binary predicate p such that p( a, b ) is true for any pair a, b of elements such that a precedes b.
We use fast, hardcoded selection networks for sequences of 9 or less elements, and a quick selection algorithm for larger sets.
See the documentation of MedianDestructive( T*, T* ) for more information and references.

inline 
Returns the sum of the absolute values of the elements in a sequence [i,j).
For empty sequences, this function returns zero.
See the remarks made for the Sum() function, which are equally applicable in this case. See StableModulus() for a (slow) numerically stable version of this function.
Definition at line 2352 of file Math.h.
Referenced by pcl::GenericVector< sample *>::Modulus(), pcl::GenericMatrix< coefficient >::Modulus(), and pcl::KernelFilter::Normalize().

inline 
Returns the kth order statistic of a sequence [i,j).
For scalar data types the following algorithms are used:
double
).For nonscalar data types, this function requires the following type conversion operator publicly defined for the type T:
This operator will be used to generate a temporary dynamic array of double
values with the length of the input sequence, which will be used to compute the median with the quick selection algorithm.
References (quick select algorithm)

inline 
Returns the kth order statistic of a sequence [i,j), altering the existing order of elements in the input sequence.
This function is intended for sequences of nonscalar objects where the order of elements is irrelevant, and hence generation of a working duplicate is unnecessary. The following type conversion operator must be publicly defined for the type T:
<
The quick selection algorithm is used to find the kth element in the ordered sequence.
References (quick select algorithm)

inline 
Returns the kth order statistic of a sequence [i,j), altering the existing order of elements in the input sequence.
Element comparison is given by a binary predicate p such that p( a, b ) is true for any pair a, b of elements such that a precedes b.
See the documentation of OrderStatisticDestructive( T*, T*, distance_type ) for more information and references.

inline 
double pcl::Qn  (  T *  x, 
T *  xn  
) 
Returns the Qn scale estimator of Rousseeuw and Croux for a sequence [x,xn):
Qn = c * first_quartile( x_i  x_j : i < j )
where first_quartile() is the order statistic of rank (n + 1)/4. n >= 2 is the number of elements in the sequence: n = xn  x.
This implementation is a C++ translation of the original FORTRAN code by the authors (see References). The algorithm has O(n*log_2(n)) time complexity and the implementation requires about O(9*n) additional storage.
The constant c = 2.2219 must be used to make the Qn estimator converge to the standard deviation of a pure normal distribution. However, this implementation does not apply it (it uses c=1 implicitly), for consistency with other implementations of scale estimators.
References
P.J. Rousseeuw and C. Croux (1993), Alternatives to the Median Absolute Deviation, Journal of the American Statistical Association, Vol. 88, pp. 12731283.
Definition at line 3893 of file Math.h.
Referenced by pcl::GenericVector< sample *>::Qn().
double pcl::Sn  (  T *  x, 
T *  xn  
) 
Returns the Sn scale estimator of Rousseeuw and Croux for a sequence [x,xn):
Sn = c * low_median( high_median( x_i  x_j ) )
where low_median() is the order statistic of rank (n + 1)/2, and high_median() is the order statistic of rank n/2 + 1. n >= 2 is the number of elements in the sequence: n = xn  x.
This implementation is a direct C++ translation of the original FORTRAN code by the authors (see References). The algorithm has O(n*log_2(n)) time complexity and uses O(n) additional storage.
The constant c = 1.1926 must be used to make the Sn estimator converge to the standard deviation of a pure normal distribution. However, this implementation does not apply it (it uses c=1 implicitly), for consistency with other implementations of scale estimators.
References
P.J. Rousseeuw and C. Croux (1993), Alternatives to the Median Absolute Deviation, Journal of the American Statistical Association, Vol. 88, pp. 12731283.
Definition at line 3644 of file Math.h.
Referenced by pcl::GenericVector< sample *>::Sn().

inline 
Returns the component wise square root of a twosided estimate.
Definition at line 3402 of file Math.h.
References pcl::TwoSidedEstimate::high, pcl::TwoSidedEstimate::low, and pcl::Sqrt().

inline 
Returns the average absolute deviation of the values in a sequence [i,j) with respect to the specified center value, using a numerically stable summation algorithm to minimize roundoff error.
When the median of the sequence is used as the center value, this function returns the average absolute deviation from the median, which is a wellknown estimator of dispersion.
For sequences of less than two elements, this function returns zero.
In the current PCL versions, this function implements the Kahan summation algorithm to reduce roundoff error to the machine's floating point error.
Definition at line 3171 of file Math.h.
Referenced by pcl::GenericVector< sample *>::StableAvgDev(), and pcl::GenericMatrix< coefficient >::StableAvgDev().

inline 
Computes the average absolute deviation from the median of the values in a sequence [i,j) using a numerically stable summation algorithm to minimize roundoff error.
The average absolute deviation from the median is a wellknown estimator of dispersion.
For sequences of less than two elements, this function returns zero.
In the current PCL versions, this function implements the Kahan summation algorithm to reduce roundoff error to the machine's floating point error.

inline 
Computes the arithmetic mean of a sequence [i,j) using a numerically stable summation algorithm to minimize roundoff error.
For empty sequences, this function returns zero.
In the current PCL versions, this function implements the Kahan summation algorithm to reduce roundoff error to the machine's floating point error.
Definition at line 2463 of file Math.h.
Referenced by pcl::GenericVector< sample *>::StableMean(), and pcl::GenericMatrix< coefficient >::StableMean().

inline 
Computes the sum of the absolute values of the elements in a sequence [i,j) using a numerically stable summation algorithm to minimize roundoff error.
For empty sequences, this function returns zero.
In the current PCL versions, this function implements the Kahan summation algorithm to reduce roundoff error to the machine's floating point error.
Definition at line 2371 of file Math.h.
Referenced by pcl::GenericVector< sample *>::StableModulus(), and pcl::GenericMatrix< coefficient >::StableModulus().

inline 
Computes the sum of elements in a sequence [i,j) using a numerically stable summation algorithm to minimize roundoff error.
For empty sequences, this function returns zero.
In the current PCL versions, this function implements the Kahan summation algorithm to reduce roundoff error to the machine's floating point error.
Definition at line 2327 of file Math.h.
Referenced by pcl::GenericVector< sample *>::StableSum(), and pcl::GenericMatrix< coefficient >::StableSum().

inline 
Computes the sum of the squares of the elements in a sequence [i,j) using a numerically stable summation algorithm to minimize roundoff error.
For empty sequences, this function returns zero.
In the current PCL versions, this function implements the Kahan summation algorithm to reduce roundoff error to the machine's floating point error.
Definition at line 2418 of file Math.h.
Referenced by pcl::GenericVector< sample *>::StableSumOfSquares(), and pcl::GenericMatrix< coefficient >::StableSumOfSquares().

inline 
Returns the standard deviation of a sequence [i,j) with respect to the specified center value.
For sequences of less than two elements, this function returns zero.
Definition at line 2548 of file Math.h.
Referenced by pcl::GenericVector< sample *>::StdDev(), and pcl::GenericMatrix< coefficient >::StdDev().

inline 

inline 
Returns the sum of elements in a sequence [i,j).
For empty sequences, this function returns zero.
This is a straight implementation of a floating point sum, which is subject to severe roundoff errors if the number of summed elements is large. One way to improve on this problem is to sort the input set by decreasing order of absolute value before calling this function. A much better solution, but computationally expensive, is a compensated summation algorithm such as Kahan summation, which we have implemented in the StableSum() routine.
Definition at line 2308 of file Math.h.
Referenced by pcl::Histogram::Count(), pcl::GenericVector< sample *>::Sum(), and pcl::GenericMatrix< coefficient >::Sum().

inline 
Returns the sum of the squares of the elements in a sequence [i,j).
For empty sequences, this function returns zero.
See the remarks made for the Sum() function, which are equally applicable in this case. See StableSumOfSquares() for a (slow) numerically stable version of this function.
Definition at line 2396 of file Math.h.
Referenced by pcl::GenericVector< sample *>::SumOfSquares(), and pcl::GenericMatrix< coefficient >::SumOfSquares().

inline 
Computes the twosided, asymmetric trimmed mean of a sequence [i,j).
The returned value is the arithmetic mean of a sequence [I+l,Jh1], where [I,J) is the input sequence [i,j) sorted in ascending order.
Let n = ji be the length of the input sequence. For empty sequences (n ≤ 0) or completely truncated sequences (l+h >= n), this function returns zero. Otherwise the returned value is the arithmetic mean of the nonrejected nlh elements in the sorted sequence, as described above.
Definition at line 2977 of file Math.h.
Referenced by pcl::GenericVector< sample *>::TrimmedMean(), and pcl::GenericMatrix< coefficient >::TrimmedMean().

inline 
Computes the twosided, asymmetric trimmed mean of a sequence [i,j), possibly altering the existing order of elements in the input sequence.
The returned value is the arithmetic mean of a sequence [I+l,Jh1], where [I,J) represents the input sequence [i,j) sorted in ascending order.
Let n = ji be the length of the input sequence. For empty sequences (n ≤ 0) or completely truncated sequences (l+h >= n), this function returns zero. Otherwise the returned value is the arithmetic mean of the nonrejected nlh elements in the sorted sequence, as described above.

inline 
Computes the twosided, asymmetric trimmed mean of squares of a sequence [i,j).
The returned value is the arithmetic mean of squares of a sequence [I+l,Jh1], where [I,J) represents the input sequence [i,j) sorted in ascending order.
Let n = ji be the length of the input sequence. For empty sequences (n ≤ 0) or completely truncated sequences (l+h >= n), this function returns zero. Otherwise the returned value is the arithmetic mean of the squared nonrejected nlh elements in the sorted sequence, as described above.
Definition at line 3054 of file Math.h.
Referenced by pcl::GenericVector< sample *>::TrimmedMeanOfSquares(), and pcl::GenericMatrix< coefficient >::TrimmedMeanOfSquares().

inline 
Computes the twosided, asymmetric trimmed mean of squares of a sequence [i,j), possibly altering the existing order of elements in the input sequence.
The returned value is the arithmetic mean of squares of a sequence [I+l,Jh1], where [I,J) represents the input sequence [i,j) sorted in ascending order.
Let n = ji be the length of the input sequence. For empty sequences (n ≤ 0) or completely truncated sequences (l+h >= n), this function returns zero. Otherwise the returned value is the arithmetic mean of the squared nonrejected nlh elements in the sorted sequence, as described above.

inline 
Returns the twosided average absolute deviation of the values in a sequence [i,j) with respect to the specified center value.
When the median of the sequence is used as the center value, this function returns the average absolute deviation from the median, which is a wellknown estimator of dispersion.
For sequences of less than two elements, this function returns zero.
See the remarks made for the Sum() function, which are equally applicable in this case. See StableAvgDev() for a (slow) numerically stable version of this function.
Definition at line 3437 of file Math.h.
Referenced by pcl::GenericVector< sample *>::TwoSidedAvgDev(), and pcl::GenericMatrix< coefficient >::TwoSidedAvgDev().

inline 
Returns the twosided average absolute deviation from the median of the values in a sequence [i,j).
The average absolute deviation from the median is a wellknown estimator of dispersion.
For sequences of less than two elements, this function returns zero.
See the remarks made for the Sum() function, which are equally applicable in this case. See StableAvgDev() for a (slow) numerically stable version of this function.
TwoSidedEstimate pcl::TwoSidedBiweightMidvariance  (  const T *  x, 
const T *  xn,  
double  center,  
const TwoSidedEstimate &  sigma,  
int  k = 9 , 

bool  reducedLength = false 

) 
Returns a twosided biweight midvariance (BWMV) for the elements in a sequence [x,xn).
x,xn  Define a sequence of sample data points for which the twosided BWMV estimator will be calculated. 
center  Reference center value. Normally, the median of the sample should be used. 
sigma  A reference twosided estimate of dispersion. Normally, the twosided median absolute deviation from the median (MAD) of the sample should be used. See the TwoSidedMAD() function. 
k  Rejection limit in sigma units. The default value is k=9. 
reducedLength  If true, reduce the sample size to exclude rejected elements. Size reduction is performed separately for the low and high halves of the data. This tends to approximate the true dispersion of the data more accurately for relatively small samples, or samples with large amounts of outliers. Note that this departs from the standard definition of biweight midvariance, where the total number of data items is used to scale the variance estimate. If false, use the full sample size, including rejected elements, which gives a standard biweight midvariance estimate. 
See BiweightMidvariance() for more information and references.
Definition at line 4127 of file Math.h.
Referenced by pcl::GenericVector< sample *>::TwoSidedBiweightMidvariance(), and pcl::GenericMatrix< coefficient >::TwoSidedBiweightMidvariance().

inline 
Returns the twosided median absolute deviation (MAD) of the values in a sequence [i,j) with respect to the specified center value.
The MAD is a wellknown robust estimator of scale.
For sequences of less than two elements, this function returns zero.
Definition at line 3557 of file Math.h.
Referenced by pcl::GenericVector< sample *>::TwoSidedBiweightMidvariance(), pcl::GenericMatrix< coefficient >::TwoSidedBiweightMidvariance(), pcl::GenericVector< sample *>::TwoSidedMAD(), and pcl::GenericMatrix< coefficient >::TwoSidedMAD().

inline 
Returns the twosided median absolute deviation from the median (MAD) for the values in a sequence [i,j).
The MAD is a wellknown robust estimator of scale.
For sequences of less than two elements, this function returns zero.

inline 
Returns the variance of a sequence [i,j) with respect to the specified center value.
For sequences of less than two elements, this function returns zero.
This implementation uses a twopass compensated summation algorithm to minimize roundoff errors (see the references).
References
William H. Press et al., Numerical Recipes in C: The Art of Scientific Computing, Second Edition (1997 reprint) Cambridge University Press, page 613.
Definition at line 2488 of file Math.h.
Referenced by pcl::ImageStatistics::Var(), pcl::GenericVector< sample *>::Variance(), and pcl::GenericMatrix< coefficient >::Variance().

inline 
Returns the variance from the mean of a sequence [i,j).
For sequences of less than two elements, this function returns zero.
This implementation uses a twopass compensated summation algorithm to minimize roundoff errors (see References).
References
William H. Press et al., Numerical Recipes in C: The Art of Scientific Computing, Second Edition (1997 reprint) Cambridge University Press, page 613.