Public Member Functions | Related Functions

Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter Class Reference

Artificial parameters in PIP solution trees. More...

#include <ppl.hh>

Inherits Parma_Polyhedra_Library::Linear_Expression.

List of all members.

Public Member Functions

 Artificial_Parameter ()
 Default constructor: builds a zero artificial parameter.
 Artificial_Parameter (const Linear_Expression &expr, Coefficient_traits::const_reference den)
 Constructor.
 Artificial_Parameter (const Artificial_Parameter &y)
 Copy constructor.
Coefficient_traits::const_reference denominator () const
 Returns the normalized (i.e., positive) denominator.
void 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.
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.

Related Functions

(Note that these are not member functions.)


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

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  den 
) [inline]

Constructor.

Builds artificial parameter $\frac{\mathit{expr}}{\mathit{den}}$.

Parameters:
expr The expression that, after normalization, will form the numerator of the artificial parameter.
den The integer constant thatm after normalization, will form the denominator of the artificial parameter.
Exceptions:
std::invalid_argument Thrown if den 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

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: