VTK  9.7.1
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
92 #ifndef vtkDescriptiveStatistics_h
93 #define vtkDescriptiveStatistics_h
94 
95 #include "vtkFiltersStatisticsModule.h" // For export macro
96 #include "vtkStatisticsAlgorithm.h"
97 
98 VTK_ABI_NAMESPACE_BEGIN
100 class vtkStringArray;
101 class vtkTable;
102 class vtkVariant;
103 class vtkDoubleArray;
104 
105 class VTKFILTERSSTATISTICS_EXPORT vtkDescriptiveStatistics : public vtkStatisticsAlgorithm
106 {
107 public:
109  void PrintSelf(ostream& os, vtkIndent indent) override;
110  static vtkDescriptiveStatistics* New();
111 
113  int GetMaximumNumberOfColumnsPerRequest() const override { return 1; }
114 
116 
134  vtkSetMacro(SampleEstimate, bool);
135  vtkGetMacro(SampleEstimate, bool);
136  vtkBooleanMacro(SampleEstimate, bool);
138 
140 
145  vtkSetMacro(SignedDeviations, vtkTypeBool);
146  vtkGetMacro(SignedDeviations, vtkTypeBool);
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 
175  std::size_t ConsumeNextAlgorithmParameter(
176  vtkStringToken parameterName, const std::string& algorithmParameters) override;
177 
178 protected:
180  ~vtkDescriptiveStatistics() override;
181 
186  void Learn(vtkTable*, vtkTable*, vtkStatisticalModel*) override;
187 
191  void Derive(vtkStatisticalModel*) override;
192 
196  void Test(vtkTable*, vtkStatisticalModel*, vtkTable*) override;
197 
201  void Assess(vtkTable* inData, vtkStatisticalModel* inMeta, vtkTable* outData) override
202  {
203  this->Superclass::Assess(inData, inMeta, outData, 1);
204  }
205 
210  virtual vtkDoubleArray* CalculatePValues(vtkDoubleArray*);
211 
215  void SelectAssessFunctor(vtkTable* outData, vtkDataObject* inMeta, vtkStringArray* rowNames,
216  AssessFunctor*& dfunc) override;
217 
220 
221 private:
223  void operator=(const vtkDescriptiveStatistics&) = delete;
224 };
225 
226 VTK_ABI_NAMESPACE_END
227 #endif
a base class for statistical modeling of other data
virtual std::size_t ConsumeNextAlgorithmParameter(vtkStringToken parameterName, const std::string &algorithmParameters)
Consume a single parameter value, setting the value on this instance of the class.
static vtkTableAlgorithm * New()
maintain an unordered list of data objects
virtual void AppendAlgorithmParameters(std::string &algorithmParameters) const
Subclasses must override this method if they have any internal ivars that affect the behavior of Requ...
a vtkAbstractArray subclass for strings
virtual bool Aggregate(vtkDataObjectCollection *collection, vtkStatisticalModel *model)=0
Given a collection of models, calculate an aggregate model.
A type representing the union of many types.
Definition: vtkVariant.h:52
dynamic, self-adjusting array of double
virtual void Learn(vtkTable *, vtkTable *, vtkStatisticalModel *)=0
Execute the calculations required by the Learn option, given some input Data.
int vtkTypeBool
Definition: vtkABI.h:64
Base class for statistics algorithms.
a simple class to control print indentation
Definition: vtkIndent.h:28
int GetMaximumNumberOfColumnsPerRequest() const override
Descriptive statistics requests are univariate.
virtual void Derive(vtkStatisticalModel *)=0
Execute the calculations required by the Derive option.
Represent a string by its integer hash.
A class for univariate descriptive statistics.
virtual void Test(vtkTable *, vtkStatisticalModel *, vtkTable *)=0
Execute the calculations required by the Test option.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:59
void Assess(vtkTable *inData, vtkStatisticalModel *inMeta, vtkTable *outData) override
Execute the calculations required by the Assess option.
virtual void SelectAssessFunctor(vtkTable *outData, vtkDataObject *inMeta, vtkStringArray *rowNames, AssessFunctor *&dfunc)=0
A pure virtual method to select the appropriate assessment functor.
general representation of visualization data
Definition: vtkDataObject.h:55
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.