PPL  1.2
Parma_Polyhedra_Library::Linear_Expression_Interface Class Referenceabstract

A linear expression. More...

#include <Linear_Expression_Interface_defs.hh>

Inheritance diagram for Parma_Polyhedra_Library::Linear_Expression_Interface:

Classes

class  const_iterator_interface
 

Public Member Functions

virtual ~Linear_Expression_Interface ()
 
virtual bool OK () const =0
 
virtual Representation representation () const =0
 Returns the current representation of this linear expression. More...
 
virtual const_iterator_interfacebegin () const =0
 
virtual const_iterator_interfaceend () const =0
 
virtual const_iterator_interfacelower_bound (Variable v) const =0
 
virtual dimension_type space_dimension () const =0
 Returns the dimension of the vector space enclosing *this. More...
 
virtual void set_space_dimension (dimension_type n)=0
 Sets the dimension of the vector space enclosing *this to n . More...
 
virtual Coefficient_traits::const_reference coefficient (Variable v) const =0
 Returns the coefficient of v in *this. More...
 
virtual void set_coefficient (Variable v, Coefficient_traits::const_reference n)=0
 Sets the coefficient of v in *this to n. More...
 
virtual Coefficient_traits::const_reference inhomogeneous_term () const =0
 Returns the inhomogeneous term of *this. More...
 
virtual void set_inhomogeneous_term (Coefficient_traits::const_reference n)=0
 Sets the inhomogeneous term of *this to n. More...
 
virtual void linear_combine (const Linear_Expression_Interface &y, Variable v)=0
 
virtual void linear_combine (const Linear_Expression_Interface &y, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2)=0
 
virtual void linear_combine_lax (const Linear_Expression_Interface &y, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2)=0
 
virtual void swap_space_dimensions (Variable v1, Variable v2)=0
 Swaps the coefficients of the variables v1 and v2 . More...
 
virtual void remove_space_dimensions (const Variables_Set &vars)=0
 Removes all the specified dimensions from the expression. More...
 
virtual void shift_space_dimensions (Variable v, dimension_type n)=0
 
virtual void permute_space_dimensions (const std::vector< Variable > &cycle)=0
 Permutes the space dimensions of the expression. More...
 
virtual bool is_zero () const =0
 Returns true if and only if *this is $0$. More...
 
virtual bool all_homogeneous_terms_are_zero () const =0
 Returns true if and only if all the homogeneous terms of *this are $0$. More...
 
virtual memory_size_type total_memory_in_bytes () const =0
 Returns a lower bound to the total size in bytes of the memory occupied by *this. More...
 
virtual memory_size_type external_memory_in_bytes () const =0
 Returns the size in bytes of the memory managed by *this. More...
 
virtual void ascii_dump (std::ostream &s) const =0
 Writes to s an ASCII representation of *this. More...
 
virtual bool ascii_load (std::istream &s)=0
 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...
 
virtual bool is_equal_to (const Linear_Expression_Interface &x) const =0
 
virtual void normalize ()=0
 
virtual void sign_normalize ()=0
 
virtual void negate (dimension_type first, dimension_type last)=0
 Negates the elements from index first (included) to index last (excluded). More...
 
virtual Linear_Expression_Interfaceoperator+= (Coefficient_traits::const_reference n)=0
 
virtual Linear_Expression_Interfaceoperator-= (Coefficient_traits::const_reference n)=0
 
virtual Linear_Expression_Interfaceoperator+= (const Linear_Expression_Interface &e2)=0
 
virtual Linear_Expression_Interfaceoperator+= (const Variable v)=0
 
virtual Linear_Expression_Interfaceoperator-= (const Linear_Expression_Interface &e2)=0
 
virtual Linear_Expression_Interfaceoperator-= (const Variable v)=0
 
virtual Linear_Expression_Interfaceoperator*= (Coefficient_traits::const_reference n)=0
 
virtual Linear_Expression_Interfaceoperator/= (Coefficient_traits::const_reference n)=0
 
virtual void negate ()=0
 
virtual Linear_Expression_Interfaceadd_mul_assign (Coefficient_traits::const_reference n, const Variable v)=0
 
virtual Linear_Expression_Interfacesub_mul_assign (Coefficient_traits::const_reference n, const Variable v)=0
 
virtual void add_mul_assign (Coefficient_traits::const_reference factor, const Linear_Expression_Interface &e2)=0
 
