mlpack::math::Range Class Reference
Simple real-valued range.
More...
List of all members.
Detailed Description
Simple real-valued range.
It contains an upper and lower bound.
Definition at line 31 of file range.hpp.
Constructor & Destructor Documentation
mlpack::math::Range::Range |
( |
|
) |
[inline] |
The upper bound.
Initialize to an empty set (where lo > hi).
mlpack::math::Range::Range |
( |
const double |
point |
) |
[inline] |
mlpack::math::Range::Range |
( |
const double |
lo, |
|
|
const double |
hi | |
|
) |
| | [inline] |
Initializes to specified range.
- Parameters:
-
Member Function Documentation
bool mlpack::math::Range::Contains |
( |
const Range & |
r |
) |
const [inline] |
Determines if another range overlaps with this one.
- Parameters:
-
- Returns:
- true if ranges overlap at all.
bool mlpack::math::Range::Contains |
( |
const double |
d |
) |
const [inline] |
Determines if a point is contained within the range.
- Parameters:
-
double& mlpack::math::Range::Hi |
( |
|
) |
[inline] |
double mlpack::math::Range::Hi |
( |
|
) |
const [inline] |
double& mlpack::math::Range::Lo |
( |
|
) |
[inline] |
double mlpack::math::Range::Lo |
( |
|
) |
const [inline] |
double mlpack::math::Range::Mid |
( |
|
) |
const [inline] |
Gets the midpoint of this range.
bool mlpack::math::Range::operator!= |
( |
const Range & |
rhs |
) |
const [inline] |
Compare with another range for strict equality.
- Parameters:
-
Range mlpack::math::Range::operator& |
( |
const Range & |
rhs |
) |
const [inline] |
Shrinks this range to be the overlap with another range; this makes an empty set if there is no overlap.
- Parameters:
-
Range& mlpack::math::Range::operator&= |
( |
const Range & |
rhs |
) |
[inline] |
Shrinks this range to be the overlap with another range; this makes an empty set if there is no overlap.
- Parameters:
-
Range mlpack::math::Range::operator* |
( |
const double |
d |
) |
const [inline] |
Scale the bounds by the given double.
- Parameters:
-
Range& mlpack::math::Range::operator*= |
( |
const double |
d |
) |
[inline] |
Scale the bounds by the given double.
- Parameters:
-
bool mlpack::math::Range::operator< |
( |
const Range & |
rhs |
) |
const [inline] |
Compare with another range.
For Range objects x and y, x < y means that x is strictly less than y and does not overlap at all.
- Parameters:
-
bool mlpack::math::Range::operator== |
( |
const Range & |
rhs |
) |
const [inline] |
Compare with another range for strict equality.
- Parameters:
-
bool mlpack::math::Range::operator> |
( |
const Range & |
rhs |
) |
const [inline] |
Compare with another range.
For Range objects x and y, x < y means that x is strictly less than y and does not overlap at all.
- Parameters:
-
Range mlpack::math::Range::operator| |
( |
const Range & |
rhs |
) |
const [inline] |
Expands this range to include another range.
- Parameters:
-
Range& mlpack::math::Range::operator|= |
( |
const Range & |
rhs |
) |
[inline] |
Expands this range to include another range.
- Parameters:
-
std::string mlpack::math::Range::ToString |
( |
|
) |
const [inline] |
Returns a string representation of an object.
double mlpack::math::Range::Width |
( |
|
) |
const [inline] |
Gets the span of the range (hi - lo).
Friends And Related Function Documentation
Range operator* |
( |
const double |
d, |
|
|
const Range & |
r | |
|
) |
| | [friend] |
Scale the bounds by the given double.
- Parameters:
-
Member Data Documentation
The documentation for this class was generated from the following file: