Go to the documentation of this file.
18 #ifndef viskores_RangeId2_h
19 #define viskores_RangeId2_h
94 return (this->X.
Contains(val[0]) && this->Y.Contains(val[1]));
113 template <
typename T>
141 return unionRangeId2;
152 return ((this->X == range.
X) && (this->Y == range.
Y));
158 return ((this->X != range.
X) || (this->Y != range.
Y));
195 return stream <<
"{ X:" << range.
X <<
", Y:" << range.
Y <<
" }";
198 #endif //viskores_RangeId2_h
RangeId2(const viskores::RangeId &xrange, const viskores::RangeId &yrange)
Construct a range with the given x and y directions.
Definition: RangeId2.h:49
viskores::Vec< viskores::Id, 2 > Id2
Id2 corresponds to a 2-dimensional index.
Definition: Types.h:935
bool operator==(const viskores::RangeId2 &range) const
Definition: RangeId2.h:150
bool IsNonEmpty() const
Determine if the range is valid.
Definition: RangeId.h:67
void Include(const viskores::Vec< T, 2 > &point)
Expand range to include a value.
Definition: RangeId2.h:114
bool Contains(viskores::Id value) const
Determines if a value is within the range.
Definition: RangeId.h:75
bool IsNonEmpty() const
Determine if the range is non-empty.
Definition: RangeId2.h:87
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
RangeId2(viskores::Id minX, viskores::Id maxX, viskores::Id minY, viskores::Id maxY)
Construct a range with the given minimum (inclusive) and maximum (exclusive) points.
Definition: RangeId2.h:57
RangeId2(const viskores::Id2 &min, const viskores::Id2 &max)
Initialize range with the minimum and the maximum corners.
Definition: RangeId2.h:76
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
viskores::Id2 Dimensions() const
Definition: RangeId2.h:105
RangeId2()=default
Construct an empty 2D range.
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
#define VISKORES_CONT
Definition: ExportMacros.h:65
std::ostream & operator<<(std::ostream &stream, const viskores::Bounds &bounds)
Helper function for printing bounds during testing.
Definition: Bounds.h:268
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::RangeId Y
The range of values in the Y direction.
Definition: RangeId2.h:42
viskores::RangeId & operator[](IdComponent c) noexcept
Definition: RangeId2.h:162
void Include(viskores::Id value)
Expand range to include a value.
Definition: RangeId.h:99
viskores::Id Center() const
Returns the center of the range.
Definition: RangeId.h:90
Represent 2D integer range.
Definition: RangeId2.h:35
RangeId2(const viskores::Id range[4])
Initialize range with an array of 4 values in the order xmin, xmax, ymin, ymax.
Definition: RangeId2.h:67
bool operator!=(const viskores::RangeId2 &range) const
Definition: RangeId2.h:156
viskores::RangeId X
The range of values in the X direction.
Definition: RangeId2.h:39
Represent a range of viskores::Id values.
Definition: RangeId.h:36
const viskores::RangeId & operator[](IdComponent c) const noexcept
Definition: RangeId2.h:175
viskores::Id Length() const
Returns the length of the range.
Definition: RangeId.h:83
viskores::RangeId2 Union(const viskores::RangeId2 &other) const
Return the union of this and another range.
Definition: RangeId2.h:137
viskores::RangeId2 operator+(const viskores::RangeId2 &other) const
Operator for union
Definition: RangeId2.h:147
bool Contains(const viskores::Id2 &val) const
Determines if an Id2 value is within the range.
Definition: RangeId2.h:92
void Include(const viskores::RangeId2 &range)
Expand range to include other range.
Definition: RangeId2.h:126
viskores::Id2 Center() const
Returns the center of the range.
Definition: RangeId2.h:102