VTK  9.0.20210620
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;
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);
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:
125 
130 
134  void Derive(vtkMultiBlockDataSet*) override;
135 
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
@ 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:332
vtkDataObjectCollection
maintain an unordered list of data objects
Definition: vtkDataObjectCollection.h:32
vtkOrderStatistics::NumberOfIntervals
vtkIdType NumberOfIntervals
Definition: vtkOrderStatistics.h:155
vtkOrderStatistics::Test
void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *) override
Execute the calculations required by the Test option.
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:63
vtkOrderStatistics::vtkOrderStatistics
vtkOrderStatistics()
vtkOrderStatistics::Derive
void Derive(vtkMultiBlockDataSet *) override
Execute the calculations required by the Derive option.
vtkStatisticsAlgorithm::AssessFunctor
A base class for a functor that assesses data.
Definition: vtkStatisticsAlgorithm.h:186
vtkOrderStatistics::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOrderStatistics::New
static vtkOrderStatistics * New()
vtkOrderStatistics
A class for univariate order statistics.
Definition: vtkOrderStatistics.h:55
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:46
vtkOrderStatistics::SetQuantileDefinition
void SetQuantileDefinition(int)
Set the quantile definition.
vtkOrderStatistics::Aggregate
void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *) override
Given a collection of models, calculate aggregate model NB: not implemented.
Definition: vtkOrderStatistics.h:120
vtkOrderStatistics::SetParameter
bool SetParameter(const char *parameter, int index, vtkVariant value) override
A convenience method (in particular for access from other applications) to set parameter values.
vtkOrderStatistics::Learn
void Learn(vtkTable *, vtkTable *, vtkMultiBlockDataSet *) override
Execute the calculations required by the Learn option.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:66
vtkOrderStatistics::QuantileDefinitionType
QuantileDefinitionType
The type of quantile definition.
Definition: vtkOrderStatistics.h:65
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:37
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:72
vtkX3D::parameter
@ parameter
Definition: vtkX3D.h:449
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:60
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkOrderStatistics::QuantileDefinition
QuantileDefinitionType QuantileDefinition
Definition: vtkOrderStatistics.h:156
vtkOrderStatistics::~vtkOrderStatistics
~vtkOrderStatistics() override
vtkOrderStatistics::SelectAssessFunctor
void SelectAssessFunctor(vtkTable *outData, vtkDataObject *inMeta, vtkStringArray *rowNames, AssessFunctor *&dfunc) override
Provide the appropriate assessment functor.