|
VTK-m
2.3
|
Represent a continuous scalar range of values. More...
#include <Range.h>
Public Member Functions | |
| Range () | |
| Construct a range with a given minimum and maximum. More... | |
| Range (const Range &)=default | |
| Range (Range &&)=default | |
| template<typename T1 , typename T2 > | |
| Range (const T1 &min, const T2 &max) | |
| vtkm::Range & | operator= (const vtkm::Range &src)=default |
| vtkm::Range & | operator= (vtkm::Range &&src)=default |
| bool | IsNonEmpty () const |
| Determine if the range is valid (i.e. More... | |
| template<typename T > | |
| bool | Contains (const T &value) const |
| Determines if a value is within the range. More... | |
| vtkm::Float64 | Length () const |
| Returns the length of the range. More... | |
| vtkm::Float64 | Center () const |
| Returns the center of the range. More... | |
| template<typename T > | |
| void | Include (const T &value) |
| Expand range to include a value. More... | |
| void | Include (const vtkm::Range &range) |
| Expand range to include other range. More... | |
| vtkm::Range | Union (const vtkm::Range &otherRange) const |
| Return the union of this and another range. More... | |
| vtkm::Range | Intersection (const vtkm::Range &otherRange) const |
| Return the intersection of this and another range. More... | |
| vtkm::Range | operator+ (const vtkm::Range &otherRange) const |
| Operator for union More... | |
| bool | operator== (const vtkm::Range &otherRange) const |
| bool | operator!= (const vtkm::Range &otherRange) const |
Public Attributes | |
| vtkm::Float64 | Min |
| The minumum value of the range (inclusive). More... | |
| vtkm::Float64 | Max |
| Tha maximum value of the range (inclusive). More... | |
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 |
Construct a range with a given minimum and maximum.
If no minimum or maximum is given, the range will be empty.
|
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 |
Return the intersection of this and another range.
|
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 |
Tha maximum value of the range (inclusive).
| vtkm::Float64 vtkm::Range::Min |
The minumum value of the range (inclusive).
1.8.17