144#ifndef vtkDataArray_h
145#define vtkDataArray_h
148#include "vtkCommonCoreModule.h"
149#include "vtkVTK_USE_SCALED_SOA_ARRAYS.h"
196 double* weights)
override;
243 virtual
void SetTuple(
vtkIdType tupleIdx, const
float* tuple)
244 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
245 virtual
void SetTuple(
vtkIdType tupleIdx, const
double* tuple)
246 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
256 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
257 void SetTuple2(
vtkIdType tupleIdx,
double val0,
double val1)
258 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
259 void SetTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
260 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
261 void SetTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3)
262 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
263 void SetTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
264 double val4,
double val5)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
265 void SetTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
266 double val4,
double val5,
double val6,
double val7,
double val8)
267 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
287 void InsertTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
289 void InsertTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3)
291 void InsertTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
292 double val4,
double val5)
VTK_EXPECTS(0 <= tupleIdx);
293 void InsertTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
294 double val4,
double val5,
double val6,
double val7,
double val8)
VTK_EXPECTS(0 <= tupleIdx);
303 virtual
vtkIdType InsertNextTuple(const
float* tuple) = 0;
304 virtual
vtkIdType InsertNextTuple(const
double* tuple) = 0;
313 void InsertNextTuple1(
double value);
314 void InsertNextTuple2(
double val0,
double val1);
315 void InsertNextTuple3(
double val0,
double val1,
double val2);
316 void InsertNextTuple4(
double val0,
double val1,
double val2,
double val3);
317 void InsertNextTuple6(
318 double val0,
double val1,
double val2,
double val3,
double val4,
double val5);
319 void InsertNextTuple9(
double val0,
double val1,
double val2,
double val3,
double val4,
320 double val5,
double val6,
double val7,
double val8);
330 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples()) = 0;
331 virtual
void RemoveFirstTuple() { this->RemoveTuple(0); }
350 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
351 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
397 virtual
void FillComponent(
int compIdx,
double value)
398 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
413 virtual
void CopyComponent(
int dstComponent,
vtkDataArray* src,
int srcComponent);
430 unsigned long GetActualMemorySize() const override;
436 void CreateDefaultLookupTable();
455 void GetRange(
double range[2],
int comp) { this->ComputeRange(
range, comp); }
468 this->GetRange(this->
Range, comp);
514 this->GetFiniteRange(this->FiniteRange, comp);
515 return this->FiniteRange;
675 double FiniteRange[2];
690 switch (
source->GetArrayType())
Abstract superclass for all arrays.
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
virtual int GetDataTypeSize() const =0
Return the size of the underlying data type.
abstract superclass for arrays of numeric data
virtual double * GetTuple(vtkIdType tupleIdx)=0
Get the data tuple at tupleIdx.
double * GetRange()
Return the range of the data array.
static double GetDataTypeMin(int type)
These methods return the Min and Max possible range of the native data type.
double * GetTuple2(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.
void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights) override
Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in th...
virtual bool ComputeVectorRange(double range[2])
Returns true if the range was computed.
int IsNumeric() const override
This method is here to make backward compatibility easier.
void GetDataTypeRange(double range[2])
These methods return the Min and Max possible range of the native data type.
void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray *source1, vtkIdType srcTupleIdx2, vtkAbstractArray *source2, double t) override
Insert the tuple at dstTupleIdx in this array to the tuple interpolated from the two tuple indices,...
virtual void ComputeRange(double range[2], int comp)
Compute the range for a specific component.
double * GetFiniteRange()
Return the range of the data array.
virtual bool ComputeScalarRange(double *ranges)
Computes the range for each component of an array, the length of ranges must be two times the number ...
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in t...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetArrayType() const override
Method for type-checking in FastDownCast implementations.
int GetElementComponentSize() const override
Return the size, in bytes, of the lowest-level element of an array.
virtual bool ComputeFiniteVectorRange(double range[2])
Returns true if the range was computed.
static vtkInformationDoubleVectorKey * COMPONENT_RANGE()
This key is used to hold tight bounds on the range of one component over all tuples of the array.
virtual void RemoveLastTuple()
These methods remove tuples from the data array.
double * GetRange(int comp)
Return the range of the data array values for the given component.
void GetFiniteRange(double range[2], int comp)
The range of the data array values for the given component will be returned in the provided range arr...
void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override
Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive).
static vtkInformationDoubleVectorKey * L2_NORM_RANGE()
This key is used to hold tight bounds on the $L_2$ norm of tuples in the array.
double GetDataTypeMin()
These methods return the Min and Max possible range of the native data type.
void GetTuples(vtkIdList *tupleIds, vtkAbstractArray *output) override
Given a list of tuple ids, return an array of tuples.
virtual void GetTuple(vtkIdType tupleIdx, double *tuple)=0
Get the data tuple at tupleIdx by filling in a user-provided array, Make sure that your array is larg...
double GetTuple1(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.
static vtkInformationDoubleVectorKey * L2_NORM_FINITE_RANGE()
This key is used to hold tight bounds on the $L_2$ norm of tuples in the array.
double GetDataTypeMax()
These methods return the Min and Max possible range of the native data type.
int CopyInformation(vtkInformation *infoFrom, int deep=1) override
Copy information instance.
void GetRange(double range[2])
The range of the data array values will be returned in the provided range array argument.
static vtkDataArray * FastDownCast(vtkAbstractArray *source)
Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray.
virtual double GetComponent(vtkIdType tupleIdx, int compIdx)
Return the data component at the location specified by tupleIdx and compIdx.
vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Insert the tuple from srcTupleIdx in the source array at the end of this array.
virtual void ComputeFiniteRange(double range[2], int comp)
Compute the range for a specific component.
virtual double GetMaxNorm()
Return the maximum norm for the tuples.
void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx.
static void GetDataTypeRange(int type, double range[2])
These methods return the Min and Max possible range of the native data type.
static vtkDataArray * CreateDataArray(int dataType)
Creates an array for dataType where dataType is one of VTK_BIT, VTK_CHAR, VTK_SIGNED_CHAR,...
void GetFiniteRange(double range[2])
The range of the data array values will be returned in the provided range array argument.
double * GetFiniteRange(int comp)
Return the range of the data array values for the given component.
void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override
Copy n consecutive tuples starting at srcStart from the source array to this array,...
static vtkInformationStringKey * UNITS_LABEL()
A human-readable string indicating the units for the array data.
virtual bool ComputeFiniteScalarRange(double *ranges)
Computes the range for each component of an array, the length of ranges must be two times the number ...
void Modified() override
Removes out-of-date L2_NORM_RANGE() and L2_NORM_FINITE_RANGE() values.
static double GetDataTypeMax(int type)
These methods return the Min and Max possible range of the native data type.
vtkLookupTable * LookupTable
dynamic, self-adjusting array of double
list of point or cell ids
a simple class to control print indentation
map scalar values into colors via a lookup table
represent and manipulate 3D points
vtkSmartPointer< vtkDataArray > GetData(const Ioss::GroupingEntity *entity, const std::string &fieldname, Ioss::Transform *transform=nullptr, Cache *cache=nullptr, const std::string &cachekey=std::string())
Returns a VTK array for a given field (fieldname) on the chosen block (or set) entity.
auto Range(IterablePtr iterable, Options &&... opts) -> typename detail::IterableTraits< typename detail::StripPointers< IterablePtr >::type >::RangeType
Generate an iterable STL proxy object for a VTK container.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkArrayDownCast_FastCastMacro(vtkDataArray)
#define VTK_SIZEHINT(...)