Go to the documentation of this file.
10 #ifndef vtk_m_RangeId2_h
11 #define vtk_m_RangeId2_h
86 return (this->X.
Contains(val[0]) && this->Y.Contains(val[1]));
105 template <
typename T>
133 return unionRangeId2;
144 return ((this->X == range.
X) && (this->Y == range.
Y));
150 return ((this->X != range.
X) || (this->Y != range.
Y));
186 return stream <<
"{ X:" << range.
X <<
", Y:" << range.
Y <<
" }";
189 #endif //vtk_m_RangeId2_h
bool IsNonEmpty() const
Determine if the range is non-empty.
Definition: RangeId2.h:79
bool IsNonEmpty() const
Determine if the range is valid.
Definition: RangeId.h:59
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::RangeId & operator[](IdComponent c) noexcept
Definition: RangeId2.h:154
bool operator!=(const vtkm::RangeId2 &range) const
Definition: RangeId2.h:148
vtkm::Id2 Dimensions() const
Definition: RangeId2.h:97
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
const vtkm::RangeId & operator[](IdComponent c) const noexcept
Definition: RangeId2.h:167
Represent 2D integer range.
Definition: RangeId2.h:27
vtkm::Id Center() const
Returns the center of the range.
Definition: RangeId.h:82
std::ostream & operator<<(std::ostream &stream, const vtkm::Bounds &bounds)
Helper function for printing bounds during testing.
Definition: Bounds.h:248
bool operator==(const vtkm::RangeId2 &range) const
Definition: RangeId2.h:142
Represent a range of vtkm::Id values.
Definition: RangeId.h:28
vtkm::RangeId2 operator+(const vtkm::RangeId2 &other) const
Operator for union
Definition: RangeId2.h:139
void Include(vtkm::Id value)
Expand range to include a value.
Definition: RangeId.h:91
bool Contains(vtkm::Id value) const
Determines if a value is within the range.
Definition: RangeId.h:67
vtkm::Id2 Center() const
Returns the center of the range.
Definition: RangeId2.h:94
RangeId2(const vtkm::Id range[4])
Initialize range with an array of 4 values in the order xmin, xmax, ymin, ymax.
Definition: RangeId2.h:59
RangeId2(const vtkm::Id2 &min, const vtkm::Id2 &max)
Initialize range with the minimum and the maximum corners.
Definition: RangeId2.h:68
RangeId2(const vtkm::RangeId &xrange, const vtkm::RangeId &yrange)
Construct a range with the given x and y directions.
Definition: RangeId2.h:41
void Include(const vtkm::Vec< T, 2 > &point)
Expand range to include a value.
Definition: RangeId2.h:106
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
RangeId2(vtkm::Id minX, vtkm::Id maxX, vtkm::Id minY, vtkm::Id maxY)
Construct a range with the given minimum (inclusive) and maximum (exclusive) points.
Definition: RangeId2.h:49
vtkm::Id Length() const
Returns the length of the range.
Definition: RangeId.h:75
RangeId2()=default
Construct an empty 2D range.
vtkm::RangeId X
The range of values in the X direction.
Definition: RangeId2.h:31
void Include(const vtkm::RangeId2 &range)
Expand range to include other range.
Definition: RangeId2.h:118
bool Contains(const vtkm::Id2 &val) const
Determines if an Id2 value is within the range.
Definition: RangeId2.h:84
vtkm::RangeId2 Union(const vtkm::RangeId2 &other) const
Return the union of this and another range.
Definition: RangeId2.h:129
vtkm::RangeId Y
The range of values in the Y direction.
Definition: RangeId2.h:34
vtkm::Vec< vtkm::Id, 2 > Id2
Id2 corresponds to a 2-dimensional index.
Definition: Types.h:926