VTK  9.0.20201123
vtkOrderStatistics.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkOrderStatistics.h
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2011 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19  -------------------------------------------------------------------------*/
43 #ifndef vtkOrderStatistics_h
44 #define vtkOrderStatistics_h
45 
46 #include "vtkFiltersStatisticsModule.h" // For export macro
47 #include "vtkStatisticsAlgorithm.h"
48 
50 class vtkStringArray;
51 class vtkTable;
52 class vtkVariant;
53 
54 class VTKFILTERSSTATISTICS_EXPORT vtkOrderStatistics : public vtkStatisticsAlgorithm
55 {
56 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59  static vtkOrderStatistics* New();
60 
65  {
66  InverseCDF = 0, // Identical to method 1 of R
67  InverseCDFAveragedSteps = 1, // Identical to method 2 of R, ignored for non-numeric types
68  NearestObservation = 2 // Identical to method 3 of R
69  };
70 
72 
75  vtkSetMacro(NumberOfIntervals, vtkIdType);
76  vtkGetMacro(NumberOfIntervals, vtkIdType);
78 
80 
83  vtkSetMacro(QuantileDefinition, QuantileDefinitionType);
84  void SetQuantileDefinition(int);
86 
88 
91  vtkSetMacro(Quantize, bool);
92  vtkGetMacro(Quantize, bool);
94 
96 
100  vtkSetMacro(MaximumHistogramSize, vtkIdType);
101  vtkGetMacro(MaximumHistogramSize, vtkIdType);
103 
107  vtkIdType GetQuantileDefinition() { return static_cast<vtkIdType>(this->QuantileDefinition); }
108 
114  bool SetParameter(const char* parameter, int index, vtkVariant value) override;
115 
121 
122 protected:
124  ~vtkOrderStatistics() override;
125 
129  void Learn(vtkTable*, vtkTable*, vtkMultiBlockDataSet*) override;
130 
134  void Derive(vtkMultiBlockDataSet*) override;
135 
139  void Test(vtkTable*, vtkMultiBlockDataSet*, vtkTable*) override;
140 
144  void Assess(vtkTable* inData, vtkMultiBlockDataSet* inMeta, vtkTable* outData) override
145  {
146  this->Superclass::Assess(inData, inMeta, outData, 1);
147  }
148 
152  void SelectAssessFunctor(vtkTable* outData, vtkDataObject* inMeta, vtkStringArray* rowNames,
153  AssessFunctor*& dfunc) override;
154 
157  bool Quantize;
159 
160 private:
161  vtkOrderStatistics(const vtkOrderStatistics&) = delete;
162  void operator=(const vtkOrderStatistics&) = delete;
163 };
164 
165 #endif
vtkStatisticsAlgorithm.h
vtkX3D::value
Definition: vtkX3D.h:226
vtkOrderStatistics::Assess
void Assess(vtkTable *inData, vtkMultiBlockDataSet *inMeta, vtkTable *outData) override
Execute the calculations required by the Assess option.
Definition: vtkOrderStatistics.h:144
vtkIdType
int vtkIdType
Definition: vtkType.h:330
vtkDataObjectCollection
maintain an unordered list of data objects
Definition: vtkDataObjectCollection.h:31
vtkOrderStatistics::NumberOfIntervals
vtkIdType NumberOfIntervals
Definition: vtkOrderStatistics.h:155
vtkOrderStatistics::GetQuantileDefinition
vtkIdType GetQuantileDefinition()
Get the quantile definition.
Definition: vtkOrderStatistics.h:107
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
vtkOrderStatistics
A class for univariate order statistics.
Definition: vtkOrderStatistics.h:54
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:45
vtkOrderStatistics::Aggregate
void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *) override
Given a collection of models, calculate aggregate model NB: not implemented.
Definition: vtkOrderStatistics.h:120
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:65
vtkStatisticsAlgorithm::Learn
virtual void Learn(vtkTable *, vtkTable *, vtkMultiBlockDataSet *)=0
Execute the calculations required by the Learn option, given some input Data.
vtkStatisticsAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkStatisticsAlgorithm::SetParameter
virtual bool SetParameter(const char *parameter, int index, vtkVariant value)
A convenience method (in particular for access from other applications) to set parameter values of Le...
vtkStatisticsAlgorithm::SelectAssessFunctor
virtual void SelectAssessFunctor(vtkTable *outData, vtkDataObject *inMeta, vtkStringArray *rowNames, AssessFunctor *&dfunc)=0
A pure virtual method to select the appropriate assessment functor.
vtkStatisticsAlgorithm::Derive
virtual void Derive(vtkMultiBlockDataSet *)=0
Execute the calculations required by the Derive option.
vtkOrderStatistics::QuantileDefinitionType
QuantileDefinitionType
The type of quantile definition.
Definition: vtkOrderStatistics.h:64
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:36
vtkOrderStatistics::Quantize
bool Quantize
Definition: vtkOrderStatistics.h:157
vtkOrderStatistics::MaximumHistogramSize
vtkIdType MaximumHistogramSize
Definition: vtkOrderStatistics.h:158
vtkStatisticsAlgorithm
Base class for statistics algorithms.
Definition: vtkStatisticsAlgorithm.h:71
vtkX3D::parameter
Definition: vtkX3D.h:449
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkStatisticsAlgorithm::Test
virtual void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *)=0
Execute the calculations required by the Test option.
vtkX3D::index
Definition: vtkX3D.h:252
vtkOrderStatistics::QuantileDefinition
QuantileDefinitionType QuantileDefinition
Definition: vtkOrderStatistics.h:156
vtkTableAlgorithm::New
static vtkTableAlgorithm * New()