#include <interval.h>
List of all members.
Detailed Description
template<typename value_type_>
class OpenTissue::math::interval::Interval< value_type_ >
Interval class.
A *simple naive* speed test, no -DNDEBUG used.
Intervals of type [x,y] where x<0 and y>0 used in testing.
this interval, 10^6 muls: 2.85913 seconds boost interval, 10^6 muls: 5.13671 seconds
this interval, 10^6 adds: 1.94612 seconds boost interval, 10^6 adds: 3.86221 seconds
this interval, 10^6 subs: 2.00829 seconds boost interval, 10^6 subs: 3.8229 seconds
Intervals of type [x,y] where 0<x<y used in divs.
this interval, 10^6 divs: 3.41608 seconds boost interval, 10^6 divs: 4.78257 seconds
This class contains >no< error-checking. You might want to use boost::numeric::interval until you know your interval-code is working.
- Author:
- Jackj.
Member Typedef Documentation
template<typename value_type_>
template<typename value_type_>
template<typename value_type_>
template<typename value_type_>
template<typename value_type_>
Constructor & Destructor Documentation
template<typename value_type_>
template<typename value_type_>
template<typename value_type_>
template<typename value_type_>
template<typename value_type_>
Member Function Documentation
template<typename value_type_>
template<typename value_type_>
Clear Method. This method sets the interval bounds to their default values. I.e. both lower and upper bound is set to zero.
template<typename value_type_>
template<typename value_type_>
Get Absolute Lower Interval Bound.
- Returns:
- The value of the absolute lower interval bound.
template<typename value_type_>
Get Absolute Upper Interval Bound.
- Returns:
- The value of the absolute upper interval bound.
template<typename value_type_>
Empty Test. This method tests whether the bounds indicate an empty interval.
By convention this means the lower bound is larger than the upper bound.
template<typename value_type_>
Validity. This method tests whether the bounds indicate a valid interval range. This is useful for making integrity tests.
template<typename value_type_>
template<typename value_type_>
template<typename value_type_>
template<typename value_type_>
Interval Bound Operator Accessor
- Parameters:
-
| The | index of the interval bound one want to access. Use zero to get lower bound and one to get upper bound. |
- Returns:
- The interval bound corresponding to the specified index.
template<typename value_type_>
Interval Bound Operator Accessor
- Parameters:
-
| The | index of the interval bound one want to access. Use zero to get lower bound and one to get upper bound. |
- Returns:
- The interval bound corresponding to the specified index.
template<typename value_type_>
Scalar Multiplication. Performance Warning: Copy Constructor is invoked to create return value.
- Parameters:
-
| val | The scalar value to multiply this interval instance with. |
- Returns:
- A reference to this interval reference.
template<typename value_type_>
template<typename value_type_>
Scalar Multiplication.
- Parameters:
-
| val | The scalar value to multiply this interval instance with. |
- Returns:
- A reference to this interval reference.
template<typename value_type_>
Interval Multiplication.
- Parameters:
-
| i | The interval to multiply with. |
- Returns:
- A reference to this interval instance.
template<typename value_type_>
Interval Addition. Performance Warning: Copy Constructor is invoked to create return value.
- Parameters:
-
| The | interval that should be added to this interval. |
- Returns:
- A refrence to the resulting interval (this interval instance).
template<typename value_type_>
Interval Addition.
- Parameters:
-
| The | interval that should be added to this interval. |
- Returns:
- A refrence to the resulting interval (this interval instance).
template<typename value_type_>
Negation Operator. Performance Warning: Copy Constructor is invoked to create return value.
- Returns:
- An interval that holds the negated bounds of this interval reference.
template<typename value_type_>
Interval Subtraction. Performance Warning: Copy Constructor is invoked to create return value.
- Parameters:
-
| The | interval that should be subtracted to this interval. |
- Returns:
- A refrence to the resulting interval (this interval instance).
template<typename value_type_>
Interval Subtraction.
- Parameters:
-
| The | interval that should be subtracted to this interval. |
- Returns:
- A refrence to the resulting interval (this interval instance).
template<typename value_type_>
Interval Division. Performance Warning: Copy Constructor is invoked to create return value.
- Parameters:
-
| i | The interval to divided by. |
- Returns:
- A new interval instance holding the result of the division.
template<typename value_type_>
Interval Division.
- Parameters:
-
| i | The interval to divided by. |
- Returns:
- A reference to this interval instance holding the result of the division.
template<typename value_type_>
Interval Comparison Operators. The following operators are implemented as they are in interval aritchmetic, see for example (18) in "Continuous Collision Detection for Rigid and Articulated Bodies" by Stephane Redon
or
(2)-(6) in "Interval Computations: Introduction, Uses, and Resources" by R.B. Kearfott
- Parameters:
-
| i | A reference to an interval for comparison. |
- Returns:
- The result of the comparison.
template<typename value_type_>
template<typename value_type_>
Assignment Operator.
ToDo jackj: should this be explicit type conversrion?
- Parameters:
-
| rhs | The interval whos bounds are assigned to this interval. |
- Returns:
- A reference to this interval instance.
template<typename value_type_>
template<typename value_type_>
template<typename value_type_>
template<typename value_type_>
Interval Bound Operator Accessor
- Parameters:
-
| The | index of the interval bound one want to access. Use zero to get lower bound and one to get upper bound. |
- Returns:
- The interval bound corresponding to the specified index.
template<typename value_type_>
Interval Bound Operator Accessor
- Parameters:
-
| The | index of the interval bound one want to access. Use zero to get lower bound and one to get upper bound. |
- Returns:
- The interval bound corresponding to the specified index.
template<typename value_type_>
template<typename value_type_>
Member Data Documentation
template<typename value_type_>
The lower value of the interval. Default value is zero.
template<typename value_type_>
The upper value of the interval. Default value is zero.
The documentation for this class was generated from the following file:
- /home/hauberg/Dokumenter/Capture/humim-tracker-0.1/src/OpenTissue/OpenTissue/core/math/interval/interval.h