VTKm
1.5

Represent a continuous scalar range of values. More...
#include <Range.h>
Public Member Functions  
VTKM_EXEC_CONT  Range () 
Range (const Range &)=default  
Range (Range &&)=default  
template<typename T1 , typename T2 >  
VTKM_EXEC_CONT  Range (const T1 &min, const T2 &max) 
vtkm::Range &  operator= (const vtkm::Range &src)=default 
vtkm::Range &  operator= (vtkm::Range &&src)=default 
VTKM_EXEC_CONT bool  IsNonEmpty () const 
Determine if the range is valid (i.e. More...  
template<typename T >  
VTKM_EXEC_CONT bool  Contains (const T &value) const 
Determines if a value is within the range. More...  
VTKM_EXEC_CONT vtkm::Float64  Length () const 
Returns the length of the range. More...  
VTKM_EXEC_CONT vtkm::Float64  Center () const 
Returns the center of the range. More...  
template<typename T >  
VTKM_EXEC_CONT void  Include (const T &value) 
Expand range to include a value. More...  
VTKM_EXEC_CONT void  Include (const vtkm::Range &range) 
Expand range to include other range. More...  
VTKM_EXEC_CONT vtkm::Range  Union (const vtkm::Range &otherRange) const 
Return the union of this and another range. More...  
VTKM_EXEC_CONT vtkm::Range  operator+ (const vtkm::Range &otherRange) const 
Operator for union More...  
VTKM_EXEC_CONT bool  operator== (const vtkm::Range &otherRange) const 
VTKM_EXEC_CONT bool  operator!= (const vtkm::Range &otherRange) const 
Public Attributes  
vtkm::Float64  Min 
vtkm::Float64  Max 
Represent a continuous scalar range of values.
vtkm::Range
is a helper class for representing a range of floating point values from a minimum value to a maximum value. This is specified simply enough with a Min
and Max
value.
Range
also contains several helper functions for computing and maintaining the range.

inline 

default 

default 

inline 

inline 
Returns the center of the range.
Center
computes the middle value of the range. If the range is empty, NaN is returned.

inline 
Determines if a value is within the range.
Contains
returns true if the give value is within the range, false otherwise. Contains
treats the min and max as inclusive. That is, if the value is exactly the min or max, true is returned.

inline 
Expand range to include a value.
This version of Include
expands the range just enough to include the given value. If the range already includes this value, then nothing is done.

inline 
Expand range to include other range.
This version of Include
expands this range just enough to include that of another range. Essentially it is the union of the two ranges.

inline 
Determine if the range is valid (i.e.
has at least one valid point).
IsNonEmpty
return true if the range contains some valid values between Min
and Max
. If Max
is less than Min
, then no values satisfy the range and IsNonEmpty
returns false. Otherwise, return true.
IsNonEmpty
assumes Min
and Max
are inclusive. That is, if they are equal then true is returned.

inline 
Returns the length of the range.
Length
computes the distance between the min and max. If the range is empty, 0 is returned.

inline 

inline 
Operator for union

default 

default 

inline 

inline 
Return the union of this and another range.
This is a nondestructive form of Include
.
vtkm::Float64 vtkm::Range::Max 
vtkm::Float64 vtkm::Range::Min 