virtual void sub_mul_assign (Coefficient_traits::const_reference factor, const Linear_Expression_Interface &e2)=0
 
virtual void print (std::ostream &s) const =0
 
virtual bool all_zeroes (const Variables_Set &vars) const =0
 Returns true if the coefficient of each variable in vars[i] is $0$. More...
 
virtual bool have_a_common_variable (const Linear_Expression_Interface &x, Variable first, Variable last) const =0
 
virtual Coefficient_traits::const_reference get (dimension_type i) const =0
 Returns the i-th coefficient. More...
 
virtual void set (dimension_type i, Coefficient_traits::const_reference n)=0
 Sets the i-th coefficient to n. More...
 
virtual bool all_zeroes (dimension_type start, dimension_type end) const =0
 Returns true if (*this)[i] is $0$, for each i in [start, end). More...
 
virtual dimension_type num_zeroes (dimension_type start, dimension_type end) const =0
 Returns the number of zero coefficient in [start, end). More...
 
virtual Coefficient gcd (dimension_type start, dimension_type end) const =0
 Returns the gcd of the nonzero coefficients in [start,end). If all the coefficients in this range are 0 returns 0. More...
 
virtual void exact_div_assign (Coefficient_traits::const_reference c, dimension_type start, dimension_type end)=0
 
virtual void mul_assign (Coefficient_traits::const_reference n, dimension_type start, dimension_type end)=0
 Equivalent to (*this)[i] *= n, for each i in [start, end). More...
 
virtual void linear_combine (const Linear_Expression_Interface &y, dimension_type i)=0
 
virtual void linear_combine (const Linear_Expression_Interface &y, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2, dimension_type start, dimension_type end)=0
 
virtual void linear_combine_lax (const Linear_Expression_Interface &y, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2, dimension_type start, dimension_type end)=0
 
virtual dimension_type last_nonzero () const =0
 
virtual dimension_type last_nonzero (dimension_type first, dimension_type last) const =0
 
virtual dimension_type first_nonzero (dimension_type first, dimension_type last) const =0
 
virtual bool all_zeroes_except (const Variables_Set &vars, dimension_type start, dimension_type end) const =0
 Returns true if each coefficient in [start,end) is *not* in $0$, disregarding coefficients of variables in vars. More...
 
virtual void scalar_product_assign (Coefficient &result, const Linear_Expression_Interface &y, dimension_type start, dimension_type end) const =0
 Sets results to the sum of (*this)[i]*y[i], for each i in [start,end). More...
 
virtual int scalar_product_sign (const Linear_Expression_Interface &y, dimension_type start, dimension_type end) const =0
 
virtual void has_a_free_dimension_helper (std::set< dimension_type > &x) const =0
 Removes from the set x all the indexes of nonzero elements of *this. More...
 
virtual bool is_equal_to (const Linear_Expression_Interface &x, dimension_type start, dimension_type end) const =0
 Returns true if (*this)[i] is equal to x[i], for each i in [start,end). More...
 
virtual bool is_equal_to (const Linear_Expression_Interface &x, Coefficient_traits::const_reference c1, Coefficient_traits::const_reference c2, dimension_type start, dimension_type end) const =0
 
virtual void get_row (Dense_Row &r) const =0
 Sets r to a copy of the row that implements *this. More...
 
virtual void get_row (Sparse_Row &r) const =0
 Sets r to a copy of the row that implements *this. More...
 

Related Functions

(Note that these are not member functions.)

virtual int compare (const Linear_Expression_Interface &y) const =0
 The basic comparison function. More...
 

Detailed Description

A linear expression.

An object of a class implementing Linear_Expression_Interface represents a linear expression

\[ \sum_{i=0}^{n-1} a_i x_i + b \]

where $n$ is the dimension of the vector space, each $a_i$ is the integer coefficient of the $i$-th variable $x_i$ and $b$ is the integer for the inhomogeneous term.

Definition at line 51 of file Linear_Expression_Interface_defs.hh.

Constructor & Destructor Documentation

Parma_Polyhedra_Library::Linear_Expression_Interface::~Linear_Expression_Interface ( )
virtual

Definition at line 30 of file Linear_Expression_Interface.cc.

30  {
31 }

Member Function Documentation

