Go to the documentation of this file.
18 #ifndef viskores_RangeId_h
19 #define viskores_RangeId_h
101 this->Min = viskores::Min(this->Min, value);
102 this->Max = viskores::Max(this->Max, value + 1);
113 this->Min = viskores::Min(this->Min, range.
Min);
114 this->Max = viskores::Max(this->Max, range.
Max);
137 return ((this->Min == other.
Min) && (this->Max == other.
Max));
143 return ((this->Min != other.
Min) || (this->Max != other.
Max));
152 return stream <<
"[" << range.
Min <<
".." << range.
Max <<
")";
156 #endif // viskores_RangeId_h
bool IsNonEmpty() const
Determine if the range is valid.
Definition: RangeId.h:67
RangeId(viskores::Id min, viskores::Id max)
Construct a range with the given minimum (inclusive) and maximum (exclusive) indices.
Definition: RangeId.h:54
bool Contains(viskores::Id value) const
Determines if a value is within the range.
Definition: RangeId.h:75
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
RangeId()
Construct a range with no indices.
Definition: RangeId.h:45
bool operator==(const viskores::RangeId &other) const
Definition: RangeId.h:135
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
void Include(viskores::Id value)
Expand range to include a value.
Definition: RangeId.h:99
void Include(const viskores::RangeId &range)
Expand range to include other range.
Definition: RangeId.h:111
viskores::Id Center() const
Returns the center of the range.
Definition: RangeId.h:90
bool operator!=(const viskores::RangeId &other) const
Definition: RangeId.h:141
Represent a range of viskores::Id values.
Definition: RangeId.h:36
viskores::RangeId Union(const viskores::RangeId &other) const
Return the union of this and another range.
Definition: RangeId.h:122
viskores::Id Max
The maximum index of the range (exclusive).
Definition: RangeId.h:41
viskores::Id Length() const
Returns the length of the range.
Definition: RangeId.h:83
viskores::RangeId operator+(const viskores::RangeId &other) const
Operator for union
Definition: RangeId.h:132
viskores::Id Min
The minimum index of the range (inclusive).
Definition: RangeId.h:39