VTK  9.1.0
Public Member Functions | Protected Attributes | List of all members
vtkArrayWeights Class Reference

Stores a collection of weighting factors. More...

#include <vtkArrayWeights.h>

Public Member Functions

 vtkArrayWeights ()
 Create an empty collection of weights.
 
 vtkArrayWeights (const vtkArrayWeights &other)
 Copy the weights from another object.
 
 vtkArrayWeights (double i)
 Create a collection containing one weight.
 
 vtkArrayWeights (double i, double j)
 Create a collection containing two weights.
 
 vtkArrayWeights (double i, double j, double k)
 Create a collection containing three weights.
 
 vtkArrayWeights (double i, double j, double k, double l)
 Create a collection containing four weights.
 
 ~vtkArrayWeights ()
 Destructor.
 
vtkIdType GetCount () const
 Returns the number of weights stored in this container.
 
void SetCount (vtkIdType count)
 Sets the number of weights stored in this container.
 
double & operator[] (vtkIdType)
 Accesses the i-th weight in the collection.
 
const double & operator[] (vtkIdType) const
 Accesses the i-th weight in the collection.
 
vtkArrayWeightsoperator= (const vtkArrayWeights &other)
 Assignment operator.
 

Protected Attributes

vtkArrayWeightsStorage * Storage
 

Detailed Description

Stores a collection of weighting factors.

vtkArrayWeights provides storage for a collection of weights to be used when merging / interpolating N-way arrays. Convenience constructors are provided for working with one, two, three, and four weighting factors. For arbitrary collections of weights, use SetCount() and operator[] to assign values.

vtkArrayWeights is most commonly used with the vtkInterpolate() function to compute weighted sums of vtkArray objects.

See also
vtkArray, vtkArraySlices
Thanks:
Developed by Timothy M. Shead (tshea.nosp@m.d@sa.nosp@m.ndia..nosp@m.gov) at Sandia National Laboratories.

Definition at line 52 of file vtkArrayWeights.h.

Constructor & Destructor Documentation

◆ vtkArrayWeights() [1/6]

vtkArrayWeights::vtkArrayWeights ( )

Create an empty collection of weights.

◆ vtkArrayWeights() [2/6]

vtkArrayWeights::vtkArrayWeights ( const vtkArrayWeights other)

Copy the weights from another object.

◆ vtkArrayWeights() [3/6]

vtkArrayWeights::vtkArrayWeights ( double  i)

Create a collection containing one weight.

◆ vtkArrayWeights() [4/6]

vtkArrayWeights::vtkArrayWeights ( double  i,
double  j 
)

Create a collection containing two weights.

◆ vtkArrayWeights() [5/6]

vtkArrayWeights::vtkArrayWeights ( double  i,
double  j,
double  k 
)

Create a collection containing three weights.

◆ vtkArrayWeights() [6/6]

vtkArrayWeights::vtkArrayWeights ( double  i,
double  j,
double  k,
double  l 
)

Create a collection containing four weights.

◆ ~vtkArrayWeights()

vtkArrayWeights::~vtkArrayWeights ( )

Destructor.

Member Function Documentation

◆ GetCount()

vtkIdType vtkArrayWeights::GetCount ( ) const

Returns the number of weights stored in this container.

◆ SetCount()

void vtkArrayWeights::SetCount ( vtkIdType  count)

Sets the number of weights stored in this container.

Note that each weight will be reset to 0.0 after calling SetCount(), use operator[] to assign the desired value for each weight.

◆ operator[]() [1/2]

double & vtkArrayWeights::operator[] ( vtkIdType  )

Accesses the i-th weight in the collection.

◆ operator[]() [2/2]

const double & vtkArrayWeights::operator[] ( vtkIdType  ) const

Accesses the i-th weight in the collection.

◆ operator=()

vtkArrayWeights & vtkArrayWeights::operator= ( const vtkArrayWeights other)

Assignment operator.

Member Data Documentation

◆ Storage

vtkArrayWeightsStorage* vtkArrayWeights::Storage
protected

Definition at line 118 of file vtkArrayWeights.h.


The documentation for this class was generated from the following file: