34 #ifndef vtkArrayListTemplate_h
35 #define vtkArrayListTemplate_h
47 VTK_ABI_NAMESPACE_BEGIN
57 , OutputArray(outArray)
72 #ifdef VTK_USE_64BIT_IDS
73 virtual void Copy(
unsigned int inId,
unsigned int outId) = 0;
75 int numWeights,
const unsigned int* ids,
const double* weights,
unsigned int outId) = 0;
77 int numWeights,
const unsigned int* ids,
const double* weights,
unsigned int outId) = 0;
78 virtual void Average(
int numPts,
const unsigned int* ids,
unsigned int outId) = 0;
80 int numPts,
const unsigned int* ids,
const double* weights,
unsigned int outId) = 0;
81 virtual void InterpolateEdge(
unsigned int v0,
unsigned int v1,
double t,
unsigned int outId) = 0;
84 virtual void Copy(
unsigned short inId,
unsigned short outId) = 0;
86 int numWeights,
const unsigned short* ids,
const double* weights,
unsigned short outId) = 0;
88 int numWeights,
const unsigned short* ids,
const double* weights,
unsigned short outId) = 0;
89 virtual void Average(
int numPts,
const unsigned short* ids,
unsigned short outId) = 0;
91 int numPts,
const unsigned short* ids,
const double* weights,
unsigned short outId) = 0;
93 unsigned short v0,
unsigned short v1,
double t,
unsigned short outId) = 0;
100 template <
typename T>
116 template <
typename IdTypeT>
117 void Copy(IdTypeT inId, IdTypeT outId)
119 for (
int j = 0; j < this->
NumComp; ++j)
121 this->Output[outId * this->NumComp + j] =
122 static_cast<T
>(this->Input[inId * this->NumComp + j]);
126 template <
typename IdTypeT>
127 void Interpolate(
int numWeights,
const IdTypeT* ids,
const double* weights, IdTypeT outId)
129 for (
int j = 0; j < this->
NumComp; ++j)
132 for (
int i = 0; i < numWeights; ++i)
134 v += weights[i] *
static_cast<double>(this->Input[ids[i] * this->NumComp + j]);
136 this->Output[outId * this->NumComp + j] =
static_cast<T
>(v);
140 template <
typename IdTypeT>
141 void InterpolateOutput(
int numWeights,
const IdTypeT* ids,
const double* weights, IdTypeT outId)
143 for (
int j = 0; j < this->
NumComp; ++j)
146 for (
int i = 0; i < numWeights; ++i)
148 v += weights[i] *
static_cast<double>(this->Output[ids[i] * this->NumComp + j]);
150 this->Output[outId * this->NumComp + j] =
static_cast<T
>(v);
154 template <
typename IdTypeT>
155 void Average(
int numPts,
const IdTypeT* ids, IdTypeT outId)
157 for (
int j = 0; j < this->
NumComp; ++j)
160 for (
int i = 0; i < numPts; ++i)
162 v +=
static_cast<double>(this->Input[ids[i] * this->NumComp + j]);
164 v /=
static_cast<double>(numPts);
165 this->Output[outId * this->NumComp + j] =
static_cast<T
>(v);
169 template <
typename IdTypeT>
170 void WeightedAverage(
int numPts,
const IdTypeT* ids,
const double* weights, IdTypeT outId)
172 for (
int j = 0; j < this->
NumComp; ++j)
175 for (
int i = 0; i < numPts; ++i)
177 v += (weights[i] *
static_cast<double>(this->Input[ids[i] * this->NumComp + j]));
179 this->Output[outId * this->NumComp + j] =
static_cast<T
>(v);
183 template <
typename IdTypeT>
187 for (
int j = 0; j < this->
NumComp; ++j)
189 v = this->Input[v0 * this->NumComp + j] +
190 t * (this->Input[v1 * this->NumComp + j] - this->Input[v0 * this->NumComp + j]);
191 this->Output[outId * this->NumComp + j] =
static_cast<T
>(v);
195 template <
typename IdTypeT>
198 for (
int j = 0; j < this->
NumComp; ++j)
200 this->Output[outId * this->NumComp + j] = this->
NullValue;
207 int numWeights,
const vtkIdType* ids,
const double* weights,
vtkIdType outId)
override
209 this->Interpolate<vtkIdType>(numWeights, ids, weights, outId);
212 int numWeights,
const vtkIdType* ids,
const double* weights,
vtkIdType outId)
override
214 this->InterpolateOutput<vtkIdType>(numWeights, ids, weights, outId);
218 this->Average<vtkIdType>(numPts, ids, outId);
223 this->WeightedAverage<vtkIdType>(numPts, ids, weights, outId);
227 this->InterpolateEdge<vtkIdType>(v0, v1, t, outId);
230 #ifdef VTK_USE_64BIT_IDS
231 void Copy(
unsigned int inId,
unsigned int outId)
override
233 this->Copy<unsigned int>(inId, outId);
236 int numWeights,
const unsigned int* ids,
const double* weights,
unsigned int outId)
override
238 this->Interpolate<unsigned int>(numWeights, ids, weights, outId);
241 int numWeights,
const unsigned int* ids,
const double* weights,
unsigned int outId)
override
243 this->InterpolateOutput<unsigned int>(numWeights, ids, weights, outId);
245 void Average(
int numPts,
const unsigned int* ids,
unsigned int outId)
override
247 this->Average<unsigned int>(numPts, ids, outId);
250 int numPts,
const unsigned int* ids,
const double* weights,
unsigned int outId)
override
252 this->WeightedAverage<unsigned int>(numPts, ids, weights, outId);
254 void InterpolateEdge(
unsigned int v0,
unsigned int v1,
double t,
unsigned int outId)
override
256 this->InterpolateEdge<unsigned int>(v0, v1, t, outId);
258 void AssignNullValue(
unsigned int outId)
override { this->AssignNullValue<unsigned int>(outId); }
260 void Copy(
unsigned short inId,
unsigned short outId)
override
262 this->Copy<unsigned short>(inId, outId);
265 int numWeights,
const unsigned short* ids,
const double* weights,
unsigned short outId)
override
267 this->Interpolate<unsigned short>(numWeights, ids, weights, outId);
270 int numWeights,
const unsigned short* ids,
const double* weights,
unsigned short outId)
override
272 this->InterpolateOutput<unsigned short>(numWeights, ids, weights, outId);
274 void Average(
int numPts,
const unsigned short* ids,
unsigned short outId)
override
276 this->Average<unsigned short>(numPts, ids, outId);
279 int numPts,
const unsigned short* ids,
const double* weights,
unsigned short outId)
override
281 this->WeightedAverage<unsigned short>(numPts, ids, weights, outId);
284 unsigned short v0,
unsigned short v1,
double t,
unsigned short outId)
override
286 this->InterpolateEdge<unsigned short>(v0, v1, t, outId);
290 this->AssignNullValue<unsigned short>(outId);
318 template <
typename IdTypeT>
319 void Copy(IdTypeT inId, IdTypeT outId)
321 for (
int j = 0; j < this->
NumComp; ++j)
323 this->Output[outId * this->NumComp + j] =
324 static_cast<vtkStdString>(this->Input[inId * this->NumComp + j]);
327 template <
typename IdTypeT>
329 int numWeights,
const IdTypeT* ids,
const double* vtkNotUsed(weights), IdTypeT outId)
331 for (
int i = 0; i < numWeights; ++i)
333 this->
Copy(ids[i], outId);
336 template <
typename IdTypeT>
338 const double* vtkNotUsed(weights), IdTypeT vtkNotUsed(outId))
341 template <
typename IdTypeT>
342 void Average(
int numPts,
const IdTypeT* ids, IdTypeT outId)
344 for (
int i = 0; i < numPts; ++i)
346 this->
Copy(ids[i], outId);
349 template <
typename IdTypeT>
351 int numPts,
const IdTypeT* ids,
const double* vtkNotUsed(weights), IdTypeT outId)
353 for (
int i = 0; i < numPts; ++i)
355 this->
Copy(ids[i], outId);
358 template <
typename IdTypeT>
362 for (
int j = 0; j < this->
NumComp; ++j)
364 s =
std::string(this->Input[v0 * this->NumComp + j]) +
366 this->Output[outId * this->NumComp + j] = s;
370 template <
typename IdTypeT>
373 for (
int j = 0; j < this->
NumComp; ++j)
375 this->Output[outId * this->NumComp + j] = std::to_string(this->NullValue);
382 int numWeights,
const vtkIdType* ids,
const double* weights,
vtkIdType outId)
override
384 this->Interpolate<vtkIdType>(numWeights, ids, weights, outId);
387 int numWeights,
const vtkIdType* ids,
const double* weights,
vtkIdType outId)
override
389 this->InterpolateOutput<vtkIdType>(numWeights, ids, weights, outId);
393 this->Average<vtkIdType>(numPts, ids, outId);
398 this->WeightedAverage<vtkIdType>(numPts, ids, weights, outId);
402 this->InterpolateEdge<vtkIdType>(v0, v1, t, outId);
405 #ifdef VTK_USE_64BIT_IDS
406 void Copy(
unsigned int inId,
unsigned int outId)
override
408 this->Copy<unsigned int>(inId, outId);
411 int numWeights,
const unsigned int* ids,
const double* weights,
unsigned int outId)
override
413 this->Interpolate<unsigned int>(numWeights, ids, weights, outId);
416 int numWeights,
const unsigned int* ids,
const double* weights,
unsigned int outId)
override
418 this->InterpolateOutput<unsigned int>(numWeights, ids, weights, outId);
420 void Average(
int numPts,
const unsigned int* ids,
unsigned int outId)
override
422 this->Average<unsigned int>(numPts, ids, outId);
425 int numPts,
const unsigned int* ids,
const double* weights,
unsigned int outId)
override
427 this->WeightedAverage<unsigned int>(numPts, ids, weights, outId);
429 void InterpolateEdge(
unsigned int v0,
unsigned int v1,
double t,
unsigned int outId)
override
431 this->InterpolateEdge<unsigned int>(v0, v1, t, outId);
433 void AssignNullValue(
unsigned int outId)
override { this->AssignNullValue<unsigned int>(outId); }
435 void Copy(
unsigned short inId,
unsigned short outId)
override
437 this->Copy<unsigned short>(inId, outId);
440 int numWeights,
const unsigned short* ids,
const double* weights,
unsigned short outId)
override
442 this->Interpolate<unsigned short>(numWeights, ids, weights, outId);
445 int numWeights,
const unsigned short* ids,
const double* weights,
unsigned short outId)
override
447 this->InterpolateOutput<unsigned short>(numWeights, ids, weights, outId);
449 void Average(
int numPts,
const unsigned short* ids,
unsigned short outId)
override
451 this->Average<unsigned short>(numPts, ids, outId);
454 int numPts,
const unsigned short* ids,
const double* weights,
unsigned short outId)
override
456 this->WeightedAverage<unsigned short>(numPts, ids, weights, outId);
459 unsigned short v0,
unsigned short v1,
double t,
unsigned short outId)
override
461 this->InterpolateEdge<unsigned short>(v0, v1, t, outId);
465 this->AssignNullValue<unsigned short>(outId);
478 template <
typename TInput,
typename TOutput>
495 template <
typename IdTypeT>
496 void Copy(IdTypeT inId, IdTypeT outId)
498 for (
int j = 0; j < this->
NumComp; ++j)
500 this->Output[outId * this->NumComp + j] =
501 static_cast<TOutput
>(this->Input[inId * this->NumComp + j]);
505 template <
typename IdTypeT>
506 void Interpolate(
int numWeights,
const IdTypeT* ids,
const double* weights, IdTypeT outId)
508 for (
int j = 0; j < this->
NumComp; ++j)
511 for (
int i = 0; i < numWeights; ++i)
513 v += weights[i] *
static_cast<double>(this->Input[ids[i] * this->NumComp + j]);
515 this->Output[outId * this->NumComp + j] =
static_cast<TOutput
>(v);
519 template <
typename IdTypeT>
520 void InterpolateOutput(
int numWeights,
const IdTypeT* ids,
const double* weights, IdTypeT outId)
522 for (
int j = 0; j < this->
NumComp; ++j)
525 for (
int i = 0; i < numWeights; ++i)
527 v += weights[i] *
static_cast<double>(this->Output[ids[i] * this->NumComp + j]);
529 this->Output[outId * this->NumComp + j] =
static_cast<TOutput
>(v);
533 template <
typename IdTypeT>
534 void Average(
int numPts,
const IdTypeT* ids, IdTypeT outId)
536 for (
int j = 0; j < this->
NumComp; ++j)
539 for (
int i = 0; i < numPts; ++i)
541 v +=
static_cast<double>(this->Input[ids[i] * this->NumComp + j]);
543 v /=
static_cast<double>(numPts);
544 this->Output[outId * this->NumComp + j] =
static_cast<TOutput
>(v);
548 template <
typename IdTypeT>
549 void WeightedAverage(
int numPts,
const IdTypeT* ids,
const double* weights, IdTypeT outId)
551 for (
int j = 0; j < this->
NumComp; ++j)
554 for (
int i = 0; i < numPts; ++i)
556 v += (weights[i] *
static_cast<double>(this->Input[ids[i] * this->NumComp + j]));
558 this->Output[outId * this->NumComp + j] =
static_cast<TOutput
>(v);
562 template <
typename IdTypeT>
566 for (
int j = 0; j < this->
NumComp; ++j)
568 v = this->Input[v0 * this->NumComp + j] +
569 t * (this->Input[v1 * this->NumComp + j] - this->Input[v0 * this->NumComp + j]);
570 this->Output[outId * this->NumComp + j] =
static_cast<TOutput
>(v);
574 template <
typename IdTypeT>
577 for (
int j = 0; j < this->
NumComp; ++j)
579 this->Output[outId * this->NumComp + j] = this->
NullValue;
586 int numWeights,
const vtkIdType* ids,
const double* weights,
vtkIdType outId)
override
588 this->Interpolate<vtkIdType>(numWeights, ids, weights, outId);
591 int numWeights,
const vtkIdType* ids,
const double* weights,
vtkIdType outId)
override
593 this->InterpolateOutput<vtkIdType>(numWeights, ids, weights, outId);
597 this->Average<vtkIdType>(numPts, ids, outId);
602 this->WeightedAverage<vtkIdType>(numPts, ids, weights, outId);
606 this->InterpolateEdge<vtkIdType>(v0, v1, t, outId);
609 #ifdef VTK_USE_64BIT_IDS
610 void Copy(
unsigned int inId,
unsigned int outId)
override
612 this->Copy<unsigned int>(inId, outId);
615 int numWeights,
const unsigned int* ids,
const double* weights,
unsigned int outId)
override
617 this->Interpolate<unsigned int>(numWeights, ids, weights, outId);
620 int numWeights,
const unsigned int* ids,
const double* weights,
unsigned int outId)
override
622 this->InterpolateOutput<unsigned int>(numWeights, ids, weights, outId);
624 void Average(
int numPts,
const unsigned int* ids,
unsigned int outId)
override
626 this->Average<unsigned int>(numPts, ids, outId);
629 int numPts,
const unsigned int* ids,
const double* weights,
unsigned int outId)
override
631 this->WeightedAverage<unsigned int>(numPts, ids, weights, outId);
633 void InterpolateEdge(
unsigned int v0,
unsigned int v1,
double t,
unsigned int outId)
override
635 this->InterpolateEdge<unsigned int>(v0, v1, t, outId);
637 void AssignNullValue(
unsigned int outId)
override { this->AssignNullValue<unsigned int>(outId); }
639 void Copy(
unsigned short inId,
unsigned short outId)
override
641 this->Copy<unsigned short>(inId, outId);
644 int numWeights,
const unsigned short* ids,
const double* weights,
unsigned short outId)
override
646 this->Interpolate<unsigned short>(numWeights, ids, weights, outId);
649 int numWeights,
const unsigned short* ids,
const double* weights,
unsigned short outId)
override
651 this->InterpolateOutput<unsigned short>(numWeights, ids, weights, outId);
653 void Average(
int numPts,
const unsigned short* ids,
unsigned short outId)
override
655 this->Average<unsigned short>(numPts, ids, outId);
658 int numPts,
const unsigned short* ids,
const double* weights,
unsigned short outId)
override
660 this->WeightedAverage<unsigned short>(numPts, ids, weights, outId);
663 unsigned short v0,
unsigned short v1,
double t,
unsigned short outId)
override
665 this->InterpolateEdge<unsigned short>(v0, v1, t, outId);
669 this->AssignNullValue<unsigned short>(outId);
683 template <
typename T>
685 ArrayList* list, T* inData, T* outData,
vtkIdType numTuples,
int numComp, T nullValue);
697 double nullValue = 0.0,
vtkTypeBool promote =
true);
717 for (
auto& array : this->Arrays)
724 template <
typename TIdType>
725 void Copy(TIdType inId, TIdType outId)
727 for (
auto& array : this->Arrays)
729 array->Copy(inId, outId);
733 template <
typename TIdType>
734 void Interpolate(
int numWeights,
const TIdType* ids,
const double* weights, TIdType outId)
736 for (
auto& array : this->Arrays)
738 array->Interpolate(numWeights, ids, weights, outId);
742 template <
typename TIdType>
743 void InterpolateOutput(
int numWeights,
const TIdType* ids,
const double* weights, TIdType outId)
745 for (
auto& array : this->Arrays)
747 array->InterpolateOutput(numWeights, ids, weights, outId);
751 template <
typename TIdType>
752 void Average(
int numPts,
const TIdType* ids, TIdType outId)
754 for (
auto& array : this->Arrays)
756 array->Average(numPts, ids, outId);
760 template <
typename TIdType>
761 void WeightedAverage(
int numPts,
const TIdType* ids,
const double* weights, TIdType outId)
763 for (
auto& array : this->Arrays)
765 array->WeightedAverage(numPts, ids, weights, outId);
769 template <
typename TIdType>
772 for (
auto& array : this->Arrays)
774 array->InterpolateEdge(v0, v1, t, outId);
778 template <
typename TIdType>
781 for (
auto& array : this->Arrays)
783 array->AssignNullValue(outId);
798 this->Interpolate<vtkIdType>(numWeights, ids, weights, outId);
806 this->InterpolateOutput<vtkIdType>(numWeights, ids, weights, outId);
813 this->Average<vtkIdType>(numPts, ids, outId);
820 this->WeightedAverage<vtkIdType>(numPts, ids, weights, outId);
827 this->InterpolateEdge<vtkIdType>(v0, v1, t, outId);
833 #ifdef VTK_USE_64BIT_IDS
838 void Copy(
unsigned int inId,
unsigned int outId) { this->Copy<unsigned int>(inId, outId); }
843 int numWeights,
const unsigned int* ids,
const double* weights,
unsigned int outId)
845 this->Interpolate<unsigned int>(numWeights, ids, weights, outId);
851 int numWeights,
const unsigned int* ids,
const double* weights,
unsigned int outId)
853 this->InterpolateOutput<unsigned int>(numWeights, ids, weights, outId);
858 void Average(
int numPts,
const unsigned int* ids,
unsigned int outId)
860 this->Average<unsigned int>(numPts, ids, outId);
866 int numPts,
const unsigned int* ids,
const double* weights,
unsigned int outId)
868 this->WeightedAverage<unsigned int>(numPts, ids, weights, outId);
873 void InterpolateEdge(
unsigned int v0,
unsigned int v1,
double t,
unsigned int outId)
875 this->InterpolateEdge<unsigned int>(v0, v1, t, outId);
880 void AssignNullValue(
unsigned int outId) { this->AssignNullValue<unsigned int>(outId); }
886 void Copy(
unsigned short inId,
unsigned short outId) { this->Copy<unsigned short>(inId, outId); }
891 int numWeights,
const unsigned short* ids,
const double* weights,
unsigned short outId)
893 this->Interpolate<unsigned short>(numWeights, ids, weights, outId);
899 int numWeights,
const unsigned short* ids,
const double* weights,
unsigned short outId)
901 this->InterpolateOutput<unsigned short>(numWeights, ids, weights, outId);
906 void Average(
int numPts,
const unsigned short* ids,
unsigned short outId)
908 this->Average<unsigned short>(numPts, ids, outId);
914 int numPts,
const unsigned short* ids,
const double* weights,
unsigned short outId)
916 this->WeightedAverage<unsigned short>(numPts, ids, weights, outId);
921 void InterpolateEdge(
unsigned short v0,
unsigned short v1,
double t,
unsigned short outId)
923 this->InterpolateEdge<unsigned short>(v0, v1, t, outId);
928 void AssignNullValue(
unsigned short outId) { this->AssignNullValue<unsigned short>(outId); }
935 for (
auto& array : this->Arrays)
947 VTK_ABI_NAMESPACE_END
948 #include "vtkArrayListTemplate.txx"
void WeightedAverage(int numPts, const TIdType *ids, const double *weights, TIdType outId)
vtkSmartPointer< vtkAbstractArray > OutputArray
Wrapper around std::string to keep symbols short.
void Interpolate(int numWeights, const TIdType *ids, const double *weights, TIdType outId)
void Interpolate(int numWeights, const IdTypeT *ids, const double *vtkNotUsed(weights), IdTypeT outId)
void InterpolateEdge(vtkIdType v0, vtkIdType v1, double t, vtkIdType outId) override
std::vector< BaseArrayPair * > Arrays
void AssignNullValue(unsigned short outId)
Loop over the arrays and assign the null value.
void InterpolateOutput(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId)
Loop over the arrays and have them interpolate themselves based on the output arrays.
void Average(int numPts, const unsigned short *ids, unsigned short outId)
Loop over the arrays and have them averaged.
void ExcludeArray(vtkAbstractArray *da)
void WeightedAverage(int numPts, const IdTypeT *ids, const double *vtkNotUsed(weights), IdTypeT outId)
void InterpolateOutput(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId) override
void WeightedAverage(int numPts, const vtkIdType *ids, const double *weights, vtkIdType outId) override
std::vector< vtkAbstractArray * > ExcludedArrays
virtual void * GetVoidPointer(vtkIdType valueIdx)=0
Return a void pointer.
vtkAbstractArray * AddArrayPair(vtkIdType numTuples, vtkAbstractArray *inArray, vtkStdString &outArrayName, double nullValue, vtkTypeBool promote)
~RealArrayPair() override=default
void InterpolateEdge(vtkIdType v0, vtkIdType v1, double t, vtkIdType outId) override
void Copy(vtkIdType inId, vtkIdType outId) override
void WeightedAverage(int numPts, const vtkIdType *ids, const double *weights, vtkIdType outId) override
void Interpolate(int numWeights, const unsigned short *ids, const double *weights, unsigned short outId) override
void Average(int numPts, const TIdType *ids, TIdType outId)
void AssignNullValue(unsigned short outId) override
Abstract superclass for all arrays.
void WeightedAverage(int numPts, const IdTypeT *ids, const double *weights, IdTypeT outId)
void AssignNullValue(vtkIdType outId) override
ArrayPair(vtkStdString *in, vtkStdString *out, vtkIdType num, int numComp, vtkAbstractArray *outArray, double null)
void WeightedAverage(int numPts, const vtkIdType *ids, const double *weights, vtkIdType outId) override
void Copy(vtkIdType inId, vtkIdType outId) override
void InterpolateOutput(int numWeights, const unsigned short *ids, const double *weights, unsigned short outId) override
void Copy(unsigned short inId, unsigned short outId)
Loop over the array pairs and copy data from one to another.
void AssignNullValue(vtkIdType outId) override
void InterpolateOutput(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId) override
void InterpolateOutput(int numWeights, const unsigned short *ids, const double *weights, unsigned short outId) override
void Realloc(vtkIdType sze) override
void Average(int numPts, const vtkIdType *ids, vtkIdType outId)
Loop over the arrays and have them averaged.
void WeightedAverage(int numPts, const IdTypeT *ids, const double *weights, IdTypeT outId)
virtual void Average(int numPts, const vtkIdType *ids, vtkIdType outId)=0
void Interpolate(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId) override
void Average(int numPts, const unsigned short *ids, unsigned short outId) override
void InterpolateEdge(unsigned short v0, unsigned short v1, double t, unsigned short outId) override
void InterpolateEdge(IdTypeT v0, IdTypeT v1, double t, IdTypeT outId)
void InterpolateOutput(int numWeights, const TIdType *ids, const double *weights, TIdType outId)
void InterpolateEdge(IdTypeT v0, IdTypeT v1, double t, IdTypeT outId)
void InterpolateOutput(int numWeights, const IdTypeT *ids, const double *weights, IdTypeT outId)
void InterpolateOutput(int vtkNotUsed(numWeights), const IdTypeT *vtkNotUsed(ids), const double *vtkNotUsed(weights), IdTypeT vtkNotUsed(outId))
void AssignNullValue(vtkIdType outId) override
void AssignNullValue(IdTypeT outId)
virtual void Realloc(vtkIdType sze)=0
void Interpolate(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId)
Loop over the arrays and have them interpolate themselves.
virtual void Interpolate(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId)=0
void InterpolateEdge(TIdType v0, TIdType v1, double t, TIdType outId)
virtual void WeightedAverage(int numPts, const vtkIdType *ids, const double *weights, vtkIdType outId)=0
void AssignNullValue(TIdType outId)
void InterpolateEdge(vtkIdType v0, vtkIdType v1, double t, vtkIdType outId)
Loop over the arrays perform edge interpolation.
virtual void InterpolateOutput(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId)=0
void AssignNullValue(vtkIdType outId)
Loop over the arrays and assign the null value.
RealArrayPair(TInput *in, TOutput *out, vtkIdType num, int numComp, vtkAbstractArray *outArray, TOutput null)
vtkIdType GetNumberOfArrays()
Return the number of arrays.
void Copy(unsigned short inId, unsigned short outId) override
void Copy(vtkIdType inId, vtkIdType outId)
Loop over the array pairs and copy data from one to another.
void AssignNullValue(unsigned short outId) override
void Interpolate(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId) override
~ArrayPair() override=default
void Realloc(vtkIdType sze)
Extend (realloc) the arrays.
void Interpolate(int numWeights, const unsigned short *ids, const double *weights, unsigned short outId) override
void WeightedAverage(int numPts, const unsigned short *ids, const double *weights, unsigned short outId) override
void Average(int numPts, const IdTypeT *ids, IdTypeT outId)
void AddArrays(vtkIdType numOutPts, vtkDataSetAttributes *inPD, vtkDataSetAttributes *outPD, double nullValue=0.0, vtkTypeBool promote=true)
void Copy(IdTypeT inId, IdTypeT outId)
void Copy(unsigned short inId, unsigned short outId) override
represent and manipulate attribute data in a dataset
void InterpolateEdge(IdTypeT v0, IdTypeT v1, double vtkNotUsed(t), IdTypeT outId)
void InterpolateEdge(unsigned short v0, unsigned short v1, double t, unsigned short outId)
Loop over the arrays perform edge interpolation.
virtual void Copy(vtkIdType inId, vtkIdType outId)=0
vtkTypeBool IsExcluded(vtkAbstractArray *da)
void WeightedAverage(int numPts, const unsigned short *ids, const double *weights, unsigned short outId)
Loop over the arrays and weighted average the attributes.
void AssignNullValue(IdTypeT outId)
void InterpolateEdge(unsigned short v0, unsigned short v1, double t, unsigned short outId) override
void Copy(IdTypeT inId, IdTypeT outId)
virtual void InterpolateEdge(vtkIdType v0, vtkIdType v1, double t, vtkIdType outId)=0
void Average(int numPts, const IdTypeT *ids, IdTypeT outId)
virtual vtkTypeBool Resize(vtkIdType numTuples)=0
Resize the array to the requested number of tuples and preserve data.
void InterpolateOutput(int numWeights, const unsigned short *ids, const double *weights, unsigned short outId)
Loop over the arrays and have them interpolate themselves based on the output arrays.
void InterpolateEdge(unsigned short v0, unsigned short v1, double t, unsigned short outId) override
void InterpolateOutput(int numWeights, const unsigned short *ids, const double *weights, unsigned short outId) override
void Interpolate(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId) override
void Average(int numPts, const vtkIdType *ids, vtkIdType outId) override
void Realloc(vtkIdType sze) override
void Average(int numPts, const vtkIdType *ids, vtkIdType outId) override
void AssignNullValue(unsigned short outId) override
void InterpolateEdge(vtkIdType v0, vtkIdType v1, double t, vtkIdType outId) override
void Realloc(vtkIdType sze) override
void Interpolate(int numWeights, const unsigned short *ids, const double *weights, unsigned short outId)
Loop over the arrays and have them interpolate themselves.
void Average(int numPts, const unsigned short *ids, unsigned short outId) override
void AssignNullValue(IdTypeT outId)
void Copy(IdTypeT inId, IdTypeT outId)
void Average(int numPts, const unsigned short *ids, unsigned short outId) override
BaseArrayPair(vtkIdType num, int numComp, vtkAbstractArray *outArray)
void Copy(unsigned short inId, unsigned short outId) override
void Copy(vtkIdType inId, vtkIdType outId) override
void CreateArrayPair(ArrayList *list, T *inData, T *outData, vtkIdType numTuples, int numComp, T nullValue)
virtual void SetNumberOfTuples(vtkIdType numTuples)=0
Set the number of tuples (a component group) in the array.
ArrayPair(T *in, T *out, vtkIdType num, int numComp, vtkAbstractArray *outArray, T null)
virtual void AssignNullValue(vtkIdType outId)=0
void Interpolate(int numWeights, const IdTypeT *ids, const double *weights, IdTypeT outId)
void Interpolate(int numWeights, const unsigned short *ids, const double *weights, unsigned short outId) override
void Average(int numPts, const vtkIdType *ids, vtkIdType outId) override
void Copy(TIdType inId, TIdType outId)
void Interpolate(int numWeights, const IdTypeT *ids, const double *weights, IdTypeT outId)
void WeightedAverage(int numPts, const vtkIdType *ids, const double *weights, vtkIdType outId)
Loop over the arrays and weighted average the attributes.
void InterpolateOutput(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId) override
void WeightedAverage(int numPts, const unsigned short *ids, const double *weights, unsigned short outId) override
void Average(int numPts, const IdTypeT *ids, IdTypeT outId)
void AddSelfInterpolatingArrays(vtkIdType numOutPts, vtkDataSetAttributes *attr, double nullValue=0.0)
virtual ~BaseArrayPair()=default
void InterpolateOutput(int numWeights, const IdTypeT *ids, const double *weights, IdTypeT outId)
void WeightedAverage(int numPts, const unsigned short *ids, const double *weights, unsigned short outId) override