virtual Linear_Expression_Interface& Parma_Polyhedra_Library::Linear_Expression_Interface::add_mul_assign ( Coefficient_traits::const_reference  n,
const Variable  v 
)
pure virtual
virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::add_mul_assign ( Coefficient_traits::const_reference  factor,
const Linear_Expression_Interface e2 
)
pure virtual
virtual bool Parma_Polyhedra_Library::Linear_Expression_Interface::all_homogeneous_terms_are_zero ( ) const
pure virtual
virtual bool Parma_Polyhedra_Library::Linear_Expression_Interface::all_zeroes ( const Variables_Set vars) const
pure virtual
virtual bool Parma_Polyhedra_Library::Linear_Expression_Interface::all_zeroes ( dimension_type  start,
dimension_type  end 
) const
pure virtual
virtual bool Parma_Polyhedra_Library::Linear_Expression_Interface::all_zeroes_except ( const Variables_Set vars,
dimension_type  start,
dimension_type  end 
) const
pure virtual
virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::ascii_dump ( std::ostream &  s) const
pure virtual

Writes to s an ASCII representation of *this.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::ascii_dump().

virtual bool Parma_Polyhedra_Library::Linear_Expression_Interface::ascii_load ( std::istream &  s)
pure virtual

Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this accordingly. Returns true if successful, false otherwise.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::ascii_load().

virtual const_iterator_interface* Parma_Polyhedra_Library::Linear_Expression_Interface::begin ( ) const
pure virtual

This returns a pointer to dynamic-allocated memory. The caller has the duty to free the memory when it's not needed anymore.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::begin().

virtual Coefficient_traits::const_reference Parma_Polyhedra_Library::Linear_Expression_Interface::coefficient ( Variable  v) const
pure virtual
virtual const_iterator_interface* Parma_Polyhedra_Library::Linear_Expression_Interface::end ( ) const
pure virtual

This returns a pointer to dynamic-allocated memory. The caller has the duty to free the memory when it's not needed anymore.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::end().

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::exact_div_assign ( Coefficient_traits::const_reference  c,
dimension_type  start,
dimension_type  end 
)
pure virtual
virtual memory_size_type Parma_Polyhedra_Library::Linear_Expression_Interface::external_memory_in_bytes ( ) const
pure virtual

Returns the size in bytes of the memory managed by *this.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual dimension_type Parma_Polyhedra_Library::Linear_Expression_Interface::first_nonzero ( dimension_type  first,
dimension_type  last 
) const
pure virtual
virtual Coefficient Parma_Polyhedra_Library::Linear_Expression_Interface::gcd ( dimension_type  start,
dimension_type  end 
) const
pure virtual
virtual Coefficient_traits::const_reference Parma_Polyhedra_Library::Linear_Expression_Interface::get ( dimension_type  i) const
pure virtual
virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::get_row ( Dense_Row r) const
pure virtual

Sets r to a copy of the row that implements *this.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::get_row ( Sparse_Row r) const
pure virtual

Sets r to a copy of the row that implements *this.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::has_a_free_dimension_helper ( std::set< dimension_type > &  x) const
pure virtual
virtual bool Parma_Polyhedra_Library::Linear_Expression_Interface::have_a_common_variable ( const Linear_Expression_Interface x,
Variable  first,
Variable  last 
) const
pure virtual

Returns true if there is a variable in [first,last) whose coefficient is nonzero in both *this and x.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual Coefficient_traits::const_reference Parma_Polyhedra_Library::Linear_Expression_Interface::inhomogeneous_term ( ) const
pure virtual
virtual bool Parma_Polyhedra_Library::Linear_Expression_Interface::is_equal_to ( const Linear_Expression_Interface x) const
pure virtual

Returns true if *this is equal to x. Note that (*this == x) has a completely different meaning.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::is_equal_to().

virtual bool Parma_Polyhedra_Library::Linear_Expression_Interface::is_equal_to ( const Linear_Expression_Interface x,
dimension_type  start,
dimension_type  end 
) const
pure virtual

Returns true if (*this)[i] is equal to x[i], for each i in [start,end).

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual bool Parma_Polyhedra_Library::Linear_Expression_Interface::is_equal_to ( const Linear_Expression_Interface x,
Coefficient_traits::const_reference  c1,
Coefficient_traits::const_reference  c2,
dimension_type  start,
dimension_type  end 
) const
pure virtual

