PPL
0.12.1
|
Artificial parameters in PIP solution trees. More...
#include <ppl.hh>
Public Member Functions | |
Artificial_Parameter () | |
Default constructor: builds a zero artificial parameter. | |
Artificial_Parameter (const Linear_Expression &expr, Coefficient_traits::const_reference d) | |
Constructor. | |
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. | |
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.) | |
void | swap (PIP_Tree_Node::Artificial_Parameter &x, PIP_Tree_Node::Artificial_Parameter &y) |
Swaps x with y . | |
std::ostream & | operator<< (std::ostream &os, const PIP_Tree_Node::Artificial_Parameter &x) |
Output operator. | |
void | swap (PIP_Tree_Node::Artificial_Parameter &x, PIP_Tree_Node::Artificial_Parameter &y) |
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.
Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::Artificial_Parameter | ( | const Linear_Expression & | expr, |
Coefficient_traits::const_reference | d | ||
) |
Constructor.
Builds artificial parameter .
expr | The expression that, after normalization, will form the numerator of the artificial parameter. |
d | The integer constant that, after normalization, will form the denominator of the artificial parameter. |
std::invalid_argument | Thrown if d is zero. |
Normalization will ensure that the denominator is positive.
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.
|
related |
Swaps x
with y
.
|
related |
Output operator.
|
related |