carl
24.04
Computer ARithmetic Library
|
The class which contains the interval arithmetic including trigonometric functions. More...
#include <Interval.h>
Public Types | |
using | Policy = policies< Number, Interval< Number > > |
using | BoostIntervalPolicies = boost::numeric::interval_lib::policies< typename Policy::roundingP, typename Policy::checkingP > |
using | BoostInterval = boost::numeric::interval< Number, BoostIntervalPolicies > |
using | evalintervalmap = std::map< Variable, Interval< Number > > |
using | roundingP = carl::rounding< Number > |
using | checkingP = carl::checking< Number > |
Public Member Functions | |
Interval () | |
Default constructor which constructs the empty interval at point 0. More... | |
Interval (const Number &n) | |
Constructor which constructs the pointinterval at n. More... | |
Interval (const Number &lower, const Number &upper) | |
Constructor which constructs the weak-bounded interval between lower and upper. More... | |
Interval (const BoostInterval &content, BoundType lowerBoundType=BoundType::WEAK, BoundType upperBoundType=BoundType::WEAK) | |
Constructor which constructs the interval according to the passed boost interval with the passed bound types. More... | |
Interval (const Number &lower, BoundType lowerBoundType, const Number &upper, BoundType upperBoundType) | |
Constructor which constructs the interval according to the passed bounds with the passed bound types. More... | |
Interval (const Interval< Number > &o) | |
Copy constructor. More... | |
template<typename Other , DisableIf< std::is_same< Number, Other >> = dummy> | |
Interval (const Interval< Other > &o) | |
template<typename N = Number, DisableIf< std::is_same< N, double >> = dummy, DisableIf< is_rational_type< N >> = dummy> | |
Interval (const double &n) | |
Constructor which constructs a pointinterval from a passed double. More... | |
template<typename N = Number, DisableIf< std::is_same< N, double >> = dummy, DisableIf< is_rational_type< N >> = dummy> | |
Interval (double lower, double upper) | |
Constructor which constructs an interval from the passed double bounds. More... | |
template<typename N = Number, DisableIf< std::is_same< N, double >> = dummy, DisableIf< is_rational_type< N >> = dummy> | |
Interval (double lower, BoundType lowerBoundType, double upper, BoundType upperBoundType) | |
Constructor which constructs the interval according to the passed double bounds with the passed bound types. More... | |
template<typename N = Number, DisableIf< std::is_same< N, int >> = dummy> | |
Interval (const int &n) | |
Constructor which constructs a pointinterval from a passed int. More... | |
template<typename N = Number, DisableIf< std::is_same< N, int >> = dummy> | |
Interval (int lower, int upper) | |
Constructor which constructs an interval from the passed int bounds. More... | |
template<typename N = Number, DisableIf< std::is_same< N, int >> = dummy> | |
Interval (int lower, BoundType lowerBoundType, int upper, BoundType upperBoundType) | |
Constructor which constructs the interval according to the passed int bounds with the passed bound types. More... | |
template<typename N = Number, DisableIf< std::is_same< N, unsigned int >> = dummy> | |
Interval (const unsigned int &n) | |
Constructor which constructs a pointinterval from a passed unsigned int. More... | |
template<typename N = Number, DisableIf< std::is_same< N, unsigned int >> = dummy> | |
Interval (unsigned int lower, unsigned int upper) | |
Constructor which constructs an interval from the passed unsigned int bounds. More... | |
template<typename N = Number, DisableIf< std::is_same< N, unsigned int >> = dummy> | |
Interval (unsigned int lower, BoundType lowerBoundType, unsigned int upper, BoundType upperBoundType) | |
Constructor which constructs the interval according to the passed unsigned int bounds with the passed bound types. More... | |
template<typename Num = Number, typename Rational , EnableIf< std::is_floating_point< Num >> = dummy, DisableIf< std::is_same< Num, Rational >> = dummy> | |
Interval (Rational n) | |
Constructor which constructs a pointinterval from a passed general rational number. More... | |
template<typename Num = Number, typename Rational , EnableIf< std::is_floating_point< Num >> = dummy, DisableIf< std::is_same< Num, Rational >> = dummy> | |
Interval (Rational lower, Rational upper) | |
Constructor which constructs an interval from the passed general rational bounds. More... | |
template<typename Num = Number, typename Rational , EnableIf< std::is_floating_point< Num >> = dummy, DisableIf< std::is_same< Num, Rational >> = dummy> | |
Interval (Rational lower, BoundType lowerBoundType, Rational upper, BoundType upperBoundType) | |
Constructor which constructs the interval according to the passed general rational bounds with the passed bound types. More... | |
template<typename Num = Number, typename Float , EnableIf< is_rational_type< Num >> = dummy, EnableIf< std::is_floating_point< Float >> = dummy, DisableIf< std::is_same< Num, Float >> = dummy> | |
Interval (Float n) | |
Constructor which constructs a pointinterval from a passed general float number (e.g. More... | |
template<typename Num = Number, typename Float , EnableIf< is_rational_type< Num >> = dummy, EnableIf< std::is_floating_point< Float >> = dummy, DisableIf< std::is_same< Num, Float >> = dummy> | |
Interval (Float lower, Float upper) | |
Constructor which constructs an interval from the passed general float bounds (e.g. More... | |
template<typename Num = Number, typename Float , EnableIf< is_rational_type< Num >> = dummy, EnableIf< std::is_floating_point< Float >> = dummy, DisableIf< std::is_same< Num, Float >> = dummy, DisableIf< std::is_floating_point< Num >> = dummy> | |
Interval (Float lower, BoundType lowerBoundType, Float upper, BoundType upperBoundType) | |
Constructor which constructs the interval according to the passed general float bounds (e.g. More... | |
template<typename Num = Number, typename Rational , EnableIf< is_rational_type< Num >> = dummy, EnableIf< is_rational_type< Rational >> = dummy, DisableIf< std::is_same< Num, Rational >> = dummy> | |
Interval (Rational n) | |
Constructor which constructs a pointinterval from a passed general float number (e.g. More... | |
template<typename Num = Number, typename Rational , EnableIf< is_rational_type< Num >> = dummy, EnableIf< is_rational_type< Rational >> = dummy, DisableIf< std::is_same< Num, Rational >> = dummy> | |
Interval (Rational lower, Rational upper) | |
Constructor which constructs an interval from the passed general float bounds (e.g. More... | |
template<typename Num = Number, typename Rational , EnableIf< is_rational_type< Num >> = dummy, EnableIf< is_rational_type< Rational >> = dummy, DisableIf< std::is_same< Num, Rational >> = dummy> | |
Interval (Rational lower, BoundType lowerBoundType, Rational upper, BoundType upperBoundType) | |
Constructor which constructs the interval according to the passed general float bounds (e.g. More... | |
Interval (const LowerBound< Number > &lb, const UpperBound< Number > &ub) | |
Interval (const LowerBound< Number > &lb, const LowerBound< Number > &ub) | |
Interval (const UpperBound< Number > &lb, const UpperBound< Number > &ub) | |
~Interval ()=default | |
Destructor. More... | |
const Number & | lower () const |
The getter for the lower boundary of the interval. More... | |
const Number & | upper () const |
The getter for the upper boundary of the interval. More... | |
auto | lower_bound () const |
auto | upper_bound () const |
const BoostInterval & | content () const |
Returns a reference to the included boost interval. More... | |
BoostInterval & | content () |
Returns a reference to the included boost interval. More... | |
BoundType | lower_bound_type () const |
The getter for the lower bound type of the interval. More... | |
BoundType | upper_bound_type () const |
The getter for the upper bound type of the interval. More... | |
void | set_lower (const Number &n) |
The setter for the lower boundary of the interval. More... | |
void | set_upper (const Number &n) |
The setter for the upper boundary of the interval. More... | |
void | set_lower_bound (const Number &n, BoundType b) |
The setter for the lower boundary of the interval. More... | |
void | set_upper_bound (const Number &n, BoundType b) |
The setter for the upper boundary of the interval. More... | |
void | set_lower_bound_type (BoundType b) |
The setter for the lower bound type of the interval. More... | |
void | set_upper_bound_type (BoundType b) |
The setter for the upper bound type of the interval. More... | |
Interval< Number > & | operator= (const Interval< Number > &rhs) |
The assignment operator. More... | |
void | set (const BoostInterval &content) |
Advanced setter to modify both boundaries at once. More... | |
void | set (const Number &lower, const Number &upper) |
Advanced setter to modify both boundaries at once by passing a boost interval. More... | |
bool | is_infinite () const |
Function which determines, if the interval is (-oo,oo). More... | |
bool | is_unbounded () const |
Function which determines, if the interval is unbounded. More... | |
bool | is_half_bounded () const |
Function which determines, if the interval is half-bounded. More... | |
bool | is_empty () const |
Function which determines, if the interval is empty. More... | |
bool | is_point_interval () const |
Function which determines, if the interval is a pointinterval. More... | |
bool | is_open_interval () const |
Function which determines, if the interval is open. More... | |
bool | is_closed_interval () const |
Function which determines, if the interval is closed. More... | |
bool | is_zero () const |
Function which determines, if the interval is the zero interval. More... | |
bool | is_one () const |
Function which determines, if the interval is the one interval. More... | |
bool | is_positive () const |
bool | is_negative () const |
bool | is_semi_positive () const |
bool | is_semi_negative () const |
Sign | sgn () const |
Determine whether the interval lays entirely left of 0 (NEGATIVE_SIGN), right of 0 (POSITIVE_SIGN) or contains 0 (ZERO_SIGN). More... | |
Interval< Number > | integral_part () const |
Computes the integral part of the given interval. More... | |
void | integralPart_assign () |
Computes and assigns the integral part of the given interval. More... | |
bool | contains_integer () const |
Checks if the interval contains at least one integer value. More... | |
Number | diameter () const |
Returns the diameter of the interval. More... | |
void | diameter_assign () |
Computes and assigns the diameter of the interval. More... | |
Number | diameter_ratio (const Interval< Number > &rhs) const |
Returns the ratio of the diameters of the given intervals. More... | |
void | diameter_ratio_assign (const Interval< Number > &rhs) |
Computes and assigns the ratio of the diameters of the given intervals. More... | |
Number | magnitude () const |
Returns the magnitude of the interval. More... | |
void | magnitude_assign () |
Computes and assigns the magnitude of the interval. More... | |
void | center_assign () |
Computes and assigns the center point of the interval. More... | |
bool | contains (const Number &val) const |
Checks if the interval contains the given value. More... | |
template<typename Num = Number, DisableIf< std::is_same< Num, int >> = dummy> | |
bool | contains (int val) const |
bool | contains (const Interval< Number > &rhs) const |
Checks if the interval contains the given interval. More... | |
bool | meets (const Number &n) const |
Checks if the interval meets the given value, that is if the given value is contained in the closed interval defined by the bounds. More... | |
void | bloat_by (const Number &width) |
Bloats the interval by the given value. More... | |
void | bloat_times (const Number &factor) |
Bloats the interval times the factor (multiplies the overall width). More... | |
void | shrink_by (const Number &width) |
Shrinks the interval by the given value. More... | |
void | shrink_times (const Number &factor) |
Shrinks the interval by a multiple of its width. More... | |
std::pair< Interval< Number >, Interval< Number > > | split () const |
Splits the interval into 2 equally sized parts (strict-weak-cut). More... | |
std::list< Interval< Number > > | split (unsigned n) const |
Splits the interval into n equally sized parts (strict-weak-cut). More... | |
std::string | toString () const |
Creates a string representation of the interval. More... | |
Interval< Number > | add (const Interval< Number > &rhs) const |
Adds two intervals according to natural interval arithmetic. More... | |
void | add_assign (const Interval< Number > &rhs) |
Interval< Number > | sub (const Interval< Number > &rhs) const |
Subtracts two intervals according to natural interval arithmetic. More... | |
void | sub_assign (const Interval< Number > &rhs) |
Interval< Number > | mul (const Interval< Number > &rhs) const |
Multiplies two intervals according to natural interval arithmetic. More... | |
void | mul_assign (const Interval< Number > &rhs) |
Interval< Number > | div (const Interval< Number > &rhs) const |
Divides two intervals according to natural interval arithmetic. More... | |
void | div_assign (const Interval< Number > &rhs) |
bool | div_ext (const Interval< Number > &rhs, Interval< Number > &a, Interval< Number > &b) const |
Implements extended interval division with intervals containting zero. More... | |
Interval< Number > | inverse () const |
Calculates the additive inverse of an interval with respect to natural interval arithmetic. More... | |
Interval< Number > | abs () const |
Calculates the absolute value of the interval. More... | |
void | abs_assign () |
Calculates and assigns the absolute value of the interval. More... | |
void | inverse_assign () |
Calculates and assigns the additive inverse of an interval with respect to natural interval arithmetic. More... | |
bool | reciprocal (Interval< Number > &a, Interval< Number > &b) const |
Calculates the multiplicative inverse of an interval with respect to natural interval arithmetic. More... | |
template<typename Num = Number, EnableIf< std::is_floating_point< Num >> = dummy> | |
Interval< Number > | root (int deg) const |
Calculates the nth root of the interval with respect to natural interval arithmetic. More... | |
template<typename Num = Number, EnableIf< std::is_floating_point< Num >> = dummy> | |
void | root_assign (unsigned deg) |
Calculates and assigns the nth root of the interval with respect to natural interval arithmetic. More... | |
bool | is_consistent () const |
A quick check for the bound values. More... | |
Number | distance (const Interval< Number > &intervalA) |
Calculates the distance between two Intervals. More... | |
Interval< Number > | convex_hull (const Interval< Number > &interval) const |
Static Public Member Functions | |
static Interval< Number > | unbounded_interval () |
Method which returns the unbounded interval rooted at 0. More... | |
static Interval< Number > | empty_interval () |
Method which returns the empty interval rooted at 0. More... | |
static Interval< Number > | zero_interval () |
Method which returns the pointinterval rooted at 0. More... | |
static void | sanitize (Interval< Number > &) |
Protected Attributes | |
BoostInterval | mContent |
BoundType | mLowerBoundType = BoundType::STRICT |
BoundType | mUpperBoundType = BoundType::STRICT |
Friends | |
std::ostream & | operator<< (std::ostream &str, const Interval< Number > &i) |
Operator which passes a string representation of this to the given ostream. More... | |
The class which contains the interval arithmetic including trigonometric functions.
The template parameter contains the number type used for the boundaries. It is necessary to implement the rounding and checking policies for any non-primitive type such that the desired inclusion property can be maintained.
Requirements for the NumberType:
Definition at line 133 of file Interval.h.
using carl::Interval< Number >::BoostInterval = boost::numeric::interval< Number, BoostIntervalPolicies > |
Definition at line 143 of file Interval.h.
using carl::Interval< Number >::BoostIntervalPolicies = boost::numeric::interval_lib::policies< typename Policy::roundingP, typename Policy::checkingP > |
Definition at line 142 of file Interval.h.
|
inherited |
Definition at line 70 of file Interval.h.
using carl::Interval< Number >::evalintervalmap = std::map<Variable, Interval<Number> > |
Definition at line 144 of file Interval.h.
using carl::Interval< Number >::Policy = policies<Number, Interval<Number> > |
Definition at line 136 of file Interval.h.
|
inherited |
Definition at line 69 of file Interval.h.
|
inline |
Default constructor which constructs the empty interval at point 0.
Definition at line 176 of file Interval.h.
|
inlineexplicit |
Constructor which constructs the pointinterval at n.
n | Location of the pointinterval. |
Definition at line 184 of file Interval.h.
|
inlineexplicit |
Constructor which constructs the weak-bounded interval between lower and upper.
If the bounds are invalid an empty interval at point 0 is constructed.
lower | The desired lower bound. |
upper | The desired upper bound. |
Definition at line 199 of file Interval.h.
|
inlineexplicit |
Constructor which constructs the interval according to the passed boost interval with the passed bound types.
Note that if the interval is a pointinterval with both strict bounds or the content is invalid the empty interval is constructed and if both bounds are infty the unbounded interval is constructed.
content | The passed boost interval. |
lowerBoundType | The desired lower bound type, defaults to WEAK. |
upperBoundType | The desired upper bound type, defaults to WEAK. |
Definition at line 227 of file Interval.h.
|
inline |
Constructor which constructs the interval according to the passed bounds with the passed bound types.
Note that if the interval is a pointinterval with both strict bounds or the content is invalid the empty interval is constru
lower | The desired lower bound. |
lowerBoundType | The desired lower bound type. |
upper | The desired upper bound. |
upperBoundType | The desired upper bound type. |
Definition at line 277 of file Interval.h.
|
inline |
|
inlineexplicit |
|
inlineexplicit |
Constructor which constructs a pointinterval from a passed double.
n | The passed double. |
Definition at line 336 of file Interval.h.
|
inlineexplicit |
Constructor which constructs an interval from the passed double bounds.
lower | The desired lower bound. |
upper | The desired upper bound. |
Definition at line 349 of file Interval.h.
|
inline |
Constructor which constructs the interval according to the passed double bounds with the passed bound types.
Note that if the interval is a pointinterval with both strict bounds or the content is invalid the empty interval is constru
lower | The desired double lower bound. |
lowerBoundType | The desired lower bound type. |
upper | The desired double upper bound. |
upperBoundType | The desired upper bound type. |
Definition at line 377 of file Interval.h.
|
inlineexplicit |
Constructor which constructs a pointinterval from a passed int.
n | The passed double. |
Definition at line 420 of file Interval.h.
|
inlineexplicit |
Constructor which constructs an interval from the passed int bounds.
lower | The desired lower bound. |
upper | The desired upper bound. |
Definition at line 431 of file Interval.h.
|
inline |
Constructor which constructs the interval according to the passed int bounds with the passed bound types.
Note that if the interval is a pointinterval with both strict bounds or the content is invalid the empty interval is constru
lower | The desired lower bound. |
lowerBoundType | The desired lower bound type. |
upper | The desired upper bound. |
upperBoundType | The desired upper bound type. |
Definition at line 458 of file Interval.h.
|
inlineexplicit |
Constructor which constructs a pointinterval from a passed unsigned int.
n | The passed double. |
Definition at line 500 of file Interval.h.
|
inlineexplicit |
Constructor which constructs an interval from the passed unsigned int bounds.
lower | The desired lower bound. |
upper | The desired upper bound. |
Definition at line 511 of file Interval.h.
|
inline |
Constructor which constructs the interval according to the passed unsigned int bounds with the passed bound types.
Note that if the interval is a pointinterval with both strict bounds or the content is invalid the empty interval is constru
lower | The desired lower bound. |
lowerBoundType | The desired lower bound type. |
upper | The desired upper bound. |
upperBoundType | The desired upper bound type. |
Definition at line 538 of file Interval.h.
|
inlineexplicit |
Constructor which constructs a pointinterval from a passed general rational number.
n | The passed double. |
Definition at line 581 of file Interval.h.
|
inlineexplicit |
Constructor which constructs an interval from the passed general rational bounds.
lower | The desired lower bound. |
upper | The desired upper bound. |
Definition at line 595 of file Interval.h.
|
inline |
Constructor which constructs the interval according to the passed general rational bounds with the passed bound types.
Note that if the interval is a pointinterval with both strict bounds or the content is invalid the empty interval is constru
lower | The desired lower bound. |
lowerBoundType | The desired lower bound type. |
upper | The desired upper bound. |
upperBoundType | The desired upper bound type. |
Definition at line 613 of file Interval.h.
|
inlineexplicit |
Constructor which constructs a pointinterval from a passed general float number (e.g.
FLOAT_T).
n | The passed double. |
Definition at line 652 of file Interval.h.
|
inlineexplicit |
Constructor which constructs an interval from the passed general float bounds (e.g.
FLOAT_T).
lower | The desired lower bound. |
upper | The desired upper bound. |
Definition at line 666 of file Interval.h.
|
inline |
Constructor which constructs the interval according to the passed general float bounds (e.g.
FLOAT_T) with the passed bound types. Note that if the interval is a pointinterval with both strict bounds or the content is invalid the empty interval is constru
lower | The desired lower bound. |
lowerBoundType | The desired lower bound type. |
upper | The desired upper bound. |
upperBoundType | The desired upper bound type. |
Definition at line 684 of file Interval.h.
|
inlineexplicit |
Constructor which constructs a pointinterval from a passed general float number (e.g.
FLOAT_T).
n | The passed double. |
Definition at line 722 of file Interval.h.
|
inlineexplicit |
Constructor which constructs an interval from the passed general float bounds (e.g.
FLOAT_T).
lower | The desired lower bound. |
upper | The desired upper bound. |
Definition at line 736 of file Interval.h.
|
inline |
Constructor which constructs the interval according to the passed general float bounds (e.g.
FLOAT_T) with the passed bound types. Note that if the interval is a pointinterval with both strict bounds or the content is invalid the empty interval is constru
lower | The desired lower bound. |
lowerBoundType | The desired lower bound type. |
upper | The desired upper bound. |
upperBoundType | The desired upper bound type. |
Definition at line 754 of file Interval.h.
|
inline |
Definition at line 785 of file Interval.h.
|
inline |
Definition at line 790 of file Interval.h.
|
inline |
Definition at line 795 of file Interval.h.
|
default |
Destructor.
Interval<Number> carl::Interval< Number >::abs | ( | ) | const |
Calculates the absolute value of the interval.
void carl::Interval< Number >::abs_assign | ( | ) |
Calculates and assigns the absolute value of the interval.
Interval<Number> carl::Interval< Number >::add | ( | const Interval< Number > & | rhs | ) | const |
Adds two intervals according to natural interval arithmetic.
rhs | Interval. |
void carl::Interval< Number >::add_assign | ( | const Interval< Number > & | rhs | ) |
void carl::Interval< Number >::bloat_by | ( | const Number & | width | ) |
Bloats the interval by the given value.
width | Width. |
void carl::Interval< Number >::bloat_times | ( | const Number & | factor | ) |
Bloats the interval times the factor (multiplies the overall width).
factor | Factor. |
void carl::Interval< Number >::center_assign | ( | ) |
Computes and assigns the center point of the interval.
bool carl::Interval< Number >::contains | ( | const Interval< Number > & | rhs | ) | const |
Checks if the interval contains the given interval.
rhs | Interval to be checked. |
bool carl::Interval< Number >::contains | ( | const Number & | val | ) | const |
Checks if the interval contains the given value.
val | Value to be checked. |
|
inline |
bool carl::Interval< Number >::contains_integer | ( | ) | const |
Checks if the interval contains at least one integer value.
|
inline |
Returns a reference to the included boost interval.
Definition at line 874 of file Interval.h.
|
inline |
Returns a reference to the included boost interval.
Definition at line 865 of file Interval.h.
Interval<Number> carl::Interval< Number >::convex_hull | ( | const Interval< Number > & | interval | ) | const |
Number carl::Interval< Number >::diameter | ( | ) | const |
Returns the diameter of the interval.
void carl::Interval< Number >::diameter_assign | ( | ) |
Computes and assigns the diameter of the interval.
Number carl::Interval< Number >::diameter_ratio | ( | const Interval< Number > & | rhs | ) | const |
Returns the ratio of the diameters of the given intervals.
rhs | Other interval. |
void carl::Interval< Number >::diameter_ratio_assign | ( | const Interval< Number > & | rhs | ) |
Computes and assigns the ratio of the diameters of the given intervals.
rhs | Other interval. |
Number carl::Interval< Number >::distance | ( | const Interval< Number > & | intervalA | ) |
Calculates the distance between two Intervals.
intervalA | Interval to wich we want to know the distance. |
Interval<Number> carl::Interval< Number >::div | ( | const Interval< Number > & | rhs | ) | const |
Divides two intervals according to natural interval arithmetic.
rhs | Interval. |
void carl::Interval< Number >::div_assign | ( | const Interval< Number > & | rhs | ) |
bool carl::Interval< Number >::div_ext | ( | const Interval< Number > & | rhs, |
Interval< Number > & | a, | ||
Interval< Number > & | b | ||
) | const |
Implements extended interval division with intervals containting zero.
rhs | Interval. |
a | Result a. |
b | Result b. |
|
inlinestatic |
Method which returns the empty interval rooted at 0.
Definition at line 813 of file Interval.h.
Interval<Number> carl::Interval< Number >::integral_part | ( | ) | const |
Computes the integral part of the given interval.
void carl::Interval< Number >::integralPart_assign | ( | ) |
Computes and assigns the integral part of the given interval.
Interval<Number> carl::Interval< Number >::inverse | ( | ) | const |
Calculates the additive inverse of an interval with respect to natural interval arithmetic.
void carl::Interval< Number >::inverse_assign | ( | ) |
Calculates and assigns the additive inverse of an interval with respect to natural interval arithmetic.
|
inline |
Function which determines, if the interval is closed.
Definition at line 1091 of file Interval.h.
|
inline |
A quick check for the bound values.
Definition at line 1426 of file Interval.h.
|
inline |
Function which determines, if the interval is empty.
Definition at line 1056 of file Interval.h.
|
inline |
Function which determines, if the interval is half-bounded.
Definition at line 1046 of file Interval.h.
|
inline |
Function which determines, if the interval is (-oo,oo).
Definition at line 1026 of file Interval.h.
|
inline |
Definition at line 1133 of file Interval.h.
|
inline |
Function which determines, if the interval is the one interval.
Definition at line 1111 of file Interval.h.
|
inline |
Function which determines, if the interval is open.
Definition at line 1081 of file Interval.h.
|
inline |
Function which determines, if the interval is a pointinterval.
Definition at line 1071 of file Interval.h.
|
inline |
Definition at line 1120 of file Interval.h.
|
inline |
Definition at line 1157 of file Interval.h.
|
inline |
Definition at line 1146 of file Interval.h.
|
inline |
Function which determines, if the interval is unbounded.
Definition at line 1036 of file Interval.h.
|
inline |
Function which determines, if the interval is the zero interval.
Definition at line 1101 of file Interval.h.
|
inline |
The getter for the lower boundary of the interval.
Definition at line 840 of file Interval.h.
|
inline |
Definition at line 854 of file Interval.h.
|
inline |
The getter for the lower bound type of the interval.
Definition at line 883 of file Interval.h.
Number carl::Interval< Number >::magnitude | ( | ) | const |
Returns the magnitude of the interval.
void carl::Interval< Number >::magnitude_assign | ( | ) |
Computes and assigns the magnitude of the interval.
bool carl::Interval< Number >::meets | ( | const Number & | n | ) | const |
Checks if the interval meets the given value, that is if the given value is contained in the closed interval defined by the bounds.
val | Value to be checked. |
Interval<Number> carl::Interval< Number >::mul | ( | const Interval< Number > & | rhs | ) | const |
Multiplies two intervals according to natural interval arithmetic.
rhs | Interval. |
void carl::Interval< Number >::mul_assign | ( | const Interval< Number > & | rhs | ) |
|
inline |
The assignment operator.
rhs | Source interval. |
Definition at line 990 of file Interval.h.
bool carl::Interval< Number >::reciprocal | ( | Interval< Number > & | a, |
Interval< Number > & | b | ||
) | const |
Calculates the multiplicative inverse of an interval with respect to natural interval arithmetic.
a | Result a. |
b | Result b. |
Interval<Number> carl::Interval< Number >::root | ( | int | deg | ) | const |
Calculates the nth root of the interval with respect to natural interval arithmetic.
deg | Degree. |
void carl::Interval< Number >::root_assign | ( | unsigned | deg | ) |
Calculates and assigns the nth root of the interval with respect to natural interval arithmetic.
deg | Degree. |
|
inlinestaticinherited |
Definition at line 71 of file Interval.h.
|
inline |
Advanced setter to modify both boundaries at once.
lower | Lower boundary. |
upper | Upper boundary. |
Definition at line 1007 of file Interval.h.
|
inline |
Advanced setter to modify both boundaries at once by passing a boost interval.
content | Boost interval. |
Definition at line 1017 of file Interval.h.
|
inline |
The setter for the lower boundary of the interval.
n | Lower boundary. |
Definition at line 901 of file Interval.h.
|
inline |
The setter for the lower boundary of the interval.
n | Lower boundary. |
TODO: Fix this.
Definition at line 919 of file Interval.h.
|
inline |
The setter for the lower bound type of the interval.
b | Lower bound type. |
Definition at line 963 of file Interval.h.
|
inline |
The setter for the upper boundary of the interval.
n | Upper boundary. |
Definition at line 910 of file Interval.h.
|
inline |
The setter for the upper boundary of the interval.
n | Upper boundary. |
TODO: Fix this.
Definition at line 941 of file Interval.h.
|
inline |
The setter for the upper bound type of the interval.
b | Upper bound type. |
Definition at line 976 of file Interval.h.
|
inline |
Determine whether the interval lays entirely left of 0 (NEGATIVE_SIGN), right of 0 (POSITIVE_SIGN) or contains 0 (ZERO_SIGN).
void carl::Interval< Number >::shrink_by | ( | const Number & | width | ) |
Shrinks the interval by the given value.
width | Width. |
void carl::Interval< Number >::shrink_times | ( | const Number & | factor | ) |
Shrinks the interval by a multiple of its width.
factor | Factor. |
std::pair<Interval<Number>, Interval<Number > > carl::Interval< Number >::split | ( | ) | const |
Splits the interval into 2 equally sized parts (strict-weak-cut).
std::list<Interval<Number > > carl::Interval< Number >::split | ( | unsigned | n | ) | const |
Splits the interval into n equally sized parts (strict-weak-cut).
Interval<Number> carl::Interval< Number >::sub | ( | const Interval< Number > & | rhs | ) | const |
Subtracts two intervals according to natural interval arithmetic.
rhs | Interval. |
void carl::Interval< Number >::sub_assign | ( | const Interval< Number > & | rhs | ) |
std::string carl::Interval< Number >::toString | ( | ) | const |
Creates a string representation of the interval.
|
inlinestatic |
Method which returns the unbounded interval rooted at 0.
Definition at line 804 of file Interval.h.
|
inline |
The getter for the upper boundary of the interval.
Definition at line 849 of file Interval.h.
|
inline |
Definition at line 857 of file Interval.h.
|
inline |
The getter for the upper bound type of the interval.
Definition at line 892 of file Interval.h.
|
inlinestatic |
Method which returns the pointinterval rooted at 0.
Definition at line 822 of file Interval.h.
|
friend |
Operator which passes a string representation of this to the given ostream.
str | The ostream. |
i | The interval. |
Definition at line 1304 of file Interval.h.
|
protected |
Definition at line 163 of file Interval.h.
|
protected |
Definition at line 164 of file Interval.h.
|
protected |
Definition at line 165 of file Interval.h.