Returns true if (*this)[i]*c1 is equal to x[i]*c2, for each i in [start,end).

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual dimension_type Parma_Polyhedra_Library::Linear_Expression_Interface::last_nonzero ( ) const
pure virtual
virtual dimension_type Parma_Polyhedra_Library::Linear_Expression_Interface::last_nonzero ( dimension_type  first,
dimension_type  last 
) const
pure virtual
virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::linear_combine ( const Linear_Expression_Interface y,
Variable  v 
)
pure virtual

Linearly combines *this with y so that the coefficient of v is 0.

Parameters
yThe expression that will be combined with *this object;
vThe variable whose coefficient has to become $0$.

Computes a linear combination of *this and y having the coefficient of variable v equal to $0$. Then it assigns the resulting expression to *this.

*this and y must have the same space dimension.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::linear_combine().

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::linear_combine ( const Linear_Expression_Interface y,
Coefficient_traits::const_reference  c1,
Coefficient_traits::const_reference  c2 
)
pure virtual

Equivalent to *this = *this * c1 + y * c2, but assumes that *this and y have the same space dimension.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::linear_combine ( const Linear_Expression_Interface y,
dimension_type  i 
)
pure virtual

Linearly combines *this with y so that the coefficient of v is 0.

Parameters
yThe expression that will be combined with *this object;
iThe index of the coefficient that has to become $0$.

Computes a linear combination of *this and y having the i-th coefficient equal to $0$. Then it assigns the resulting expression to *this.

*this and y must have the same space dimension.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::linear_combine ( const Linear_Expression_Interface y,
Coefficient_traits::const_reference  c1,
Coefficient_traits::const_reference  c2,
dimension_type  start,
dimension_type  end 
)
pure virtual

Equivalent to (*this)[i] = (*this)[i] * c1 + y[i] * c2, for each i in [start, end).

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::linear_combine_lax ( const Linear_Expression_Interface y,
Coefficient_traits::const_reference  c1,
Coefficient_traits::const_reference  c2 
)
pure virtual

Equivalent to *this = *this * c1 + y * c2. c1 and c2 may be 0.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::linear_combine_lax().

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::linear_combine_lax ( const Linear_Expression_Interface y,
Coefficient_traits::const_reference  c1,
Coefficient_traits::const_reference  c2,
dimension_type  start,
dimension_type  end 
)
pure virtual

Equivalent to (*this)[i] = (*this)[i] * c1 + y[i] * c2, for each i in [start, end). c1 and c2 may be zero.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual const_iterator_interface* Parma_Polyhedra_Library::Linear_Expression_Interface::lower_bound ( Variable  v) const
pure virtual

This returns a pointer to dynamic-allocated memory. The caller has the duty to free the memory when it's not needed anymore. Returns (a pointer to) an iterator that points to the first nonzero coefficient of a variable greater than or equal to v, or at end if no such coefficient exists.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::lower_bound().

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::mul_assign ( Coefficient_traits::const_reference  n,
dimension_type  start,
dimension_type  end 
)
pure virtual

Equivalent to (*this)[i] *= n, for each i in [start, end).

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::negate ( dimension_type  first,
dimension_type  last 
)
pure virtual

Negates the elements from index first (included) to index last (excluded).

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::neg_assign(), and Parma_Polyhedra_Library::Linear_Expression::negate().

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::negate ( )
pure virtual
virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::normalize ( )
pure virtual

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.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::normalize().

virtual Linear_Expression_Interface& Parma_Polyhedra_Library::Linear_Expression_Interface::operator*= ( Coefficient_traits::const_reference  n)
pure virtual
virtual Linear_Expression_Interface& Parma_Polyhedra_Library::Linear_Expression_Interface::operator+= ( Coefficient_traits::const_reference  n)
pure virtual
virtual Linear_Expression_Interface& Parma_Polyhedra_Library::Linear_Expression_Interface::operator+= ( const Linear_Expression_Interface e2)
pure virtual
virtual Linear_Expression_Interface& Parma_Polyhedra_Library::Linear_Expression_Interface::operator+= ( const Variable  v)
pure virtual
virtual Linear_Expression_Interface& Parma_Polyhedra_Library::Linear_Expression_Interface::operator-= ( Coefficient_traits::const_reference  n)
pure virtual
virtual Linear_Expression_Interface& Parma_Polyhedra_Library::Linear_Expression_Interface::operator-= ( const Linear_Expression_Interface e2)
pure virtual
virtual Linear_Expression_Interface& Parma_Polyhedra_Library::Linear_Expression_Interface::operator-= ( const Variable  v)
pure virtual
virtual Linear_Expression_Interface& Parma_Polyhedra_Library::Linear_Expression_Interface::operator/= ( Coefficient_traits::const_reference  n)
pure virtual
virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::permute_space_dimensions ( const std::vector< Variable > &  cycle)
pure virtual

