Related Functions |
(Note that these are not member functions.)
|
| template<typename FP_Interval_Type > |
| void | discard_occurrences (std::map< dimension_type, Linear_Form< FP_Interval_Type > > &lf_store, Variable var) |
| template<typename FP_Interval_Type > |
| void | affine_form_image (std::map< dimension_type, Linear_Form< FP_Interval_Type > > &lf_store, Variable var, const Linear_Form< FP_Interval_Type > &lf) |
| template<typename FP_Interval_Type > |
| void | upper_bound_assign (std::map< dimension_type, Linear_Form< FP_Interval_Type > > &ls1, const std::map< dimension_type, Linear_Form< FP_Interval_Type > > &ls2) |
| template<typename C > |
| void | swap (Linear_Form< C > &x, Linear_Form< C > &y) |
| | Swaps x with y.
|
| template<typename C > |
| Linear_Form< C > | operator+ (const Linear_Form< C > &f1, const Linear_Form< C > &f2) |
| | Returns the linear form f1 + f2.
|
| template<typename C > |
| Linear_Form< C > | operator+ (Variable v, const Linear_Form< C > &f) |
| | Returns the linear form v + f.
|
| template<typename C > |
| Linear_Form< C > | operator+ (const Linear_Form< C > &f, Variable v) |
| | Returns the linear form f + v.
|
| template<typename C > |
| Linear_Form< C > | operator+ (const C &n, const Linear_Form< C > &f) |
| | Returns the linear form n + f.
|
| template<typename C > |
| Linear_Form< C > | operator+ (const Linear_Form< C > &f, const C &n) |
| | Returns the linear form f + n.
|
| template<typename C > |
| Linear_Form< C > | operator+ (const Linear_Form< C > &f) |
| | Returns the linear form f.
|
| template<typename C > |
| Linear_Form< C > | operator- (const Linear_Form< C > &f) |
| | Returns the linear form - f.
|
| template<typename C > |
| Linear_Form< C > | operator- (const Linear_Form< C > &f1, const Linear_Form< C > &f2) |
| | Returns the linear form f1 - f2.
|
| template<typename C > |
| Linear_Form< C > | operator- (Variable v, const Linear_Form< C > &f) |
| | Returns the linear form v - f.
|
| template<typename C > |
| Linear_Form< C > | operator- (const Linear_Form< C > &f, Variable v) |
| | Returns the linear form f - v.
|
| template<typename C > |
| Linear_Form< C > | operator- (const C &n, const Linear_Form< C > &f) |
| | Returns the linear form n - f.
|
| template<typename C > |
| Linear_Form< C > | operator- (const Linear_Form< C > &f, const C &n) |
| | Returns the linear form f - n.
|
| template<typename C > |
| Linear_Form< C > | operator* (const C &n, const Linear_Form< C > &f) |
| | Returns the linear form n * f.
|
| template<typename C > |
| Linear_Form< C > | operator* (const Linear_Form< C > &f, const C &n) |
| | Returns the linear form f * n.
|
| template<typename C > |
| Linear_Form< C > & | operator+= (Linear_Form< C > &f1, const Linear_Form< C > &f2) |
| | Returns the linear form f1 + f2 and assigns it to e1.
|
| template<typename C > |
| Linear_Form< C > & | operator+= (Linear_Form< C > &f, Variable v) |
| | Returns the linear form f + v and assigns it to f.
|
| template<typename C > |
| Linear_Form< C > & | operator+= (Linear_Form< C > &f, const C &n) |
| | Returns the linear form f + n and assigns it to f.
|
| template<typename C > |
| Linear_Form< C > & | operator-= (Linear_Form< C > &f1, const Linear_Form< C > &f2) |
| | Returns the linear form f1 - f2 and assigns it to f1.
|
| template<typename C > |
| Linear_Form< C > & | operator-= (Linear_Form< C > &f, Variable v) |
| | Returns the linear form f - v and assigns it to f.
|
| template<typename C > |
| Linear_Form< C > & | operator-= (Linear_Form< C > &f, const C &n) |
| | Returns the linear form f - n and assigns it to f.
|
| template<typename C > |
| Linear_Form< C > & | operator*= (Linear_Form< C > &f, const C &n) |
| | Returns the linear form n * f and assigns it to f.
|
| template<typename C > |
| Linear_Form< C > & | operator/= (Linear_Form< C > &f, const C &n) |
| | Returns the linear form f / n and assigns it to f.
|
| template<typename C > |
| bool | operator== (const Linear_Form< C > &x, const Linear_Form< C > &y) |
| | Returns true if and only if x and y are equal.
|
| template<typename C > |
| bool | operator!= (const Linear_Form< C > &x, const Linear_Form< C > &y) |
| | Returns true if and only if x and y are different.
|
| template<typename C > |
| std::ostream & | operator<< (std::ostream &s, const Linear_Form< C > &f) |
| | Output operator.
|
| template<typename C > |
| Linear_Form< C > | operator+ (const Linear_Form< C > &f) |
| template<typename C > |
| Linear_Form< C > | operator+ (const Linear_Form< C > &f, const C &n) |
| template<typename C > |
| Linear_Form< C > | operator+ (const Linear_Form< C > &f, const Variable v) |
| template<typename C > |
| Linear_Form< C > | operator- (const Linear_Form< C > &f, const C &n) |
| template<typename C > |
| Linear_Form< C > | operator- (const Variable v, const Variable w) |
| template<typename C > |
| Linear_Form< C > | operator* (const Linear_Form< C > &f, const C &n) |
| template<typename C > |
| Linear_Form< C > & | operator+= (Linear_Form< C > &f, const C &n) |
| template<typename C > |
| Linear_Form< C > & | operator-= (Linear_Form< C > &f, const C &n) |
| template<typename C > |
| bool | operator!= (const Linear_Form< C > &x, const Linear_Form< C > &y) |
| template<typename C > |
| void | swap (Linear_Form< C > &x, Linear_Form< C > &y) |
| template<typename C > |
| Linear_Form< C > | operator+ (const Linear_Form< C > &f1, const Linear_Form< C > &f2) |
| template<typename C > |
| Linear_Form< C > | operator+ (const Variable v, const Linear_Form< C > &f) |
| template<typename C > |
| Linear_Form< C > | operator+ (const C &n, const Linear_Form< C > &f) |
| template<typename C > |
| Linear_Form< C > | operator- (const Linear_Form< C > &f) |
| template<typename C > |
| Linear_Form< C > | operator- (const Linear_Form< C > &f1, const Linear_Form< C > &f2) |
| template<typename C > |
| Linear_Form< C > | operator- (const Variable v, const Linear_Form< C > &f) |
| template<typename C > |
| Linear_Form< C > | operator- (const Linear_Form< C > &f, const Variable v) |
| template<typename C > |
| Linear_Form< C > | operator- (const C &n, const Linear_Form< C > &f) |
| template<typename C > |
| Linear_Form< C > | operator* (const C &n, const Linear_Form< C > &f) |
| template<typename C > |
| Linear_Form< C > & | operator+= (Linear_Form< C > &f1, const Linear_Form< C > &f2) |
| template<typename C > |
| Linear_Form< C > & | operator+= (Linear_Form< C > &f, const Variable v) |
| template<typename C > |
| Linear_Form< C > & | operator-= (Linear_Form< C > &f1, const Linear_Form< C > &f2) |
| template<typename C > |
| Linear_Form< C > & | operator-= (Linear_Form< C > &f, const Variable v) |
| template<typename C > |
| Linear_Form< C > & | operator*= (Linear_Form< C > &f, const C &n) |
| template<typename C > |
| Linear_Form< C > & | operator/= (Linear_Form< C > &f, const C &n) |
| template<typename C > |
| bool | operator== (const Linear_Form< C > &x, const Linear_Form< C > &y) |
| template<typename C > |
| std::ostream & | operator<< (std::ostream &s, const Linear_Form< C > &f) |
template<typename C>
class Parma_Polyhedra_Library::Linear_Form< C >
A linear form with interval coefficients.
An object of the class Linear_Form represents the interval linear form
where
is the dimension of the vector space, each
is the coefficient of the
-th variable
and
is the inhomogeneous term. The coefficients and the inhomogeneous term of the linear form have the template parameter C as their type. C must be the type of an Interval.
- How to build a linear form.
- A full set of functions is defined in order to provide a convenient interface for building complex linear forms starting from simpler ones and from objects of the classes Variable and
C. Available operators include binary addition and subtraction, as well as multiplication and division by a coefficient. The space dimension of a linear form is defined as the highest variable dimension among variables that have a nonzero coefficient in the linear form, or zero if no such variable exists. The space dimension for each variable
is given by
.
- Example
- Given the type
T of an Interval with floating point coefficients (though any integral type may also be used), the following code builds the interval linear form
with space dimension 6: Variable x5(5);
Variable x2(2);
T x5_coefficient;
x5_coefficient.lower() = 2.0;
x5_coefficient.upper() = 3.0;
inhomogeneous_term.lower() = 4.0;
inhomogeneous_term.upper() = 8.0;
Linear_Form<T> lf(x2);
lf = -lf;
lf += Linear_Form<T>(x2);
Linear_Form<T> lf_x5(x5);
lf_x5 *= x5_coefficient;
lf += lf_x5;
Note that lf_x5 is created with space dimension 6, while lf is created with space dimension 0 and then extended first to space dimension 2 when x2 is subtracted and finally to space dimension 6 when lf_x5 is added.