VTK  9.5.20251218
vtkDescriptiveStatistics.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2010 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
91
92#ifndef vtkDescriptiveStatistics_h
93#define vtkDescriptiveStatistics_h
94
95#include "vtkFiltersStatisticsModule.h" // For export macro
97
98VTK_ABI_NAMESPACE_BEGIN
100class vtkStringArray;
101class vtkTable;
102class vtkVariant;
103class vtkDoubleArray;
104
105class VTKFILTERSSTATISTICS_EXPORT vtkDescriptiveStatistics : public vtkStatisticsAlgorithm
106{
107public:
109 void PrintSelf(ostream& os, vtkIndent indent) override;
111
113 int GetMaximumNumberOfColumnsPerRequest() const override { return 1; }
114
116
134 vtkSetMacro(SampleEstimate, bool);
135 vtkGetMacro(SampleEstimate, bool);
136 vtkBooleanMacro(SampleEstimate, bool);
138
140
147 vtkBooleanMacro(SignedDeviations, vtkTypeBool);
149
154
156
167 bool GetDistributionForField(const std::string& fieldName, double& mean, double& variance,
168 double& stdev, double& skewness, double& kurtosis);
170
172 void AppendAlgorithmParameters(std::string& algorithmParameters) const override;
173
176 vtkStringToken parameterName, const std::string& algorithmParameters) override;
177
178protected:
181
187
192
197
201 void Assess(vtkTable* inData, vtkStatisticalModel* inMeta, vtkTable* outData) override
202 {
203 this->Superclass::Assess(inData, inMeta, outData, 1);
204 }
205
211
215 void SelectAssessFunctor(vtkTable* outData, vtkDataObject* inMeta, vtkStringArray* rowNames,
216 AssessFunctor*& dfunc) override;
217
220
221private:
223 void operator=(const vtkDescriptiveStatistics&) = delete;
224};
225
226VTK_ABI_NAMESPACE_END
227#endif
maintain an unordered list of data objects
general representation of visualization data
void SelectAssessFunctor(vtkTable *outData, vtkDataObject *inMeta, vtkStringArray *rowNames, AssessFunctor *&dfunc) override
Provide the appropriate assessment functor.
std::size_t ConsumeNextAlgorithmParameter(vtkStringToken parameterName, const std::string &algorithmParameters) override
Implement the inverse of GetAlgorithmParameters(): given a parameter, update this algorithm.
bool Aggregate(vtkDataObjectCollection *, vtkStatisticalModel *) override
Given a collection of models, calculate aggregate model.
virtual vtkDoubleArray * CalculatePValues(vtkDoubleArray *)
Calculate p-value.
void AppendAlgorithmParameters(std::string &algorithmParameters) const override
Provide a string that can be used to recreate an instance of this algorithm.
void Test(vtkTable *, vtkStatisticalModel *, vtkTable *) override
Execute the calculations required by the Test option.
static vtkDescriptiveStatistics * New()
void Learn(vtkTable *, vtkTable *, vtkStatisticalModel *) override
Execute the calculations required by the Learn option, given some input Data NB: input parameters are...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetMaximumNumberOfColumnsPerRequest() const override
Descriptive statistics requests are univariate.
void Derive(vtkStatisticalModel *) override
Execute the calculations required by the Derive option.
~vtkDescriptiveStatistics() override
void Assess(vtkTable *inData, vtkStatisticalModel *inMeta, vtkTable *outData) override
Execute the calculations required by the Assess option.
bool GetDistributionForField(const std::string &fieldName, double &mean, double &variance, double &stdev, double &skewness, double &kurtosis)
Return the mean, variance, standard deviation, skewness, and kurtosis for the given variable.
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:108
a base class for statistical modeling of other data
A base class for a functor that assesses data.
virtual void Assess(vtkTable *, vtkStatisticalModel *, vtkTable *)=0
Execute the calculations required by the Assess option.
vtkStatisticsAlgorithm()
Return a new instance of a subclass named and configured by the algorithmParameters.
a vtkAbstractArray subclass for strings
Represent a string by its integer hash.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:169
A type representing the union of many types.
Definition vtkVariant.h:162
int vtkTypeBool
Definition vtkABI.h:64