52#ifndef vtkGenerateStatistics_h
53#define vtkGenerateStatistics_h
55#include "vtkFiltersParallelStatisticsModule.h"
59#include <unordered_map>
62VTK_ABI_NAMESPACE_BEGIN
65class vtkDataObjectToTable;
76class vtkStatisticsAccumulator;
266 std::unordered_map<vtkIdType, std::unordered_map<vtkIdType, double>>;
273 const std::unordered_map<vtkIdType, vtkIdType>& subset);
281 std::unordered_map<
vtkIdType, std::unordered_map<vtkIdType, double>>& edgesToVertsToWeights,
282 vtkGraph* graph,
const std::unordered_map<vtkIdType, vtkIdType>& subset);
288 const std::unordered_map<vtkIdType, vtkIdType>& subset);
294 vtkDataSet* data,
const std::unordered_map<vtkIdType, vtkIdType>& subset,
298 vtkGraph* data,
const std::unordered_map<vtkIdType, vtkIdType>& subset,
299 const std::unordered_map<
vtkIdType, std::unordered_map<vtkIdType, double>>&
300 edgesToVertsToWeights);
303 vtkDataObject* data,
const std::unordered_map<vtkIdType, vtkIdType>& subset,
328 std::unique_ptr<vtkStatisticsAlgorithmPrivate>
P;
334 class StatisticsAccumulator;
Visualization data composed of cells of arbitrary type.
abstract superclass for composite (multi-block or AMR) datasets
general representation of visualization data
abstract class to specify dataset behavior
Represents and manipulates a collection of data arrays.
int RequestDataPlain(vtkDataObject *dataObject, vtkStatisticalModel *model)
Populate model with the statistics of a "plain" data object, dataObject.
vtkTypeBool WeightByCellMeasure
virtual vtkIdType GetNumberOfObservationsForTraining(vtkIdType N)
Subclasses may (but need not) override this function to guarantee that some minimum number of observa...
int RequestData(vtkInformation *request, vtkInformationVector **input, vtkInformationVector *output) override
Methods for subclasses to override to handle different pipeline requests.
static vtkGenerateStatistics * New()
std::unordered_map< vtkIdType, std::unordered_map< vtkIdType, double > > PointsOfCellsWeightMap
void ComputeCellToPointWeights(PointsOfCellsWeightMap &cellToPointsToWeights, vtkDataSet *dataSet, const std::unordered_map< vtkIdType, vtkIdType > &subset)
Given a vtkDataSet, compute weights for each point of each cell in subset (or all cells if subset is ...
int MergeModelTrees(vtkPartitionedDataSetCollection *other, vtkPartitionedDataSetCollection *target)
Merge all the models from other into target.
int RequestDataCellGrid(vtkCellGrid *cellGrid, vtkStatisticalModel *model)
Populate model with the statistics of a cell-grid, cellGrid.
void ShallowCopy(vtkDataObject *out, vtkDataObject *in)
A variant of shallow copy that calls vtkDataObject::ShallowCopy() and then for composite datasets,...
void PrepareAlgorithmRequests(const std::vector< vtkSmartPointer< vtkAbstractArray > > &columns)
This method translates input-array specifications made on vtkGenerateStatistics into requests on its ...
vtkSmartPointer< vtkAbstractArray > FieldDataToSamples(vtkSmartPointer< vtkAbstractArray > fullArray, vtkDataObject *data, const std::unordered_map< vtkIdType, vtkIdType > &subset, vtkIdType numberOfSamples)
void ComputeEdgeToVertexWeights(std::unordered_map< vtkIdType, std::unordered_map< vtkIdType, double > > &edgesToVertsToWeights, vtkGraph *graph, const std::unordered_map< vtkIdType, vtkIdType > &subset)
Given a vtkGraph, compute weights for each vertex of each edge in subset (or all edges if subset is e...
int MergeRemoteModels(vtkPartitionedDataSetCollection *modelTree)
Communicate with other ranks to merge all remote models into modelTree.
int RequestDataPDC(vtkPartitionedDataSetCollection *pdc, vtkPartitionedDataSetCollection *modelTree)
Populate model with the statistics of a partitioned dataset collection, \ a pdc.
std::unique_ptr< vtkStatisticsAlgorithmPrivate > P
vtkMultiProcessController * Controller
vtkSmartPointer< vtkAbstractArray > CellToPointSamples(vtkSmartPointer< vtkAbstractArray > fullArray, vtkDataSet *data, const std::unordered_map< vtkIdType, vtkIdType > &subset, const PointsOfCellsWeightMap &cellsToPointsToWeights)
Resample a cell array to points.
void GenerateSubset(std::unordered_map< vtkIdType, vtkIdType > &subset, vtkIdType numberOfTuples, double trainingFraction, vtkUnsignedCharArray *ghostMarks, unsigned char ghostMask)
Generate a subset of IDs according to the training fraction and ghost markings.
int RequestDataAMR(vtkUniformGridAMR *amr, vtkPartitionedDataSetCollection *modelTree)
Populate model with the statistics of a uniform-grid AMR dataset, amr.
void ClearAttributeArrays()
An alternate interface for preparing a selection of arrays to process.
int RequestLocalDataDispatch(vtkDataObject *dataObject, vtkPartitionedDataSetCollection *modelTree)
Determine the type of dataObject and call the matching variant below.
void TranslateRequests(vtkDataObject *data)
Translate requests from field names to "field_component" names for vector/tensor fields.
virtual void SetController(vtkMultiProcessController *)
Get/Set the multiprocess controller.
void EnableAttributeArray(const char *arrName)
An alternate interface for preparing a selection of arrays to process.
~vtkGenerateStatistics() override
const char * GetAttributeArrayName(int nn)
Get the name of the nn-th array ffor the current value of AttributeMode.
vtkStatisticsAlgorithm * StatisticsAlgorithm
int RequestDataNonComposite(vtkDataObject *dataObject, vtkStatisticalModel *model)
Determine the type of non-composite dataObject and call the matching variant below.
int GetNumberOfAttributeArrays()
Return the number of columns available for the current value of AttributeMode.
vtkSmartPointer< vtkAbstractArray > SubsetArray(vtkSmartPointer< vtkAbstractArray > fullArray, const std::unordered_map< vtkIdType, vtkIdType > &subset)
Return the array itself or a subset as specified.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual void SetStatisticsAlgorithm(vtkStatisticsAlgorithm *)
Get/set the statistics filter used to create a model of the data.
int ComputeDerivedData(vtkPartitionedDataSetCollection *modelTree)
Once remote model(s) have been merged, derived information is computed on all ranks.
vtkSmartPointer< vtkAbstractArray > EdgeToVertexSamples(vtkSmartPointer< vtkAbstractArray > fullArray, vtkGraph *data, const std::unordered_map< vtkIdType, vtkIdType > &subset, const std::unordered_map< vtkIdType, std::unordered_map< vtkIdType, double > > &edgesToVertsToWeights)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestDataPD(vtkPartitionedDataSet *pd, vtkStatisticalModel *model)
Populate model with the statistics of a partitioned dataset, \ a pd.
int GetAttributeArrayStatus(const char *arrName)
Get the status of the specified array (i.e., whether or not it is a column of interest).
Base class for graph data types.
a simple class to control print indentation
Multiprocessing communication superclass.
vtkPartitionedDataSetCollectionAlgorithm()
Composite dataset that groups datasets as a collection.
composite dataset to encapsulates a dataset consisting of partitions.
Hold a reference to a vtkObjectBase instance.
a base class for statistical modeling of other data
Base class for statistics algorithms.
A table, which contains similar-typed columns of data.
dynamic, self-adjusting array of unsigned char
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)