Go to the documentation of this file.
10 #ifndef vtk_m_RangeId_h
11 #define vtk_m_RangeId_h
62 bool Contains(
vtkm::Id value)
const {
return ((this->Min <= value) && (this->Max > value)); }
88 this->Min = vtkm::Min(this->Min, value);
89 this->Max = vtkm::Max(this->Max, value + 1);
100 this->Min = vtkm::Min(this->Min, range.
Min);
101 this->Max = vtkm::Max(this->Max, range.
Max);
124 return ((this->Min == other.
Min) && (this->Max == other.
Max));
130 return ((this->Min != other.
Min) || (this->Max != other.
Max));
138 return stream <<
"[" << range.
Min <<
".." << range.
Max <<
")";
142 #endif // vtk_m_RangeId_h
Groups connected points that have the same field value.
Definition: Atomic.h:19
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
VTKM_EXEC_CONT RangeId(vtkm::Id min, vtkm::Id max)
Definition: RangeId.h:41
Represent a range of vtkm::Id values.
Definition: RangeId.h:28
vtkm::Id Max
Definition: RangeId.h:31
VTKM_EXEC_CONT vtkm::RangeId operator+(const vtkm::RangeId &other) const
Operator for union
Definition: RangeId.h:119
VTKM_EXEC_CONT bool IsNonEmpty() const
Determine if the range is valid.
Definition: RangeId.h:54
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
VTKM_EXEC_CONT vtkm::Id Center() const
Returns the center of the range.
Definition: RangeId.h:77
VTKM_EXEC_CONT void Include(const vtkm::RangeId &range)
Expand range to include other range.
Definition: RangeId.h:98
vtkm::Id Min
Definition: RangeId.h:30
VTKM_EXEC_CONT vtkm::RangeId Union(const vtkm::RangeId &other) const
Return the union of this and another range.
Definition: RangeId.h:109
VTKM_CONT std::ostream & operator<<(std::ostream &stream, const vtkm::Bounds &bounds)
Helper function for printing bounds during testing.
Definition: Bounds.h:237
#define VTKM_CONT
Definition: ExportMacros.h:57
VTKM_EXEC_CONT bool Contains(vtkm::Id value) const
Determines if a value is within the range.
Definition: RangeId.h:62
VTKM_EXEC_CONT vtkm::Id Length() const
Returns the length of the range.
Definition: RangeId.h:70
VTKM_EXEC_CONT bool operator==(const vtkm::RangeId &other) const
Definition: RangeId.h:122
VTKM_EXEC_CONT void Include(vtkm::Id value)
Expand range to include a value.
Definition: RangeId.h:86
VTKM_EXEC_CONT RangeId()
Definition: RangeId.h:34
VTKM_EXEC_CONT bool operator!=(const vtkm::RangeId &other) const
Definition: RangeId.h:128