PPL
1.2
|
A linear expression. More...
#include <Linear_Expression_defs.hh>
Classes | |
class | const_iterator |
Public Types | |
typedef const Linear_Expression & | const_reference |
typedef Linear_Expression | raw_type |
Public Member Functions | |
Linear_Expression (Representation r=default_representation) | |
Default constructor: returns a copy of Linear_Expression::zero(). More... | |
Linear_Expression (const Linear_Expression &e) | |
Ordinary copy constructor. More... | |
Linear_Expression (const Linear_Expression &e, Representation r) | |
Copy constructor that takes also a Representation. More... | |
template<typename LE_Adapter > | |
Linear_Expression (const LE_Adapter &e, typename Enable_If< Is_Same_Or_Derived< Expression_Adapter_Base, LE_Adapter >::value, void * >::type=0) | |
Copy constructor from a linear expression adapter. More... | |
template<typename LE_Adapter > | |
Linear_Expression (const LE_Adapter &e, Representation r, typename Enable_If< Is_Same_Or_Derived< Expression_Adapter_Base, LE_Adapter >::value, void * >::type=0) | |
Copy constructor from a linear expression adapter that takes a Representation. More... | |
template<typename LE_Adapter > | |
Linear_Expression (const LE_Adapter &e, dimension_type space_dim, typename Enable_If< Is_Same_Or_Derived< Expression_Adapter_Base, LE_Adapter >::value, void * >::type=0) | |
Copy constructor from a linear expression adapter that takes a space dimension. More... | |
template<typename LE_Adapter > | |
Linear_Expression (const LE_Adapter &e, dimension_type space_dim, Representation r, typename Enable_If< Is_Same_Or_Derived< Expression_Adapter_Base, LE_Adapter >::value, void * >::type=0) | |
Copy constructor from a linear expression adapter that takes a space dimension and a Representation. More... | |
Linear_Expression & | operator= (const Linear_Expression &e) |
Assignment operator. More... | |
~Linear_Expression () | |
Destructor. More... | |
Linear_Expression (Coefficient_traits::const_reference n, Representation r=default_representation) | |
Builds the linear expression corresponding to the inhomogeneous term n . More... | |
Linear_Expression (Variable v, Representation r=default_representation) | |
Builds the linear expression corresponding to the variable v . More... | |
Representation | representation () const |
Returns the current representation of *this. More... | |
void | set_representation (Representation r) |
Converts *this to the specified representation. More... | |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | lower_bound (Variable v) const |
dimension_type | space_dimension () const |
Returns the dimension of the vector space enclosing *this . More... | |
void | set_space_dimension (dimension_type n) |
Sets the dimension of the vector space enclosing *this to n . More... | |
Coefficient_traits::const_reference | coefficient (Variable v) const |
Returns the coefficient of v in *this . More... | |
void | set_coefficient (Variable v, Coefficient_traits::const_reference n) |
Sets the coefficient of v in *this to n . More... | |
Coefficient_traits::const_reference | inhomogeneous_term () const |
Returns the inhomogeneous term of *this . More... | |
void | set_inhomogeneous_term (Coefficient_traits::const_reference n) |
Sets the inhomogeneous term of *this to n . More... | |
void | linear_combine (const Linear_Expression &y, Variable v) |
void | linear_combine (const Linear_Expression &y, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2) |
void | linear_combine_lax (const Linear_Expression &y, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2) |
void | swap_space_dimensions (Variable v1, Variable v2) |
Swaps the coefficients of the variables v1 and v2 . More... | |
void | remove_space_dimensions (const Variables_Set &vars) |
Removes all the specified dimensions from the expression. More... | |
void | shift_space_dimensions (Variable v, dimension_type n) |
void | permute_space_dimensions (const std::vector< Variable > &cycle) |
Permutes the space dimensions of the expression. More... | |
bool | is_zero () const |
Returns true if and only if *this is ![]() | |
bool | all_homogeneous_terms_are_zero () const |
Returns true if and only if all the homogeneous terms of *this are ![]() | |
memory_size_type | total_memory_in_bytes () const |
Returns a lower bound to the total size in bytes of the memory occupied by *this . More... | |
memory_size_type | external_memory_in_bytes () const |
Returns the size in bytes of the memory managed by *this . More... | |
bool | OK () const |
Checks if all the invariants are satisfied. More... | |
void | ascii_dump () const |
Writes to std::cerr an ASCII representation of *this . More... | |
void | ascii_dump (std::ostream &s) const |
Writes to s an ASCII representation of *this . More... | |
void | print () const |
Prints *this to std::cerr using operator<< . More... | |
bool | ascii_load (std::istream &s) |
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this accordingly. Returns true if successful, false otherwise. More... | |
void | m_swap (Linear_Expression &y) |
Swaps *this with y . More... | |
Linear_Expression (const Linear_Expression &e, dimension_type space_dim) | |
Copy constructor with a specified space dimension. More... | |
Linear_Expression (const Linear_Expression &e, dimension_type space_dim, Representation r) | |
Copy constructor with a specified space dimension and representation. More... | |
bool | is_equal_to (const Linear_Expression &x) const |
void | normalize () |
void | sign_normalize () |
bool | all_zeroes (const Variables_Set &vars) const |
Returns true if the coefficient of each variable in vars [i] is ![]() | |
Static Public Member Functions | |
static dimension_type | max_space_dimension () |
Returns the maximum space dimension a Linear_Expression can handle. More... | |
static void | initialize () |
Initializes the class. More... | |
static void | finalize () |
Finalizes the class. More... | |
static const Linear_Expression & | zero () |
Returns the (zero-dimension space) constant 0. More... | |
Static Public Attributes | |
static const Representation | default_representation = SPARSE |
Private Member Functions | |
Linear_Expression (dimension_type space_dim, bool, Representation r=default_representation) | |
Implementation sizing constructor. More... | |
Coefficient_traits::const_reference | get (dimension_type i) const |
Returns the i-th coefficient. More... | |
void | set (dimension_type i, Coefficient_traits::const_reference n) |
Sets the i-th coefficient to n. More... | |
Coefficient_traits::const_reference | get (Variable v) const |
Returns the coefficient of v. More... | |
void | set (Variable v, Coefficient_traits::const_reference n) |
Sets the coefficient of v to n. More... | |
bool | all_zeroes (dimension_type start, dimension_type end) const |
Returns true if (*this)[i] is ![]() | |
dimension_type | num_zeroes (dimension_type start, dimension_type end) const |
Returns the number of zero coefficient in [start, end). More... | |
Coefficient | gcd (dimension_type start, dimension_type end) const |
Returns the gcd of the nonzero coefficients in [start,end). If all the coefficients in this range are 0 returns 0. More... | |
void | exact_div_assign (Coefficient_traits::const_reference c, dimension_type start, dimension_type end) |
void | linear_combine (const Linear_Expression &y, dimension_type i) |
void | linear_combine (const Linear_Expression &y, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2, dimension_type start, dimension_type end) |
void | linear_combine_lax (const Linear_Expression &y, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2, dimension_type start, dimension_type end) |
void | mul_assign (Coefficient_traits::const_reference n, dimension_type start, dimension_type end) |
Equivalent to (*this)[i] *= n , for each i in [start, end). More... | |
dimension_type | last_nonzero () const |
dimension_type | last_nonzero (dimension_type first, dimension_type last) const |
dimension_type | first_nonzero (dimension_type first, dimension_type last) const |
bool | all_zeroes_except (const Variables_Set &vars, dimension_type start, dimension_type end) const |
Returns true if all coefficients in [start,end), except those corresponding to variables in vars , are zero. More... | |
void | scalar_product_assign (Coefficient &result, const Linear_Expression &y) const |
Sets results to the sum of (*this)[i]*y[i], for each i. More... | |
void | scalar_product_assign (Coefficient &result, const Linear_Expression &y, dimension_type start, dimension_type end) const |
Sets results to the sum of (*this)[i]*y[i], for each i in [start,end). More... | |
int | scalar_product_sign (const Linear_Expression &y) const |
Computes the sign of the sum of (*this)[i]*y[i], for each i. More... | |
int | scalar_product_sign (const Linear_Expression &y, dimension_type start, dimension_type end) const |
void | has_a_free_dimension_helper (std::set< dimension_type > &x) const |
Removes from the set x all the indexes of nonzero elements of *this. More... | |
bool | is_equal_to (const Linear_Expression &x, dimension_type start, dimension_type end) const |
Returns true if (*this)[i] is equal to x[i], for each i in [start,end). More... | |
bool | is_equal_to (const Linear_Expression &x, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2, dimension_type start, dimension_type end) const |
void | get_row (Dense_Row &r) const |
Sets r to a copy of the row that implements *this . More... | |
void | get_row (Sparse_Row &r) const |
Sets r to a copy of the row that implements *this . More... | |
bool | have_a_common_variable (const Linear_Expression &x, Variable first, Variable last) const |
Returns true if there is a variable from index first (included) to index last (excluded) whose coefficient is nonzero in both *this and x . More... | |
void | negate (dimension_type first, dimension_type last) |
Negates the elements from index first (included) to index last (excluded). More... | |
Private Attributes | |
Linear_Expression_Interface * | impl |
Static Private Attributes | |
static const Linear_Expression * | zero_p = 0 |
Holds (between class initialization and finalization) a pointer to the (zero-dimension space) constant 0. More... | |
Related Functions | |
(Note that these are not member functions.) | |
Linear_Expression | operator+ (const Linear_Expression &e1, const Linear_Expression &e2) |
Returns the linear expression e1 + e2 . More... | |
Linear_Expression | operator+ (Variable v, Variable w) |
Returns the linear expression v + w . More... | |
Linear_Expression | operator+ (Variable v, const Linear_Expression &e) |
Returns the linear expression v + e . More... | |
Linear_Expression | operator+ (const Linear_Expression &e, Variable v) |
Returns the linear expression e + v . More... | |
Linear_Expression | operator+ (Coefficient_traits::const_reference n, const Linear_Expression &e) |
Returns the linear expression n + e . More... | |
Linear_Expression | operator+ (const Linear_Expression &e, Coefficient_traits::const_reference n) |
Returns the linear expression e + n . More... | |
Linear_Expression | operator+ (const Linear_Expression &e) |
Returns the linear expression e . More... | |
Linear_Expression | operator- (const Linear_Expression &e) |
Returns the linear expression - e . More... | |
Linear_Expression | operator- (const Linear_Expression &e1, const Linear_Expression &e2) |
Returns the linear expression e1 - e2 . More... | |
Linear_Expression | operator- (Variable v, Variable w) |
Returns the linear expression v - w . More... | |
Linear_Expression | operator- (Variable v, const Linear_Expression &e) |
Returns the linear expression v - e . More... | |
Linear_Expression | operator- (const Linear_Expression &e, Variable v) |
Returns the linear expression e - v . More... | |
Linear_Expression | operator- (Coefficient_traits::const_reference n, const Linear_Expression &e) |
Returns the linear expression n - e . More... | |
Linear_Expression | operator- (const Linear_Expression &e, Coefficient_traits::const_reference n) |
Returns the linear expression e - n . More... | |
Linear_Expression | operator* (Coefficient_traits::const_reference n, const Linear_Expression &e) |
Returns the linear expression n * e . More... | |
Linear_Expression | operator* (const Linear_Expression &e, Coefficient_traits::const_reference n) |
Returns the linear expression e * n . More... | |
Linear_Expression & | operator+= (Linear_Expression &e1, const Linear_Expression &e2) |
Returns the linear expression e1 + e2 and assigns it to e1 . More... | |
Linear_Expression & | operator+= (Linear_Expression &e, Variable v) |
Returns the linear expression e + v and assigns it to e . More... | |
Linear_Expression & | operator+= (Linear_Expression &e, Coefficient_traits::const_reference n) |
Returns the linear expression e + n and assigns it to e . More... | |
Linear_Expression & | operator-= (Linear_Expression &e1, const Linear_Expression &e2) |
Returns the linear expression e1 - e2 and assigns it to e1 . More... | |
Linear_Expression & | operator-= (Linear_Expression &e, Variable v) |
Returns the linear expression e - v and assigns it to e . More... | |
Linear_Expression & | operator-= (Linear_Expression &e, Coefficient_traits::const_reference n) |
Returns the linear expression e - n and assigns it to e . More... | |
Linear_Expression & | operator*= (Linear_Expression &e, Coefficient_traits::const_reference n) |
Returns the linear expression n * e and assigns it to e . More... | |
Linear_Expression & | operator/= (Linear_Expression &e, Coefficient_traits::const_reference n) |
Returns the linear expression n / e and assigns it to e . More... | |
void | neg_assign (Linear_Expression &e) |
Assigns to e its own negation. More... | |
Linear_Expression & | add_mul_assign (Linear_Expression &e, Coefficient_traits::const_reference n, Variable v) |
Returns the linear expression e + n * v and assigns it to e . More... | |
void | add_mul_assign (Linear_Expression &e1, Coefficient_traits::const_reference factor, const Linear_Expression &e2) |
Sums e2 multiplied by factor into e1 . More... | |
void | sub_mul_assign (Linear_Expression &e1, Coefficient_traits::const_reference factor, const Linear_Expression &e2) |
Subtracts e2 multiplied by factor from e1 . More... | |
Linear_Expression & | sub_mul_assign (Linear_Expression &e, Coefficient_traits::const_reference n, Variable v) |
Returns the linear expression e - n * v and assigns it to e . More... | |
int | compare (const Linear_Expression &x, const Linear_Expression &y) |
The basic comparison function. More... | |
std::ostream & | operator<< (std::ostream &s, const Linear_Expression &e) |
Output operator. More... | |
void | swap (Linear_Expression &x, Linear_Expression &y) |
Swaps x with y . More... | |
Linear_Expression | operator+ (const Linear_Expression &e) |
Linear_Expression | operator+ (const Linear_Expression &e, Coefficient_traits::const_reference n) |
Linear_Expression | operator+ (const Linear_Expression &e, const Variable v) |
Linear_Expression | operator- (const Linear_Expression &e, Coefficient_traits::const_reference n) |
Linear_Expression | operator- (const Variable v, const Variable w) |
Linear_Expression | operator* (const Linear_Expression &e, Coefficient_traits::const_reference n) |
Linear_Expression & | operator+= (Linear_Expression &e, Coefficient_traits::const_reference n) |
Linear_Expression & | operator-= (Linear_Expression &e, Coefficient_traits::const_reference n) |
Linear_Expression | operator+ (const Linear_Expression &e1, const Linear_Expression &e2) |
Linear_Expression | operator+ (const Variable v, const Linear_Expression &e) |
Linear_Expression | operator+ (Coefficient_traits::const_reference n, const Linear_Expression &e) |
Linear_Expression | operator+ (const Variable v, const Variable w) |
Linear_Expression | operator- (const Linear_Expression &e) |
Linear_Expression | operator- (const Linear_Expression &e1, const Linear_Expression &e2) |
Linear_Expression | operator- (const Variable v, const Linear_Expression &e) |
Linear_Expression | operator- (const Linear_Expression &e, const Variable v) |
Linear_Expression | operator- (Coefficient_traits::const_reference n, const Linear_Expression &e) |
Linear_Expression | operator* (Coefficient_traits::const_reference n, const Linear_Expression &e) |
Linear_Expression & | operator+= (Linear_Expression &e1, const Linear_Expression &e2) |
Linear_Expression & | operator+= (Linear_Expression &e, const Variable v) |
Linear_Expression & | operator-= (Linear_Expression &e1, const Linear_Expression &e2) |
Linear_Expression & | operator-= (Linear_Expression &e, const Variable v) |
Linear_Expression & | operator*= (Linear_Expression &e, Coefficient_traits::const_reference n) |
Linear_Expression & | operator/= (Linear_Expression &e, Coefficient_traits::const_reference n) |
void | neg_assign (Linear_Expression &e) |
Linear_Expression & | add_mul_assign (Linear_Expression &e, Coefficient_traits::const_reference n, const Variable v) |
Linear_Expression & | sub_mul_assign (Linear_Expression &e, Coefficient_traits::const_reference n, const Variable v) |
std::ostream & | operator<< (std::ostream &s, const Linear_Expression &e) |
void | swap (Linear_Expression &x, Linear_Expression &y) |
A linear expression.
An object of the class Linear_Expression represents the linear expression
where is the dimension of the vector space, each
is the integer coefficient of the
-th variable
and
is the integer for the inhomogeneous term.
Linear expressions are the basic blocks for defining both constraints (i.e., linear equalities or inequalities) and generators (i.e., lines, rays, points and closure points). A full set of functions is defined to provide a convenient interface for building complex linear expressions starting from simpler ones and from objects of the classes Variable and Coefficient: available operators include unary negation, binary addition and subtraction, as well as multiplication by a Coefficient. The space dimension of a linear expression is defined as the maximum space dimension of the arguments used to build it: in particular, the space dimension of a Variable x
is defined as x.id()+1
, whereas all the objects of the class Coefficient have space dimension zero.
e1
, e2
and e3
have space dimension 1, 2 and 3, respectively; also, in the fourth line of code, e
is created with space dimension zero and then extended to space dimension 3 in the fifth line. Definition at line 289 of file Linear_Expression_defs.hh.
Definition at line 307 of file Linear_Expression_defs.hh.
Definition at line 308 of file Linear_Expression_defs.hh.
|
explicit |
Default constructor: returns a copy of Linear_Expression::zero().
Definition at line 54 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::DENSE, and Parma_Polyhedra_Library::SPARSE.
Parma_Polyhedra_Library::Linear_Expression::Linear_Expression | ( | const Linear_Expression & | e | ) |
Ordinary copy constructor.
e
(not necessarily the default_representation). Definition at line 81 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::DENSE, impl, representation(), and Parma_Polyhedra_Library::SPARSE.
Parma_Polyhedra_Library::Linear_Expression::Linear_Expression | ( | const Linear_Expression & | e, |
Representation | r | ||
) |
Copy constructor that takes also a Representation.
Definition at line 94 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::DENSE, impl, and Parma_Polyhedra_Library::SPARSE.
|
inlineexplicit |
Copy constructor from a linear expression adapter.
e
(not necessarily the default_representation). Definition at line 727 of file Linear_Expression_inlines.hh.
References add_mul_assign, impl, set_space_dimension(), Parma_Polyhedra_Library::swap(), and swap().
|
inline |
Copy constructor from a linear expression adapter that takes a Representation.
Definition at line 746 of file Linear_Expression_inlines.hh.
References add_mul_assign, impl, set_inhomogeneous_term(), set_space_dimension(), Parma_Polyhedra_Library::swap(), and swap().
|
inlineexplicit |
Copy constructor from a linear expression adapter that takes a space dimension.
e
(not necessarily default_representation). Definition at line 766 of file Linear_Expression_inlines.hh.
References add_mul_assign, impl, set_space_dimension(), Parma_Polyhedra_Library::swap(), and swap().
|
inline |
Copy constructor from a linear expression adapter that takes a space dimension and a Representation.
Definition at line 793 of file Linear_Expression_inlines.hh.
References add_mul_assign, impl, set_inhomogeneous_term(), set_space_dimension(), Parma_Polyhedra_Library::swap(), and swap().
|
inline |
Destructor.
Definition at line 39 of file Linear_Expression_inlines.hh.
References impl.
|
explicit |
Builds the linear expression corresponding to the inhomogeneous term n
.
Definition at line 137 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::DENSE, and Parma_Polyhedra_Library::SPARSE.
Parma_Polyhedra_Library::Linear_Expression::Linear_Expression | ( | Variable | v, |
Representation | r = default_representation |
||
) |
Builds the linear expression corresponding to the variable v
.
std::length_error | Thrown if the space dimension of v exceeds Linear_Expression::max_space_dimension() . |
Definition at line 151 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::DENSE, and Parma_Polyhedra_Library::SPARSE.
Parma_Polyhedra_Library::Linear_Expression::Linear_Expression | ( | const Linear_Expression & | e, |
dimension_type | space_dim | ||
) |
Copy constructor with a specified space dimension.
Definition at line 108 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::DENSE, impl, representation(), and Parma_Polyhedra_Library::SPARSE.
Parma_Polyhedra_Library::Linear_Expression::Linear_Expression | ( | const Linear_Expression & | e, |
dimension_type | space_dim, | ||
Representation | r | ||
) |
Copy constructor with a specified space dimension and representation.
Definition at line 122 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::DENSE, impl, and Parma_Polyhedra_Library::SPARSE.
|
private |
Implementation sizing constructor.
The bool parameter is just to avoid problems with the constructor Linear_Expression(Coefficient_traits::const_reference n).
Definition at line 67 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::DENSE, and Parma_Polyhedra_Library::SPARSE.
|
inline |
Returns true
if and only if all the homogeneous terms of *this
are .
Definition at line 96 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::all_homogeneous_terms_are_zero(), and impl.
Referenced by Parma_Polyhedra_Library::Affine_Space::Affine_Space(), Parma_Polyhedra_Library::Termination_Helpers::all_affine_ranking_functions_PR(), Parma_Polyhedra_Library::Termination_Helpers::all_affine_ranking_functions_PR_original(), Parma_Polyhedra_Library::Polyhedron::BFT00_poly_hull_assign_if_exact(), Parma_Polyhedra_Library::Polyhedron::BHRZ03_combining_constraints(), Parma_Polyhedra_Library::Grid::Grid(), Parma_Polyhedra_Library::Grid_Generator::grid_line(), Parma_Polyhedra_Library::Generator::line(), Parma_Polyhedra_Library::Polyhedron::positive_time_elapse_assign_impl(), Parma_Polyhedra_Library::Generator::ray(), Parma_Polyhedra_Library::Generator_System::remove_invalid_lines_and_rays(), and Parma_Polyhedra_Library::Polyhedron::time_elapse_assign().
|
inline |
Returns true
if the coefficient of each variable in vars
[i] is .
Definition at line 476 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::all_zeroes(), and impl.
Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Grid::lower_triangular(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), and Parma_Polyhedra_Library::Grid::upper_triangular().
|
inlineprivate |
Returns true
if (*this)[i] is , for each i in [start, end).
Definition at line 437 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::all_zeroes(), and impl.
|
inlineprivate |
Returns true
if all coefficients in [start,end), except those corresponding to variables in vars
, are zero.
Definition at line 481 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::all_zeroes_except(), and impl.
void Parma_Polyhedra_Library::Linear_Expression::ascii_dump | ( | ) | const |
Writes to std::cerr
an ASCII representation of *this
.
Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::ascii_dump(), and Parma_Polyhedra_Library::Generator::ascii_dump().
|
inline |
Writes to s
an ASCII representation of *this
.
Definition at line 205 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::ascii_dump(), and impl.
|
inline |
Loads from s
an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this
accordingly. Returns true
if successful, false
otherwise.
Definition at line 210 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::ascii_load(), and impl.
Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::ascii_load(), Parma_Polyhedra_Library::PIP_Solution_Node::ascii_load(), and Parma_Polyhedra_Library::Generator::ascii_load().
|
inline |
Returns an iterator that points to the first nonzero coefficient in the expression.
Definition at line 708 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::begin(), and impl.
Referenced by Parma_Polyhedra_Library::Box< ITV >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Box< ITV >::affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Box< ITV >::bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_minus_v_pm_u_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_u_minus_v_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_v_minus_u_bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_v_pm_u_bounds(), Parma_Polyhedra_Library::Box< ITV >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Grid::generalized_affine_image(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_image(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Grid::generalized_affine_preimage(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage(), Parma_Polyhedra_Library::MIP_Problem::is_unbounded_obj_function(), Parma_Polyhedra_Library::Box< ITV >::max_min(), Parma_Polyhedra_Library::Polyhedron::modify_according_to_evolution(), and Parma_Polyhedra_Library::BD_Shape< T >::refine().
|
inline |
Returns the coefficient of v
in *this
.
Definition at line 59 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::coefficient(), and impl.
Referenced by Parma_Polyhedra_Library::Grid_Generator_System::affine_image(), Parma_Polyhedra_Library::Generator_System::affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::Grid::affine_image(), Parma_Polyhedra_Library::Polyhedron::affine_image(), Parma_Polyhedra_Library::Constraint_System::affine_preimage(), Parma_Polyhedra_Library::Box< ITV >::affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::Grid::affine_preimage(), Parma_Polyhedra_Library::Polyhedron::affine_preimage(), Parma_Polyhedra_Library::Box< ITV >::bounded_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Polyhedron::bounded_affine_image(), Parma_Polyhedra_Library::Box< ITV >::bounded_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_preimage(), Parma_Polyhedra_Library::Polyhedron::bounded_affine_preimage(), Parma_Polyhedra_Library::Congruence::coefficient(), Parma_Polyhedra_Library::Constraint::coefficient(), Parma_Polyhedra_Library::Grid_Generator::coefficient(), Parma_Polyhedra_Library::Generator::coefficient(), Parma_Polyhedra_Library::Grid_Generator::divisor(), Parma_Polyhedra_Library::Constraint::epsilon_coefficient(), Parma_Polyhedra_Library::Generator::epsilon_coefficient(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Grid::generalized_affine_preimage(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage(), Parma_Polyhedra_Library::Linear_Form< C >::Linear_Form(), Parma_Polyhedra_Library::Box< ITV >::max_min(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::Grid_Generator::OK(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), and Parma_Polyhedra_Library::BD_Shape< T >::refine().
|
inline |
Returns an iterator that points to the last nonzero coefficient in the expression.
Definition at line 714 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::end(), and impl.
Referenced by Parma_Polyhedra_Library::Box< ITV >::affine_image(), Parma_Polyhedra_Library::Box< ITV >::affine_preimage(), Parma_Polyhedra_Library::Box< ITV >::bounds(), Parma_Polyhedra_Library::Box< ITV >::frequency(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Grid::generalized_affine_image(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_image(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Grid::generalized_affine_preimage(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage(), Parma_Polyhedra_Library::MIP_Problem::is_unbounded_obj_function(), Parma_Polyhedra_Library::Box< ITV >::max_min(), and Parma_Polyhedra_Library::Polyhedron::modify_according_to_evolution().
|
inlineprivate |
Definition at line 453 of file Linear_Expression_inlines.hh.
Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::Artificial_Parameter(), Parma_Polyhedra_Library::Grid::conversion(), and Parma_Polyhedra_Library::Polyhedron::drop_some_non_integer_points().
|
inline |
Returns the size in bytes of the memory managed by *this
.
Definition at line 107 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::total_memory_in_bytes().
Referenced by Parma_Polyhedra_Library::Congruence::external_memory_in_bytes(), Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::external_memory_in_bytes(), Parma_Polyhedra_Library::Constraint::external_memory_in_bytes(), Parma_Polyhedra_Library::MIP_Problem::external_memory_in_bytes(), Parma_Polyhedra_Library::Grid_Generator::external_memory_in_bytes(), Parma_Polyhedra_Library::Generator::external_memory_in_bytes(), and total_memory_in_bytes().
|
static |
Finalizes the class.
Definition at line 48 of file Linear_Expression.cc.
Referenced by Parma_Polyhedra_Library::Init::~Init().
|
inlineprivate |
Returns the index of the first nonzero element, or last
if there are no nonzero elements, considering only elements in [first,last).
Definition at line 520 of file Linear_Expression_inlines.hh.
Referenced by Parma_Polyhedra_Library::Box< ITV >::generalized_affine_image().
|
inlineprivate |
Returns the gcd of the nonzero coefficients in [start,end). If all the coefficients in this range are 0 returns 0.
Definition at line 447 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::gcd(), and impl.
Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::Artificial_Parameter().
|
inlineprivate |
Returns the i-th coefficient.
Definition at line 415 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::get(), and impl.
Referenced by Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Congruence::affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Grid_Generator::is_equal_at_dimension(), Parma_Polyhedra_Library::Grid::lower_triangular(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), Parma_Polyhedra_Library::Grid::reduce_congruence_with_equality(), Parma_Polyhedra_Library::Grid::reduce_equality_with_equality(), Parma_Polyhedra_Library::Grid::reduce_line_with_line(), Parma_Polyhedra_Library::Grid::reduce_parameter_with_line(), Parma_Polyhedra_Library::Grid::reduce_pc_with_pc(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Grid::simplify(), and Parma_Polyhedra_Library::Grid::upper_triangular().
|
inlineprivate |
Returns the coefficient of v.
Definition at line 426 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::get(), impl, and Parma_Polyhedra_Library::Variable::space_dimension().
|
inlineprivate |
Sets r
to a copy of the row that implements *this
.
Definition at line 554 of file Linear_Expression_inlines.hh.
|
inlineprivate |
Sets r
to a copy of the row that implements *this
.
Definition at line 560 of file Linear_Expression_inlines.hh.
|
inlineprivate |
Removes from the set x all the indexes of nonzero elements of *this.
Definition at line 532 of file Linear_Expression_inlines.hh.
|
inlineprivate |
Returns true
if there is a variable from index first
(included) to index last
(excluded) whose coefficient is nonzero in both *this
and x
.
Definition at line 616 of file Linear_Expression_inlines.hh.
References impl.
Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Grid::generalized_affine_image(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Grid::generalized_affine_preimage(), and Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage().
|
inline |
Returns the inhomogeneous term of *this
.
Definition at line 70 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::inhomogeneous_term().
Referenced by Parma_Polyhedra_Library::Generator_System::add_corresponding_points(), Parma_Polyhedra_Library::Box< ITV >::affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Box< ITV >::affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::Polyhedron::BFT00_poly_hull_assign_if_exact(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Generator_System::convert_into_non_necessarily_closed(), Parma_Polyhedra_Library::Grid_Generator::divisor(), Parma_Polyhedra_Library::Generator::divisor(), Parma_Polyhedra_Library::Polyhedron::drop_some_non_integer_points(), Parma_Polyhedra_Library::Box< ITV >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::Polyhedron::frequency(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::Grid::frequency_no_check(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Congruence::inhomogeneous_term(), Parma_Polyhedra_Library::Constraint::inhomogeneous_term(), Parma_Polyhedra_Library::Generator_System::insert(), Parma_Polyhedra_Library::Generator_System::insert_pending(), Parma_Polyhedra_Library::Grid_Generator::is_line_or_parameter(), Parma_Polyhedra_Library::Generator::is_line_or_ray(), Parma_Polyhedra_Library::Generator::is_matching_closure_point(), Parma_Polyhedra_Library::Linear_Form< C >::Linear_Form(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), Parma_Polyhedra_Library::Box< ITV >::max_min(), Parma_Polyhedra_Library::Grid::max_min(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::Polyhedron::max_min(), Parma_Polyhedra_Library::Grid_Generator::OK(), Parma_Polyhedra_Library::Polyhedron::positive_time_elapse_assign_impl(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), and Parma_Polyhedra_Library::Polyhedron::strongly_minimize_generators().
|
static |
Initializes the class.
Definition at line 42 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::Coefficient_zero().
Referenced by Parma_Polyhedra_Library::Init::Init().
|
inline |
Returns true
if *this is equal to x
. Note that (*this == x) has a completely different meaning.
Definition at line 592 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::is_equal_to().
Referenced by Parma_Polyhedra_Library::Constraint::is_equivalent_to(), Parma_Polyhedra_Library::Generator::is_equivalent_to(), Parma_Polyhedra_Library::Generator::is_matching_closure_point(), Parma_Polyhedra_Library::Congruence::operator==(), and Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::operator==().
|
inlineprivate |
Returns true
if (*this)[i] is equal to x[i], for each i in [start,end).
Definition at line 538 of file Linear_Expression_inlines.hh.
References impl.
|
inlineprivate |
Returns true
if (*this)[i]*c1 is equal to x[i]*c2, for each i in [start,end).
Definition at line 545 of file Linear_Expression_inlines.hh.
References impl.
|
inline |
Returns true
if and only if *this
is .
Definition at line 91 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::is_zero().
|
inlineprivate |
Returns the index of the last nonzero element, or 0 if there are no nonzero elements.
Definition at line 488 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::last_nonzero().
Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Grid::generalized_affine_image(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Grid::generalized_affine_preimage(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), and Parma_Polyhedra_Library::BD_Shape< T >::refine().
|
inlineprivate |
Returns the index of the last nonzero element in [first,last), or last if there are no nonzero elements.
Definition at line 526 of file Linear_Expression_inlines.hh.
void Parma_Polyhedra_Library::Linear_Expression::linear_combine | ( | const Linear_Expression & | y, |
Variable | v | ||
) |
Linearly combines *this
with y
so that the coefficient of v
is 0.
y | The expression that will be combined with *this object; |
v | The variable whose coefficient has to become ![]() |
Computes a linear combination of *this
and y
having the coefficient of variable v
equal to . Then it assigns the resulting expression to
*this
.
*this
and y
must have the same space dimension.
Referenced by Parma_Polyhedra_Library::Constraint_System::affine_preimage(), Parma_Polyhedra_Library::Affine_Space::Affine_Space(), Parma_Polyhedra_Library::Termination_Helpers::all_affine_ranking_functions_PR(), Parma_Polyhedra_Library::Termination_Helpers::all_affine_ranking_functions_PR_original(), Parma_Polyhedra_Library::Grid::Grid(), Parma_Polyhedra_Library::Termination_Helpers::one_affine_ranking_function_PR(), Parma_Polyhedra_Library::Grid::reduce_equality_with_equality(), Parma_Polyhedra_Library::Grid::reduce_line_with_line(), Parma_Polyhedra_Library::Grid::reduce_parameter_with_line(), Parma_Polyhedra_Library::Grid::reduce_pc_with_pc(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), and Parma_Polyhedra_Library::Grid::relation_with().
|
inline |
Equivalent to *this = *this * c1 + y * c2
, but assumes that c1 and c2 are not 0.
Definition at line 572 of file Linear_Expression_inlines.hh.
References impl.
|
inlineprivate |
Linearly combines *this
with y
so that the coefficient of v
is 0.
y | The expression that will be combined with *this object; |
i | The index of the coefficient that has to become ![]() |
Computes a linear combination of *this
and y
having the i-th coefficient equal to . Then it assigns the resulting expression to
*this
.
*this
and y
must have the same space dimension.
Definition at line 566 of file Linear_Expression_inlines.hh.
References impl.
|
inlineprivate |
Equivalent to (*this)[i] = (*this)[i] * c1 + y[i] * c2
, for each i in [start, end). It assumes that c1 and c2 are nonzero.
Definition at line 597 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::linear_combine().
|
inline |
Equivalent to *this = *this * c1 + y * c2
. c1 and c2 may be 0.
Definition at line 580 of file Linear_Expression_inlines.hh.
References impl.
Referenced by Parma_Polyhedra_Library::Grid::reduce_pc_with_pc().
|
inlineprivate |
Equivalent to (*this)[i] = (*this)[i] * c1 + y[i] * c2
, for each i in [start, end). c1 and c2 may be zero.
Definition at line 606 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::linear_combine_lax().
|
inline |
Returns an iterator that points to the first nonzero coefficient of a variable bigger than or equal to v.
Definition at line 720 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::lower_bound().
Referenced by Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_minus_v_pm_u_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_u_minus_v_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::deduce_v_minus_u_bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::deduce_v_pm_u_bounds(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Grid::generalized_affine_image(), Parma_Polyhedra_Library::Grid::generalized_affine_preimage(), and Parma_Polyhedra_Library::BD_Shape< T >::refine().
|
inline |
Swaps *this
with y
.
Definition at line 194 of file Linear_Expression_inlines.hh.
References impl, Parma_Polyhedra_Library::swap(), and swap().
Referenced by Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::m_swap(), and swap().
|
static |
Returns the maximum space dimension a Linear_Expression can handle.
Definition at line 35 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::Dense_Row::max_size().
Referenced by Parma_Polyhedra_Library::Congruence::max_space_dimension(), Parma_Polyhedra_Library::Constraint::max_space_dimension(), Parma_Polyhedra_Library::Grid_Generator::max_space_dimension(), Parma_Polyhedra_Library::Generator::max_space_dimension(), operator+(), and operator-().
|
inlineprivate |
Equivalent to (*this)[i] *= n
, for each i in [start, end).
Definition at line 460 of file Linear_Expression_inlines.hh.
Referenced by Parma_Polyhedra_Library::Grid::reduce_parameter_with_line().
|
inlineprivate |
Negates the elements from index first
(included) to index last
(excluded).
Definition at line 471 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::negate().
Referenced by operator-(), and Parma_Polyhedra_Library::Grid::simplify().
|
inline |
Normalizes the modulo of the coefficients and of the inhomogeneous term so that they are mutually prime.
Computes the Greatest Common Divisor (GCD) among the coefficients and the inhomogeneous term and normalizes them by the GCD itself.
Definition at line 200 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::normalize().
Referenced by Parma_Polyhedra_Library::Generator_System::add_corresponding_closure_points(), Parma_Polyhedra_Library::Polyhedron::BFT00_poly_hull_assign_if_exact(), Parma_Polyhedra_Library::Generator::closure_point(), Parma_Polyhedra_Library::Polyhedron::drop_some_non_integer_points(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_image(), Parma_Polyhedra_Library::Grid_Generator::grid_point(), Parma_Polyhedra_Library::Grid_Generator::is_equivalent_to(), Parma_Polyhedra_Library::Constraint::is_equivalent_to(), Parma_Polyhedra_Library::Generator::is_equivalent_to(), Parma_Polyhedra_Library::Polyhedron::modify_according_to_evolution(), Parma_Polyhedra_Library::Generator::point(), Parma_Polyhedra_Library::Polyhedron::positive_time_elapse_assign_impl(), Parma_Polyhedra_Library::Grid_Generator::strong_normalize(), Parma_Polyhedra_Library::Generator::strong_normalize(), Parma_Polyhedra_Library::Constraint::strong_normalize(), Parma_Polyhedra_Library::Polyhedron::strongly_minimize_generators(), Parma_Polyhedra_Library::Polyhedron::time_elapse_assign(), and Parma_Polyhedra_Library::Polyhedron::topological_closure_assign().
|
inlineprivate |
Returns the number of zero coefficient in [start, end).
Definition at line 442 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::num_zeroes().
bool Parma_Polyhedra_Library::Linear_Expression::OK | ( | ) | const |
Checks if all the invariants are satisfied.
Definition at line 177 of file Linear_Expression.cc.
References OK().
Referenced by OK().
|
inline |
Assignment operator.
Definition at line 32 of file Linear_Expression_inlines.hh.
References swap().
|
inline |
Permutes the space dimensions of the expression.
cycle | A vector representing a cycle of the permutation according to which the space dimensions must be rearranged. |
The cycle
vector represents a cycle of a permutation of space dimensions. For example, the permutation can be represented by the vector containing
.
Definition at line 220 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::permute_space_dimensions().
Referenced by Parma_Polyhedra_Library::Congruence::permute_space_dimensions().
void Parma_Polyhedra_Library::Linear_Expression::print | ( | ) | const |
Prints *this
to std::cerr
using operator<<
.
|
inline |
Removes all the specified dimensions from the expression.
The space dimension of the variable with the highest space dimension in vars
must be at most the space dimension of this
.
Definition at line 215 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::remove_space_dimensions().
Referenced by Parma_Polyhedra_Library::Constraint::remove_space_dimensions().
|
inline |
Returns the current representation of *this.
Definition at line 44 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::representation().
Referenced by Linear_Expression(), Parma_Polyhedra_Library::Congruence::representation(), Parma_Polyhedra_Library::Constraint::representation(), Parma_Polyhedra_Library::Grid_Generator::representation(), and Parma_Polyhedra_Library::Generator::representation().
|
inlineprivate |
Sets results to the sum of (*this)[i]*y[i], for each i.
Definition at line 494 of file Linear_Expression_inlines.hh.
Referenced by Parma_Polyhedra_Library::Scalar_Products::assign(), Parma_Polyhedra_Library::Scalar_Products::homogeneous_assign(), and Parma_Polyhedra_Library::Scalar_Products::reduced_assign().
|
inlineprivate |
Sets results to the sum of (*this)[i]*y[i], for each i in [start,end).
Definition at line 500 of file Linear_Expression_inlines.hh.
References impl.
|
inlineprivate |
Computes the sign of the sum of (*this)[i]*y[i], for each i.
Definition at line 507 of file Linear_Expression_inlines.hh.
|
inlineprivate |
Computes the sign of the sum of (*this)[i]*y[i], for each i in [start,end).
Definition at line 513 of file Linear_Expression_inlines.hh.
References impl.
|
inlineprivate |
Sets the i-th coefficient to n.
Definition at line 420 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::set().
Referenced by Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::Grid::Grid(), and Parma_Polyhedra_Library::Grid_Generator::is_equivalent_to().
|
inlineprivate |
Sets the coefficient of v to n.
Definition at line 431 of file Linear_Expression_inlines.hh.
References impl, Parma_Polyhedra_Library::Linear_Expression_Interface::set(), and Parma_Polyhedra_Library::Variable::space_dimension().
|
inline |
Sets the coefficient of v
in *this
to n
.
Definition at line 65 of file Linear_Expression_inlines.hh.
Referenced by Parma_Polyhedra_Library::Grid_Generator_System::affine_image(), Parma_Polyhedra_Library::Generator_System::affine_image(), Parma_Polyhedra_Library::Grid::affine_image(), Parma_Polyhedra_Library::Polyhedron::affine_image(), Parma_Polyhedra_Library::Constraint_System::affine_preimage(), Parma_Polyhedra_Library::Grid::affine_preimage(), Parma_Polyhedra_Library::Polyhedron::affine_preimage(), Parma_Polyhedra_Library::Grid::expand_space_dimension(), Parma_Polyhedra_Library::Polyhedron::expand_space_dimension(), Parma_Polyhedra_Library::Polyhedron::modify_according_to_evolution(), Parma_Polyhedra_Library::Grid_Generator::set_divisor(), Parma_Polyhedra_Library::Constraint::set_epsilon_coefficient(), and Parma_Polyhedra_Library::Generator::set_epsilon_coefficient().
|
inline |
Sets the inhomogeneous term of *this
to n
.
Definition at line 76 of file Linear_Expression_inlines.hh.
Referenced by Parma_Polyhedra_Library::Generator::closure_point(), Parma_Polyhedra_Library::Polyhedron::drop_some_non_integer_points(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_preimage(), Parma_Polyhedra_Library::Generator::Generator(), Parma_Polyhedra_Library::Grid_Generator::grid_line(), Parma_Polyhedra_Library::Grid_Generator::grid_point(), Parma_Polyhedra_Library::Generator::line(), Linear_Expression(), Parma_Polyhedra_Library::Grid_Generator::parameter(), Parma_Polyhedra_Library::Generator::point(), Parma_Polyhedra_Library::Polyhedron::positive_time_elapse_assign_impl(), Parma_Polyhedra_Library::Generator::ray(), Parma_Polyhedra_Library::Grid::relation_with(), Parma_Polyhedra_Library::Grid_Generator::set_divisor(), Parma_Polyhedra_Library::Grid::simplify(), and Parma_Polyhedra_Library::Polyhedron::time_elapse_assign().
void Parma_Polyhedra_Library::Linear_Expression::set_representation | ( | Representation | r | ) |
Converts *this to the specified representation.
Definition at line 166 of file Linear_Expression.cc.
References Parma_Polyhedra_Library::swap().
Referenced by Parma_Polyhedra_Library::Congruence::set_representation(), Parma_Polyhedra_Library::Constraint::set_representation(), Parma_Polyhedra_Library::Grid_Generator::set_representation(), and Parma_Polyhedra_Library::Generator::set_representation().
|
inline |
Sets the dimension of the vector space enclosing *this
to n
.
Definition at line 54 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::set_space_dimension().
Referenced by Parma_Polyhedra_Library::Congruence_System::add_unit_rows_and_space_dimensions(), Parma_Polyhedra_Library::Linear_System< Row >::add_universe_rows_and_space_dimensions(), Parma_Polyhedra_Library::Termination_Helpers::all_affine_ranking_functions_PR(), Parma_Polyhedra_Library::Termination_Helpers::all_affine_ranking_functions_PR_original(), Parma_Polyhedra_Library::BD_Shape< T >::BFT00_upper_bound_assign_if_exact(), Parma_Polyhedra_Library::Constraint::Constraint(), Parma_Polyhedra_Library::Grid::conversion(), Parma_Polyhedra_Library::Implementation::Termination::fill_constraint_system_PR(), Parma_Polyhedra_Library::Implementation::Termination::fill_constraint_system_PR_original(), Parma_Polyhedra_Library::Implementation::Termination::fill_constraint_systems_MS(), Parma_Polyhedra_Library::Generator::Generator(), Parma_Polyhedra_Library::Grid::Grid(), Parma_Polyhedra_Library::Grid_Generator::Grid_Generator(), Parma_Polyhedra_Library::Grid::is_universe(), Linear_Expression(), Parma_Polyhedra_Library::Grid::map_space_dimensions(), Parma_Polyhedra_Library::Polyhedron::map_space_dimensions(), Parma_Polyhedra_Library::Polyhedron::minimize(), Parma_Polyhedra_Library::Termination_Helpers::one_affine_ranking_function_PR(), Parma_Polyhedra_Library::Constraint::operator>(), Parma_Polyhedra_Library::Constraint::operator>=(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::Grid_Generator::set_space_dimension(), Parma_Polyhedra_Library::Congruence::set_space_dimension(), Parma_Polyhedra_Library::Constraint::set_space_dimension_no_ok(), Parma_Polyhedra_Library::Generator::set_space_dimension_no_ok(), Parma_Polyhedra_Library::Generator::set_topology(), and Parma_Polyhedra_Library::Constraint::set_topology().
|
inline |
Shift by n
positions the coefficients of variables, starting from the coefficient of v
. This increases the space dimension by n
.
Definition at line 86 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::shift_space_dimensions().
Referenced by Parma_Polyhedra_Library::Congruence::shift_space_dimensions(), Parma_Polyhedra_Library::Constraint::shift_space_dimensions(), Parma_Polyhedra_Library::Grid_Generator::shift_space_dimensions(), and Parma_Polyhedra_Library::Generator::shift_space_dimensions().
|
inline |
Ensures that the first nonzero homogeneous coefficient is positive, by negating the row if necessary.
Definition at line 466 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::sign_normalize().
|
inline |
Returns the dimension of the vector space enclosing *this
.
Definition at line 49 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::space_dimension().
Referenced by Parma_Polyhedra_Library::Grid_Generator_System::affine_image(), Parma_Polyhedra_Library::Generator_System::affine_image(), Parma_Polyhedra_Library::Box< ITV >::affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::affine_image(), Parma_Polyhedra_Library::Grid::affine_image(), Parma_Polyhedra_Library::Polyhedron::affine_image(), Parma_Polyhedra_Library::Congruence::affine_preimage(), Parma_Polyhedra_Library::Constraint_System::affine_preimage(), Parma_Polyhedra_Library::Congruence_System::affine_preimage(), Parma_Polyhedra_Library::Box< ITV >::affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::affine_preimage(), Parma_Polyhedra_Library::Grid::affine_preimage(), Parma_Polyhedra_Library::Polyhedron::affine_preimage(), Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::Artificial_Parameter(), Parma_Polyhedra_Library::Box< ITV >::bounded_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_image(), Parma_Polyhedra_Library::Grid::bounded_affine_image(), Parma_Polyhedra_Library::Polyhedron::bounded_affine_image(), Parma_Polyhedra_Library::Box< ITV >::bounded_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounded_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::bounded_affine_preimage(), Parma_Polyhedra_Library::Grid::bounded_affine_preimage(), Parma_Polyhedra_Library::Polyhedron::bounded_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::bounds(), Parma_Polyhedra_Library::Box< ITV >::bounds(), Parma_Polyhedra_Library::Grid::bounds(), Parma_Polyhedra_Library::Octagonal_Shape< T >::bounds(), Parma_Polyhedra_Library::Polyhedron::bounds(), Parma_Polyhedra_Library::Grid::bounds_no_check(), Parma_Polyhedra_Library::Constraint::Constraint(), Parma_Polyhedra_Library::Congruence::create(), Parma_Polyhedra_Library::Constraint::epsilon_coefficient(), Parma_Polyhedra_Library::Generator::epsilon_coefficient(), Parma_Polyhedra_Library::Box< ITV >::frequency(), Parma_Polyhedra_Library::BD_Shape< T >::frequency(), Parma_Polyhedra_Library::Polyhedron::frequency(), Parma_Polyhedra_Library::Octagonal_Shape< T >::frequency(), Parma_Polyhedra_Library::Grid::frequency(), Parma_Polyhedra_Library::Grid::frequency_no_check(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_image(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_image(), Parma_Polyhedra_Library::Grid::generalized_affine_image(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_image(), Parma_Polyhedra_Library::Box< ITV >::generalized_affine_preimage(), Parma_Polyhedra_Library::BD_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Octagonal_Shape< T >::generalized_affine_preimage(), Parma_Polyhedra_Library::Grid::generalized_affine_preimage(), Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage(), Parma_Polyhedra_Library::Generator::Generator(), Parma_Polyhedra_Library::Grid_Generator::grid_line(), Parma_Polyhedra_Library::Grid_Generator::grid_point(), Parma_Polyhedra_Library::Scalar_Products::homogeneous_assign(), Parma_Polyhedra_Library::Generator::is_matching_closure_point(), Parma_Polyhedra_Library::Linear_Form< C >::Linear_Form(), Parma_Polyhedra_Library::BD_Shape< T >::max_min(), Parma_Polyhedra_Library::Box< ITV >::max_min(), Parma_Polyhedra_Library::Octagonal_Shape< T >::max_min(), Parma_Polyhedra_Library::Polyhedron::max_min(), Parma_Polyhedra_Library::MIP_Problem::MIP_Problem(), Parma_Polyhedra_Library::Polyhedron::modify_according_to_evolution(), Parma_Polyhedra_Library::Grid_Generator::OK(), operator+(), operator-(), Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::operator==(), Parma_Polyhedra_Library::Constraint::operator==(), Parma_Polyhedra_Library::Constraint::operator>=(), Parma_Polyhedra_Library::Grid_Generator::parameter(), Parma_Polyhedra_Library::Grid::reduce_line_with_line(), Parma_Polyhedra_Library::Scalar_Products::reduced_assign(), Parma_Polyhedra_Library::Octagonal_Shape< T >::refine(), Parma_Polyhedra_Library::BD_Shape< T >::refine(), Parma_Polyhedra_Library::Grid::relation_with(), Parma_Polyhedra_Library::Constraint::set_epsilon_coefficient(), Parma_Polyhedra_Library::Generator::set_epsilon_coefficient(), Parma_Polyhedra_Library::MIP_Problem::set_objective_function(), Parma_Polyhedra_Library::Constraint::set_space_dimension_no_ok(), Parma_Polyhedra_Library::Generator::set_space_dimension_no_ok(), Parma_Polyhedra_Library::Generator::set_topology(), Parma_Polyhedra_Library::Constraint::set_topology(), Parma_Polyhedra_Library::Congruence::space_dimension(), Parma_Polyhedra_Library::Box< ITV >::throw_dimension_incompatible(), Parma_Polyhedra_Library::Octagonal_Shape< T >::throw_dimension_incompatible(), Parma_Polyhedra_Library::BD_Shape< T >::throw_dimension_incompatible(), Parma_Polyhedra_Library::Grid::throw_dimension_incompatible(), and Parma_Polyhedra_Library::Polyhedron::throw_dimension_incompatible().
|
inline |
Swaps the coefficients of the variables v1
and v2
.
Definition at line 81 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::swap_space_dimensions().
Referenced by Parma_Polyhedra_Library::Grid_Generator::set_space_dimension(), Parma_Polyhedra_Library::Constraint::set_space_dimension_no_ok(), Parma_Polyhedra_Library::Generator::set_space_dimension_no_ok(), and Parma_Polyhedra_Library::Congruence::swap_space_dimensions().
|
inline |
Returns a lower bound to the total size in bytes of the memory occupied by *this
.
Definition at line 112 of file Linear_Expression_inlines.hh.
References external_memory_in_bytes().
|
inlinestatic |
Returns the (zero-dimension space) constant 0.
Definition at line 101 of file Linear_Expression_inlines.hh.
References zero_p.
Referenced by Parma_Polyhedra_Library::Generator::closure_point(), Parma_Polyhedra_Library::Grid_Generator::grid_point(), Parma_Polyhedra_Library::Congruence::initialize(), Parma_Polyhedra_Library::Constraint::initialize(), and Parma_Polyhedra_Library::Generator::point().
|
related |
Returns the linear expression e
+ n
* v
and assigns it to e
.
|
related |
Sums e2
multiplied by factor
into e1
.
Definition at line 401 of file Linear_Expression_inlines.hh.
|
related |
Definition at line 384 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Linear_Expression_Interface::add_mul_assign(), and impl.
|
friend |
Referenced by Linear_Expression().
|
friend |
Definition at line 401 of file Linear_Expression_inlines.hh.
|
friend |
Definition at line 840 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 836 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 831 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 846 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 834 of file Linear_Expression_defs.hh.
|
related |
The basic comparison function.
The order is a lexicographic. It starts comparing the variables' coefficient, starting from Variable(0), and at the end it compares the inhomogeneous terms.
Definition at line 587 of file Linear_Expression_inlines.hh.
|
friend |
Definition at line 587 of file Linear_Expression_inlines.hh.
|
friend |
Definition at line 823 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 835 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 828 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 829 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 848 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 850 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 852 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 827 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 822 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 826 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 815 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 844 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 833 of file Linear_Expression_defs.hh.
|
related |
Assigns to e
its own negation.
|
related |
Definition at line 378 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::negate().
|
friend |
|
friend |
Definition at line 842 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 837 of file Linear_Expression_defs.hh.
|
related |
Returns the linear expression n
* e
.
|
related |
Returns the linear expression e
* n
.
|
related |
Definition at line 173 of file Linear_Expression_inlines.hh.
|
related |
Definition at line 329 of file Linear_Expression_inlines.hh.
|
friend |
|
friend |
|
related |
Returns the linear expression n
* e
and assigns it to e
.
|
related |
Definition at line 364 of file Linear_Expression_inlines.hh.
References impl.
|
friend |
|
related |
Returns the linear expression e1
+ e2
.
|
related |
Returns the linear expression v
+ w
.
|
related |
Returns the linear expression v
+ e
.
|
related |
Returns the linear expression e
+ v
.
|
related |
Returns the linear expression n
+ e
.
|
related |
Returns the linear expression e
+ n
.
|
related |
Returns the linear expression e
.
|
related |
Definition at line 118 of file Linear_Expression_inlines.hh.
|
related |
Definition at line 124 of file Linear_Expression_inlines.hh.
|
related |
Definition at line 132 of file Linear_Expression_inlines.hh.
|
related |
Definition at line 226 of file Linear_Expression_inlines.hh.
References space_dimension().
|
related |
Definition at line 241 of file Linear_Expression_inlines.hh.
|
related |
Definition at line 247 of file Linear_Expression_inlines.hh.
|
related |
Definition at line 254 of file Linear_Expression_inlines.hh.
References max_space_dimension(), and Parma_Polyhedra_Library::Variable::space_dimension().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
related |
Returns the linear expression e1
+ e2
and assigns it to e1
.
|
related |
Returns the linear expression e
+ v
and assigns it to e
.
std::length_error | Thrown if the space dimension of v exceeds Linear_Expression::max_space_dimension() . |
|
related |
Returns the linear expression e
+ n
and assigns it to e
.
|
related |
Definition at line 181 of file Linear_Expression_inlines.hh.
References impl.
|
related |
Definition at line 336 of file Linear_Expression_inlines.hh.
References impl.
|
related |
Definition at line 343 of file Linear_Expression_inlines.hh.
References impl.
|
friend |
|
friend |
|
friend |
|
related |
Returns the linear expression - e
.
|
related |
Returns the linear expression e1
- e2
.
|
related |
Returns the linear expression v
- w
.
|
related |
Returns the linear expression v
- e
.
|
related |
Returns the linear expression e
- v
.
|
related |
Returns the linear expression n
- e
.
|
related |
Returns the linear expression e
- n
.
|
related |
Definition at line 140 of file Linear_Expression_inlines.hh.
|
related |
Definition at line 148 of file Linear_Expression_inlines.hh.
References max_space_dimension(), and Parma_Polyhedra_Library::Variable::space_dimension().
|
related |
Definition at line 278 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::neg_assign().
|
related |
Definition at line 286 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::neg_assign(), and space_dimension().
|
related |
Definition at line 302 of file Linear_Expression_inlines.hh.
References negate(), Parma_Polyhedra_Library::Variable::space_dimension(), and space_dimension().
|
related |
Definition at line 311 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::Variable::space_dimension(), and space_dimension().
|
related |
Definition at line 319 of file Linear_Expression_inlines.hh.
References Parma_Polyhedra_Library::neg_assign().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
related |
Returns the linear expression e1
- e2
and assigns it to e1
.
|
related |
Returns the linear expression e
- v
and assigns it to e
.
std::length_error | Thrown if the space dimension of v exceeds Linear_Expression::max_space_dimension() . |
|
related |
Returns the linear expression e
- n
and assigns it to e
.
|
related |
Definition at line 188 of file Linear_Expression_inlines.hh.
References impl.
|
related |
Definition at line 350 of file Linear_Expression_inlines.hh.
References impl.
|
related |
Definition at line 357 of file Linear_Expression_inlines.hh.
References impl.
|
friend |
|
friend |
|
friend |
|
related |
Returns the linear expression n
/ e
and assigns it to e
.
|
related |
Definition at line 371 of file Linear_Expression_inlines.hh.
References impl.
|
friend |
|
related |
Output operator.
|
related |
Definition at line 822 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::print().
|
friend |
|
friend |
Definition at line 830 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 825 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 824 of file Linear_Expression_defs.hh.
|
friend |
Definition at line 832 of file Linear_Expression_defs.hh.
|
related |
Subtracts e2
multiplied by factor
from e1
.
Definition at line 408 of file Linear_Expression_inlines.hh.
|
related |
Returns the linear expression e
- n
* v
and assigns it to e
.
|
related |
Definition at line 393 of file Linear_Expression_inlines.hh.
References impl, and Parma_Polyhedra_Library::Linear_Expression_Interface::sub_mul_assign().
|
friend |
|
friend |
Definition at line 408 of file Linear_Expression_inlines.hh.
|
related |
Definition at line 831 of file Linear_Expression_inlines.hh.
References m_swap().
|
related |
|
friend |
Definition at line 838 of file Linear_Expression_defs.hh.
|
static |
Definition at line 291 of file Linear_Expression_defs.hh.
|
private |
Definition at line 656 of file Linear_Expression_defs.hh.
Referenced by add_mul_assign(), Parma_Polyhedra_Library::add_mul_assign(), all_homogeneous_terms_are_zero(), all_zeroes(), all_zeroes_except(), ascii_dump(), ascii_load(), begin(), coefficient(), Parma_Polyhedra_Library::compare(), end(), external_memory_in_bytes(), gcd(), get(), have_a_common_variable(), inhomogeneous_term(), is_equal_to(), is_zero(), last_nonzero(), linear_combine(), linear_combine_lax(), Linear_Expression(), lower_bound(), m_swap(), neg_assign(), negate(), normalize(), num_zeroes(), operator*=(), operator+=(), operator-=(), operator/=(), operator<<(), permute_space_dimensions(), remove_space_dimensions(), representation(), scalar_product_assign(), scalar_product_sign(), set(), set_space_dimension(), shift_space_dimensions(), sign_normalize(), space_dimension(), sub_mul_assign(), Parma_Polyhedra_Library::sub_mul_assign(), swap_space_dimensions(), and ~Linear_Expression().
|
staticprivate |
Holds (between class initialization and finalization) a pointer to the (zero-dimension space) constant 0.
Definition at line 654 of file Linear_Expression_defs.hh.
Referenced by zero().