Go to the documentation of this file.
10 #ifndef vtk_m_RangeId_h
11 #define vtk_m_RangeId_h
67 bool Contains(
vtkm::Id value)
const {
return ((this->Min <= value) && (this->Max > value)); }
93 this->Min = vtkm::Min(this->Min, value);
94 this->Max = vtkm::Max(this->Max, value + 1);
105 this->Min = vtkm::Min(this->Min, range.
Min);
106 this->Max = vtkm::Max(this->Max, range.
Max);
129 return ((this->Min == other.
Min) && (this->Max == other.
Max));
135 return ((this->Min != other.
Min) || (this->Max != other.
Max));
143 return stream <<
"[" << range.
Min <<
".." << range.
Max <<
")";
147 #endif // vtk_m_RangeId_h
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
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
bool operator!=(const vtkm::RangeId &other) const
Definition: RangeId.h:133
bool operator==(const vtkm::RangeId &other) const
Definition: RangeId.h:127
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
Represent a range of vtkm::Id values.
Definition: RangeId.h:28
void Include(vtkm::Id value)
Expand range to include a value.
Definition: RangeId.h:91
vtkm::Id Max
The maximum index of the range (exclusive).
Definition: RangeId.h:33
bool Contains(vtkm::Id value) const
Determines if a value is within the range.
Definition: RangeId.h:67
RangeId(vtkm::Id min, vtkm::Id max)
Construct a range with the given minimum (inclusive) and maximum (exclusive) indices.
Definition: RangeId.h:46
vtkm::Id Min
The minimum index of the range (inclusive).
Definition: RangeId.h:31
void Include(const vtkm::RangeId &range)
Expand range to include other range.
Definition: RangeId.h:103
RangeId()
Construct a range with no indices.
Definition: RangeId.h:37
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::Id Length() const
Returns the length of the range.
Definition: RangeId.h:75
vtkm::RangeId Union(const vtkm::RangeId &other) const
Return the union of this and another range.
Definition: RangeId.h:114
vtkm::RangeId operator+(const vtkm::RangeId &other) const
Operator for union
Definition: RangeId.h:124