SAGA API
v9.6
|
#include <mat_tools.h>
Public Member Functions | |
CSG_Simple_Statistics (void) | |
CSG_Simple_Statistics (bool bHoldValues) | |
CSG_Simple_Statistics (const CSG_Simple_Statistics &Statistics) | |
CSG_Simple_Statistics (double Mean, double StdDev, sLong Count=1000) | |
CSG_Simple_Statistics (const CSG_Vector &Values, bool bHoldValues=false) | |
bool | Create (bool bHoldValues=false) |
bool | Create (const CSG_Simple_Statistics &Statistics) |
bool | Create (double Mean, double StdDev, sLong Count=1000) |
bool | Create (const CSG_Vector &Values, bool bHoldValues=false) |
void | Invalidate (void) |
bool | Evaluate (void) |
int | is_Evaluated (void) const |
bool | Set_Count (sLong Count) |
sLong | Get_Count (void) const |
double | Get_Weights (void) const |
double | Get_Minimum (void) |
double | Get_Maximum (void) |
double | Get_Range (void) |
double | Get_Sum (void) |
double | Get_Sum_Of_Squares (void) |
double | Get_Mean (void) |
double | Get_Variance (void) |
double | Get_StdDev (void) |
double | Get_Kurtosis (void) |
double | Get_Skewness (void) |
double | Get_SkewnessPearson (void) |
double | Get_Quantile (double Quantile) |
double | Get_Percentile (double Percentile) |
double | Get_Median (void) |
double | Get_Gini (void) |
sLong | Get_IndexOfMinimum (void) |
sLong | Get_IndexOfMaximum (void) |
sLong | Get_nValues_Above (double Threshold, bool bEquals=false) |
sLong | Get_nValues_Below (double Threshold, bool bEquals=false) |
void | Add (const CSG_Simple_Statistics &Statistics) |
void | Add_Value (double Value, double Weight=1.) |
double * | Get_Values (void) const |
double | Get_Value (sLong i) const |
double | operator[] (sLong i) const |
CSG_Simple_Statistics & | operator= (const CSG_Simple_Statistics &Statistics) |
CSG_Simple_Statistics & | operator+= (const CSG_Simple_Statistics &Statistics) |
CSG_Simple_Statistics & | operator+= (double Value) |
Protected Member Functions | |
void | _Evaluate (int Level=1) |
Protected Attributes | |
bool | m_bSorted |
int | m_bEvaluated |
sLong | m_nValues |
double | m_Weights |
double | m_Sum |
double | m_Sum2 |
double | m_Minimum |
double | m_Maximum |
double | m_Range |
double | m_Mean |
double | m_Variance |
double | m_StdDev |
double | m_Kurtosis |
double | m_Skewness |
double | m_Gini |
CSG_Array | m_Values |
Definition at line 722 of file mat_tools.h.
CSG_Simple_Statistics::CSG_Simple_Statistics | ( | void | ) |
Definition at line 324 of file mat_tools.cpp.
References Create().
CSG_Simple_Statistics::CSG_Simple_Statistics | ( | bool | bHoldValues | ) |
Definition at line 329 of file mat_tools.cpp.
References Create().
CSG_Simple_Statistics::CSG_Simple_Statistics | ( | const CSG_Simple_Statistics & | Statistics | ) |
Definition at line 334 of file mat_tools.cpp.
References Create().
CSG_Simple_Statistics::CSG_Simple_Statistics | ( | double | Mean, |
double | StdDev, | ||
sLong | Count = 1000 |
||
) |
Definition at line 339 of file mat_tools.cpp.
References Create().
CSG_Simple_Statistics::CSG_Simple_Statistics | ( | const CSG_Vector & | Values, |
bool | bHoldValues = false |
||
) |
Definition at line 344 of file mat_tools.cpp.
References Create().
|
protected |
Definition at line 562 of file mat_tools.cpp.
References Get_Count(), Get_Mean(), CSG_Array::Get_Size(), Get_StdDev(), Get_Value(), m_bEvaluated, m_Kurtosis, m_Maximum, m_Mean, m_Minimum, m_Range, m_Skewness, m_StdDev, m_Sum, m_Sum2, m_Values, m_Variance, and m_Weights.
Referenced by Evaluate().
void CSG_Simple_Statistics::Add | ( | const CSG_Simple_Statistics & | Statistics | ) |
Definition at line 481 of file mat_tools.cpp.
References Create(), CSG_Array::Destroy(), CSG_Array::Get_Array(), CSG_Array::Get_Size(), Get_Value(), m_bEvaluated, m_bSorted, m_Kurtosis, m_Maximum, m_Minimum, m_nValues, m_Skewness, m_Sum, m_Sum2, m_Values, m_Weights, and CSG_Array::Set_Array().
void CSG_Simple_Statistics::Add_Value | ( | double | Value, |
double | Weight = 1. |
||
) |
Definition at line 527 of file mat_tools.cpp.
References CSG_Array::Get_Array(), CSG_Array::Get_Value_Size(), CSG_Array::Inc_Array(), m_bEvaluated, m_bSorted, m_Maximum, m_Minimum, m_nValues, m_Sum, m_Sum2, m_Values, and m_Weights.
Referenced by CSG_Shape_Part::_Update_Extent(), CSG_PRQuadTree_Node::Add_Point(), and Create().
bool CSG_Simple_Statistics::Create | ( | bool | bHoldValues = false | ) |
Definition at line 350 of file mat_tools.cpp.
References CSG_Array::Create(), Invalidate(), and m_Values.
Referenced by Add(), CSG_Regression::Calculate(), CSG_Trend::Clr_Data(), Create(), CSG_Simple_Statistics(), CSG_Histogram::Destroy(), CSG_Grid::Get_Statistics(), and CSG_Grids::Get_Statistics().
bool CSG_Simple_Statistics::Create | ( | const CSG_Simple_Statistics & | Statistics | ) |
Definition at line 359 of file mat_tools.cpp.
References CSG_Array::Create(), m_bEvaluated, m_bSorted, m_Gini, m_Kurtosis, m_Maximum, m_Mean, m_Minimum, m_nValues, m_Range, m_Skewness, m_StdDev, m_Sum, m_Sum2, m_Values, m_Variance, and m_Weights.
bool CSG_Simple_Statistics::Create | ( | const CSG_Vector & | Values, |
bool | bHoldValues = false |
||
) |
Definition at line 408 of file mat_tools.cpp.
References Add_Value(), Create(), and CSG_Vector::Get_Size().
bool CSG_Simple_Statistics::Create | ( | double | Mean, |
double | StdDev, | ||
sLong | Count = 1000 |
||
) |
Definition at line 386 of file mat_tools.cpp.
References Invalidate(), m_bEvaluated, m_Maximum, m_Mean, m_Minimum, m_nValues, m_Range, m_StdDev, m_Sum, m_Sum2, m_Variance, and m_Weights.
bool CSG_Simple_Statistics::Evaluate | ( | void | ) |
Definition at line 473 of file mat_tools.cpp.
References _Evaluate(), and is_Evaluated().
Referenced by CSG_PointCloud::_Stats_Update(), and CSG_Table::_Stats_Update().
|
inline |
Definition at line 743 of file mat_tools.h.
Referenced by _Evaluate(), CSG_PointCloud::_Stats_Update(), CSG_Table::_Stats_Update(), CSG_Histogram::Create(), CSG_Grid::Get_Data_Count(), CSG_Grids::Get_Data_Count(), Get_Gini(), CSG_Grid::Get_Histogram(), CSG_Grids::Get_Histogram(), CSG_Grid::Get_NoData_Count(), CSG_Grids::Get_NoData_Count(), Get_nValues_Above(), Get_nValues_Below(), CSG_Grid::Get_Statistics(), CSG_Grids::Get_Statistics(), CSG_Grid::On_Update(), and CSG_Grids::On_Update().
double CSG_Simple_Statistics::Get_Gini | ( | void | ) |
The Gini coefficient is a measure of statistical dispersion intended to represent the income or wealth distribution of a nation's residents, and is the most commonly used measure of inequality.
Definition at line 681 of file mat_tools.cpp.
References CSG_Array::Get_Array(), Get_Count(), CSG_Array::Get_Size(), Get_Sum(), Get_Value(), m_bSorted, m_Gini, m_Values, and SG_Compare_Double().
sLong CSG_Simple_Statistics::Get_IndexOfMaximum | ( | void | ) |
Returns the index of the maximum value in the order values have been added to the statistics. This is only supported for statistics that have been created with the bHoldValues option set to true.
Definition at line 734 of file mat_tools.cpp.
References CSG_Array::Get_Size(), Get_Values(), and m_Values.
sLong CSG_Simple_Statistics::Get_IndexOfMinimum | ( | void | ) |
Returns the index of the minimum value in the order values have been added to the statistics. This is only supported for statistics that have been created with the bHoldValues option set to true.
Definition at line 710 of file mat_tools.cpp.
References CSG_Array::Get_Size(), Get_Values(), and m_Values.
|
inline |
Definition at line 755 of file mat_tools.h.
|
inline |
Definition at line 747 of file mat_tools.h.
Referenced by CSG_Shape_Part::_Update_Extent(), CSG_Regression::Calculate(), CSG_Histogram::Create(), CSG_Grid::Get_Histogram(), CSG_Grids::Get_Histogram(), CSG_Grid::Get_Max(), CSG_Grids::Get_Max(), and CSG_PointCloud::On_Update().
|
inline |
Definition at line 751 of file mat_tools.h.
Referenced by _Evaluate(), CSG_Classifier_Supervised::Add_Class(), CSG_Regression_Weighted::Calculate(), CSG_Regression::Calculate(), CSG_Regression_Multiple::Get_CrossValidation(), CSG_Grid::Get_Mean(), CSG_Grids::Get_Mean(), Get_SkewnessPearson(), CSG_Classifier_Supervised::Load(), SG_Get_Correlation_Matrix(), and CSG_Histogram::Update().
double CSG_Simple_Statistics::Get_Median | ( | void | ) |
Returns the medium (i.e. thee 50 percentile or 0.5 quantile). Remark: any quantile calculation is only possible, if statistics has been created with the bHoldValues option set to true.
Definition at line 669 of file mat_tools.cpp.
References Get_Quantile().
Referenced by Get_SkewnessPearson().
|
inline |
Definition at line 746 of file mat_tools.h.
Referenced by CSG_Shape_Part::_Update_Extent(), CSG_Regression::Calculate(), CSG_Histogram::Create(), CSG_Grid::Get_Histogram(), CSG_Grids::Get_Histogram(), CSG_Grid::Get_Min(), CSG_Grids::Get_Min(), and CSG_PointCloud::On_Update().
sLong CSG_Simple_Statistics::Get_nValues_Above | ( | double | Threshold, |
bool | bEquals = false |
||
) |
Returns the number of values greater than the threshold value. This is only supported for statistics that have been created with the bHoldValues option set to true.
Definition at line 758 of file mat_tools.cpp.
References Get_Count(), CSG_Array::Get_Size(), Get_Value(), and m_Values.
sLong CSG_Simple_Statistics::Get_nValues_Below | ( | double | Threshold, |
bool | bEquals = false |
||
) |
Returns the number of values lower than the threshold value. This is only supported for statistics that have been created with the bHoldValues option set to true.
Definition at line 780 of file mat_tools.cpp.
References Get_Count(), CSG_Array::Get_Size(), Get_Value(), and m_Values.
double CSG_Simple_Statistics::Get_Percentile | ( | double | Percentile | ) |
Returns the requested percentile (i.e. the quantile requested as percentage, the 50 percentile is the medium value). Remark: any quantile calculation is only possible, if statistics has been created with the bHoldValues option set to true.
Definition at line 658 of file mat_tools.cpp.
References Get_Quantile().
double CSG_Simple_Statistics::Get_Quantile | ( | double | Quantile | ) |
Returns the requested quantile (value between 0 and 1). The 0.5 quantile returns the median. Remark: Remark: any quantile calculation is only possible, if statistics has been created with the bHoldValues option set to true.
Definition at line 618 of file mat_tools.cpp.
References CSG_Array::Get_Array(), CSG_Array::Get_Size(), Get_Values(), m_bSorted, m_Mean, m_Values, and SG_Compare_Double().
Referenced by Get_Median(), and Get_Percentile().
|
inline |
Definition at line 748 of file mat_tools.h.
Referenced by CSG_Regression_Multiple::Get_CrossValidation(), CSG_Grid::Get_Range(), and CSG_Grids::Get_Range().
|
inline |
Definition at line 756 of file mat_tools.h.
double CSG_Simple_Statistics::Get_SkewnessPearson | ( | void | ) |
Skewness after Pearson, i.e. the difference of mean and median divided by standard deviation. Remark: Skewness calculation is only possible, if statistics has been created with the bHoldValues flag set to true.
Definition at line 606 of file mat_tools.cpp.
References Get_Mean(), Get_Median(), and Get_StdDev().
|
inline |
Definition at line 753 of file mat_tools.h.
Referenced by _Evaluate(), Get_SkewnessPearson(), CSG_Grid::Get_StdDev(), CSG_Grids::Get_StdDev(), and SG_Get_Correlation_Matrix().
|
inline |
Definition at line 749 of file mat_tools.h.
Referenced by CSG_Regression_Multiple::Get_CrossValidation(), and Get_Gini().
|
inline |
Definition at line 750 of file mat_tools.h.
|
inline |
Definition at line 775 of file mat_tools.h.
Referenced by _Evaluate(), Add(), Get_Gini(), Get_nValues_Above(), and Get_nValues_Below().
|
inline |
Definition at line 774 of file mat_tools.h.
Referenced by Get_IndexOfMaximum(), Get_IndexOfMinimum(), and Get_Quantile().
|
inline |
Definition at line 752 of file mat_tools.h.
Referenced by CSG_Regression::Calculate(), CSG_Grid::Get_Variance(), and CSG_Grids::Get_Variance().
|
inline |
Definition at line 744 of file mat_tools.h.
void CSG_Simple_Statistics::Invalidate | ( | void | ) |
Definition at line 447 of file mat_tools.cpp.
References CSG_Array::Destroy(), m_bEvaluated, m_bSorted, m_Gini, m_Kurtosis, m_Maximum, m_Mean, m_Minimum, m_nValues, m_Range, m_Skewness, m_StdDev, m_Sum, m_Sum2, m_Values, m_Variance, and m_Weights.
Referenced by CSG_Table::_Stats_Invalidate(), CSG_Grid::Assign(), Create(), CSG_Grid::Create(), CSG_Grid::On_Update(), CSG_Grids::On_Update(), and CSG_PointCloud::On_Update().
|
inline |
Definition at line 739 of file mat_tools.h.
Referenced by CSG_PointCloud::_Stats_Update(), CSG_Table::_Stats_Update(), and Evaluate().
|
inline |
Definition at line 780 of file mat_tools.h.
|
inline |
Definition at line 781 of file mat_tools.h.
|
inline |
Definition at line 779 of file mat_tools.h.
|
inline |
Definition at line 776 of file mat_tools.h.
bool CSG_Simple_Statistics::Set_Count | ( | sLong | Count | ) |
Definition at line 424 of file mat_tools.cpp.
References CSG_Array::Destroy(), m_bEvaluated, m_nValues, m_Sum, m_Sum2, m_Values, and m_Weights.
Referenced by CSG_PointCloud::_Stats_Update(), CSG_Table::_Stats_Update(), CSG_Grid::On_Update(), CSG_Grids::On_Update(), and CSG_Histogram::Scale_Element_Count().
|
protected |
Definition at line 788 of file mat_tools.h.
Referenced by _Evaluate(), Add(), Add_Value(), Create(), Invalidate(), and Set_Count().
|
protected |
Definition at line 786 of file mat_tools.h.
Referenced by Add(), Add_Value(), Create(), Get_Gini(), Get_Quantile(), and Invalidate().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by Create(), Get_Gini(), and Invalidate().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Add(), Create(), and Invalidate().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Add(), Add_Value(), Create(), and Invalidate().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Create(), Get_Quantile(), and Invalidate().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Add(), Add_Value(), Create(), and Invalidate().
|
protected |
Definition at line 790 of file mat_tools.h.
Referenced by Add(), Add_Value(), Create(), Invalidate(), and Set_Count().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Create(), and Invalidate().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Add(), Create(), and Invalidate().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Create(), and Invalidate().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Add(), Add_Value(), Create(), Invalidate(), and Set_Count().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Add(), Add_Value(), Create(), Invalidate(), and Set_Count().
|
protected |
Definition at line 794 of file mat_tools.h.
Referenced by _Evaluate(), Add(), Add_Value(), Create(), Get_Gini(), Get_IndexOfMaximum(), Get_IndexOfMinimum(), Get_nValues_Above(), Get_nValues_Below(), Get_Quantile(), Invalidate(), and Set_Count().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Create(), and Invalidate().
|
protected |
Definition at line 792 of file mat_tools.h.
Referenced by _Evaluate(), Add(), Add_Value(), Create(), Invalidate(), and Set_Count().