VTK  9.1.0
Public Types | Public Member Functions | Friends | List of all members
vtkArraySort Class Reference

Controls sorting of sparse array coordinates. More...

#include <vtkArraySort.h>

Public Types

typedef vtkArrayCoordinates::DimensionT DimensionT
 

Public Member Functions

 vtkArraySort ()
 Create an empty set of dimensions. More...
 
 vtkArraySort (DimensionT i)
 Sorts an array along one dimension. More...
 
 vtkArraySort (DimensionT i, DimensionT j)
 Sorts an array along two dimensions. More...
 
 vtkArraySort (DimensionT i, DimensionT j, DimensionT k)
 Sorts an array along three dimensions. More...
 
DimensionT GetDimensions () const
 Return the number of dimensions for sorting. More...
 
void SetDimensions (DimensionT dimensions)
 Set the number of dimensions to be sorted. More...
 
DimensionToperator[] (DimensionT i)
 Returns the i-th dimension to be sorted. More...
 
const DimensionToperator[] (DimensionT i) const
 Returns the i-th dimension to be sorted. More...
 
bool operator== (const vtkArraySort &rhs) const
 Equality comparison. More...
 
bool operator!= (const vtkArraySort &rhs) const
 Inequality comparison. More...
 

Friends

VTKCOMMONCORE_EXPORT friend ostream & operator<< (ostream &stream, const vtkArraySort &rhs)
 Serialization. More...
 

Detailed Description

Controls sorting of sparse array coordinates.

vtkArraySort stores an ordered set of dimensions along which the values stored in a sparse array should be sorted.

Convenience constructors are provided for specifying one, two, and three dimensions. To sort along more than three dimensions, use the default constructor, SetDimensions(), and operator[] to assign each dimension to be sorted.

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

Definition at line 51 of file vtkArraySort.h.

Member Typedef Documentation

◆ DimensionT

Definition at line 54 of file vtkArraySort.h.

Constructor & Destructor Documentation

◆ vtkArraySort() [1/4]

vtkArraySort::vtkArraySort ( )

Create an empty set of dimensions.

Use SetDimensions() and operator[] to populate them.

◆ vtkArraySort() [2/4]

vtkArraySort::vtkArraySort ( DimensionT  i)
explicit

Sorts an array along one dimension.

◆ vtkArraySort() [3/4]

vtkArraySort::vtkArraySort ( DimensionT  i,
DimensionT  j 
)

Sorts an array along two dimensions.

◆ vtkArraySort() [4/4]

vtkArraySort::vtkArraySort ( DimensionT  i,
DimensionT  j,
DimensionT  k 
)

Sorts an array along three dimensions.

Member Function Documentation

◆ GetDimensions()

DimensionT vtkArraySort::GetDimensions ( ) const

Return the number of dimensions for sorting.

◆ SetDimensions()

void vtkArraySort::SetDimensions ( DimensionT  dimensions)

Set the number of dimensions to be sorted.

Note that this method resets every dimension to zero, so you must set every dimension explicitly using operator[] after calling SetDimensions().

◆ operator[]() [1/2]

DimensionT & vtkArraySort::operator[] ( DimensionT  i)

Returns the i-th dimension to be sorted.

◆ operator[]() [2/2]

const DimensionT & vtkArraySort::operator[] ( DimensionT  i) const

Returns the i-th dimension to be sorted.

◆ operator==()

bool vtkArraySort::operator== ( const vtkArraySort rhs) const

Equality comparison.

◆ operator!=()

bool vtkArraySort::operator!= ( const vtkArraySort rhs) const

Inequality comparison.

Friends And Related Function Documentation

◆ operator<<

VTKCOMMONCORE_EXPORT friend ostream & operator<< ( ostream &  stream,
const vtkArraySort rhs 
)
friend

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