Permutes the space dimensions of the expression.

Parameters
cycleA 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 $ \{ x_1 \mapsto x_2, x_2 \mapsto x_3, x_3 \mapsto x_1 \}$ can be represented by the vector containing $ x_1, x_2, x_3 $.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::permute_space_dimensions().

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::print ( std::ostream &  s) const
pure virtual
virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::remove_space_dimensions ( const Variables_Set vars)
pure virtual

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.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >, Parma_Polyhedra_Library::Linear_Expression_Impl< Row >, Parma_Polyhedra_Library::Linear_Expression_Impl< Row >, Parma_Polyhedra_Library::Linear_Expression_Impl< Row >, and Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::remove_space_dimensions().

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::scalar_product_assign ( Coefficient result,
const Linear_Expression_Interface y,
dimension_type  start,
dimension_type  end 
) const
pure virtual

Sets results to the sum of (*this)[i]*y[i], for each i in [start,end).

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual int Parma_Polyhedra_Library::Linear_Expression_Interface::scalar_product_sign ( const Linear_Expression_Interface y,
dimension_type  start,
dimension_type  end 
) const
pure virtual

Computes the sign of the sum of (*this)[i]*y[i], for each i in [start,end).

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::set ( dimension_type  i,
Coefficient_traits::const_reference  n 
)
pure virtual
virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::set_coefficient ( Variable  v,
Coefficient_traits::const_reference  n 
)
pure virtual

Sets the coefficient of v in *this to n.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::set_inhomogeneous_term ( Coefficient_traits::const_reference  n)
pure virtual

Sets the inhomogeneous term of *this to n.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::set_space_dimension ( dimension_type  n)
pure virtual

Sets the dimension of the vector space enclosing *this to n .

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::set_space_dimension().

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::shift_space_dimensions ( Variable  v,
dimension_type  n 
)
pure virtual

Shift by n positions the coefficients of variables, starting from the coefficient of v. This increases the space dimension by n.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::shift_space_dimensions().

virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::sign_normalize ( )
pure virtual

Ensures that the first nonzero homogeneous coefficient is positive, by negating the row if necessary.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::sign_normalize().

virtual dimension_type Parma_Polyhedra_Library::Linear_Expression_Interface::space_dimension ( ) const
pure virtual

Returns the dimension of the vector space enclosing *this.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::space_dimension().

virtual Linear_Expression_Interface& Parma_Polyhedra_Library::Linear_Expression_Interface::sub_mul_assign ( Coefficient_traits::const_reference  n,
const Variable  v 
)
pure virtual
virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::sub_mul_assign ( Coefficient_traits::const_reference  factor,
const Linear_Expression_Interface e2 
)
pure virtual
virtual void Parma_Polyhedra_Library::Linear_Expression_Interface::swap_space_dimensions ( Variable  v1,
Variable  v2 
)
pure virtual

Swaps the coefficients of the variables v1 and v2 .

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::swap_space_dimensions().

virtual memory_size_type Parma_Polyhedra_Library::Linear_Expression_Interface::total_memory_in_bytes ( ) const
pure virtual

Returns a lower bound to the total size in bytes of the memory occupied by *this.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::Linear_Expression::external_memory_in_bytes().

Friends And Related Function Documentation

virtual int compare ( const Linear_Expression_Interface y) const
related

The basic comparison function.

Returns
-1 or -2 if x is less than y, 0 if they are equal and 1 or 2 is y is greater. The absolute value of the result is 1 if the difference is only in the inhomogeneous terms, 2 otherwise

The order is a lexicographic. It starts comparing the variables' coefficient, starting from Variable(0), and at the end it compares the inhomogeneous terms.

Implemented in Parma_Polyhedra_Library::Linear_Expression_Impl< Row >.

Referenced by Parma_Polyhedra_Library::compare().


The documentation for this class was generated from the following files: