VTK  9.5.20251215
vtkOrderStatistics.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2011 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
32
33#ifndef vtkOrderStatistics_h
34#define vtkOrderStatistics_h
35
36#include "vtkFiltersStatisticsModule.h" // For export macro
38
39VTK_ABI_NAMESPACE_BEGIN
41class vtkStringArray;
42class vtkTable;
43class vtkVariant;
44
45class VTKFILTERSSTATISTICS_EXPORT vtkOrderStatistics : public vtkStatisticsAlgorithm
46{
47public:
49 void PrintSelf(ostream& os, vtkIndent indent) override;
51
53 int GetMaximumNumberOfColumnsPerRequest() const override { return 1; }
54
59 {
60 InverseCDF = 0, // Identical to method 1 of R
61 InverseCDFAveragedSteps = 1, // Identical to method 2 of R, ignored for non-numeric types
62 NearestObservation = 2 // Identical to method 3 of R
63 };
64
66
72
74
80
82
85 vtkSetMacro(Quantize, bool);
86 vtkGetMacro(Quantize, bool);
88
90
97
102
108 bool SetParameter(const char* parameter, int index, vtkVariant value) override;
109
114 bool Aggregate(vtkDataObjectCollection*, vtkStatisticalModel*) override { return false; }
115
117 void AppendAlgorithmParameters(std::string& algorithmParameters) const override;
118
121 vtkStringToken parameterName, const std::string& algorithmParameters) override;
122
123protected:
126
131
136
141
145 void Assess(vtkTable* inData, vtkStatisticalModel* inMeta, vtkTable* outData) override
146 {
147 this->Superclass::Assess(inData, inMeta, outData, 1);
148 }
149
153 void SelectAssessFunctor(vtkTable* outData, vtkDataObject* inMeta, vtkStringArray* rowNames,
154 AssessFunctor*& dfunc) override;
155
160
161private:
162 vtkOrderStatistics(const vtkOrderStatistics&) = delete;
163 void operator=(const vtkOrderStatistics&) = delete;
164};
165
166VTK_ABI_NAMESPACE_END
167#endif
maintain an unordered list of data objects
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:108
bool SetParameter(const char *parameter, int index, vtkVariant value) override
A convenience method (in particular for access from other applications) to set parameter values.
void AppendAlgorithmParameters(std::string &algorithmParameters) const override
Provide a string that can be used to recreate an instance of this algorithm.
vtkIdType GetQuantileDefinition()
Get the quantile definition.
void Derive(vtkStatisticalModel *) override
Execute the calculations required by the Derive option.
void Test(vtkTable *, vtkStatisticalModel *, vtkTable *) override
Execute the calculations required by the Test option.
void Assess(vtkTable *inData, vtkStatisticalModel *inMeta, vtkTable *outData) override
Execute the calculations required by the Assess option.
static vtkOrderStatistics * New()
int GetMaximumNumberOfColumnsPerRequest() const override
Order statistics requests are univariate.
std::size_t ConsumeNextAlgorithmParameter(vtkStringToken parameterName, const std::string &algorithmParameters) override
Implement the inverse of AppendAlgorithmParameters(): given parameters, update this algorithm.
QuantileDefinitionType
The type of quantile definition.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
QuantileDefinitionType QuantileDefinition
void SetQuantileDefinition(int)
Set the quantile definition.
~vtkOrderStatistics() override
bool Aggregate(vtkDataObjectCollection *, vtkStatisticalModel *) override
Given a collection of models, calculate aggregate model NB: not implemented.
void SelectAssessFunctor(vtkTable *outData, vtkDataObject *inMeta, vtkStringArray *rowNames, AssessFunctor *&dfunc) override
Provide the appropriate assessment functor.
void Learn(vtkTable *, vtkTable *, vtkStatisticalModel *) override
Execute the calculations required by the Learn option.
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 vtkIdType
Definition vtkType.h:368