VTK  9.3.20240425
vtkArraySort.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4
29#ifndef vtkArraySort_h
30#define vtkArraySort_h
31
32#include "vtkArrayCoordinates.h"
33#include "vtkCommonCoreModule.h" // For export macro
34#include "vtkSystemIncludes.h"
35#include <vector>
36
37VTK_ABI_NAMESPACE_BEGIN
38class VTKCOMMONCORE_EXPORT vtkArraySort
39{
40public:
42
48
53
58
63
68
74 void SetDimensions(DimensionT dimensions);
75
80
85
89 bool operator==(const vtkArraySort& rhs) const;
90
94 bool operator!=(const vtkArraySort& rhs) const;
95
99 VTKCOMMONCORE_EXPORT friend ostream& operator<<(ostream& stream, const vtkArraySort& rhs);
100
101private:
102 std::vector<DimensionT> Storage;
103};
104
105VTK_ABI_NAMESPACE_END
106#endif
107
108// VTK-HeaderTest-Exclude: vtkArraySort.h
Controls sorting of sparse array coordinates.
bool operator==(const vtkArraySort &rhs) const
Equality comparison.
DimensionT GetDimensions() const
Return the number of dimensions for sorting.
vtkArraySort(DimensionT i, DimensionT j)
Sorts an array along two dimensions.
vtkArraySort(DimensionT i, DimensionT j, DimensionT k)
Sorts an array along three dimensions.
vtkArraySort()
Create an empty set of dimensions.
void SetDimensions(DimensionT dimensions)
Set the number of dimensions to be sorted.
DimensionT & operator[](DimensionT i)
Returns the i-th dimension to be sorted.
bool operator!=(const vtkArraySort &rhs) const
Inequality comparison.
const DimensionT & operator[](DimensionT i) const
Returns the i-th dimension to be sorted.
vtkArrayCoordinates::DimensionT DimensionT
VTKCOMMONCORE_EXPORT friend ostream & operator<<(ostream &stream, const vtkArraySort &rhs)
Serialization.
vtkArraySort(DimensionT i)
Sorts an array along one dimension.