PPL  1.2
Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter Class Reference

Artificial parameters in PIP solution trees. More...

#include <ppl.hh>

Inheritance diagram for Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter:

Public Member Functions

 Artificial_Parameter ()
 Default constructor: builds a zero artificial parameter.
 
 Artificial_Parameter (const Linear_Expression &expr, Coefficient_traits::const_reference d)
 Constructor. More...
 
 Artificial_Parameter (const Artificial_Parameter &y)
 Copy constructor.
 
Coefficient_traits::const_reference denominator () const
 Returns the normalized (i.e., positive) denominator.
 
void m_swap (Artificial_Parameter &y)
 Swaps *this with y.
 
bool operator== (const Artificial_Parameter &y) const
 Returns true if and only if *this and y are equal. More...
 
bool operator!= (const Artificial_Parameter &y) const
 Returns true if and only if *this and y are different.
 
void ascii_dump () const
 Writes to std::cerr an ASCII representation of *this.
 
void ascii_dump (std::ostream &s) const
 Writes to s an ASCII representation of *this.
 
void print () const
 Prints *this to std::cerr using operator<<.
 
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.
 
memory_size_type total_memory_in_bytes () const
 Returns the total size in bytes of the memory occupied by *this.
 
memory_size_type external_memory_in_bytes () const
 Returns the size in bytes of the memory managed by *this.
 
bool OK () const
 Returns true if and only if the parameter is well-formed.
 
- Public Member Functions inherited from Parma_Polyhedra_Library::Linear_Expression
 Linear_Expression (Representation r=default_representation)
 Default constructor: returns a copy of Linear_Expression::zero().
 
 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.
 
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.
 
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.
 
Linear_Expressionoperator= (const Linear_Expression &e)
 Assignment operator.
 
 ~Linear_Expression ()
 Destructor.
 
 Linear_Expression (Coefficient_traits::const_reference n, Representation r=default_representation)
 Builds the linear expression corresponding to the inhomogeneous term n.
 
 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.
 
void set_representation (Representation r)
 Converts *this to the specified representation.
 
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.
 
void set_space_dimension (dimension_type n)
 Sets the dimension of the vector space enclosing *this to n .
 
Coefficient_traits::const_reference coefficient (Variable v) const
 Returns the coefficient of v in *this.
 
void set_coefficient (Variable v, Coefficient_traits::const_reference n)
 Sets the coefficient of v in *this to n.
 
Coefficient_traits::const_reference inhomogeneous_term () const
 Returns the inhomogeneous term of *this.
 
void set_inhomogeneous_term (Coefficient_traits::const_reference n)
 Sets the inhomogeneous term of *this to n.
 
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 .
 
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 $0$.
 
bool all_homogeneous_terms_are_zero () const
 Returns true if and only if all the homogeneous terms of *this are $0$.
 
memory_size_type total_memory_in_bytes () const
 Returns a lower bound to the total size in bytes of the memory occupied by *this.
 
memory_size_type external_memory_in_bytes () const
 Returns the size in bytes of the memory managed by *this.
 
bool OK () const
 Checks if all the invariants are satisfied.
 
void ascii_dump () const
 Writes to std::cerr an ASCII representation of *this.
 
void ascii_dump (std::ostream &s) const
 Writes to s an ASCII representation of *this.
 
void print () const
 Prints *this to std::cerr using operator<<.
 
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.
 
void m_swap (Linear_Expression &y)
 Swaps *this with y.
 
 Linear_Expression (const Linear_Expression &e, dimension_type space_dim)
 Copy constructor with a specified space dimension.
 
 Linear_Expression (const Linear_Expression &e, dimension_type space_dim, Representation r)
 Copy constructor with a specified space dimension and representation.
 
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 $0$.
 

Related Functions

(Note that these are not member functions.)

void swap (PIP_Tree_Node::Artificial_Parameter &x, PIP_Tree_Node::Artificial_Parameter &y)
 Swaps x with y. More...
 
std::ostream & operator<< (std::ostream &os, const PIP_Tree_Node::Artificial_Parameter &x)
 Output operator. More...
 
void swap (PIP_Tree_Node::Artificial_Parameter &x, PIP_Tree_Node::Artificial_Parameter &y)
 

Additional Inherited Members

- Static Public Member Functions inherited from Parma_Polyhedra_Library::Linear_Expression
static dimension_type max_space_dimension ()
 Returns the maximum space dimension a Linear_Expression can handle.
 
static void initialize ()
 Initializes the class.
 
static void finalize ()
 Finalizes the class.
 
static const Linear_Expressionzero ()
 Returns the (zero-dimension space) constant 0.
 

Detailed Description

Artificial parameters in PIP solution trees.

These parameters are built from a linear expression combining other parameters (constant term included) divided by a positive integer denominator. Coefficients at variables indices corresponding to PIP problem variables are always zero.

Constructor & Destructor Documentation

Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::Artificial_Parameter ( const Linear_Expression expr,
Coefficient_traits::const_reference  d 
)

Constructor.

Builds artificial parameter $\frac{\mathtt{expr}}{\mathtt{d}}$.

Parameters
exprThe expression that, after normalization, will form the numerator of the artificial parameter.
dThe integer constant that, after normalization, will form the denominator of the artificial parameter.
Exceptions
std::invalid_argumentThrown if d is zero.

Normalization will ensure that the denominator is positive.

Member Function Documentation

bool Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::operator== ( const Artificial_Parameter y) const

Returns true if and only if *this and y are equal.

Note that two artificial parameters having different space dimensions are considered to be different.

Friends And Related Function Documentation

Swaps x with y.

std::ostream & operator<< ( std::ostream &  os,
const PIP_Tree_Node::Artificial_Parameter x 
)
related

Output operator.


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