# Parma_Polyhedra_Library::PIP_Solution_Node Class Reference

A tree node representing part of the space of solutions. More...

`#include <ppl.hh>`

Inherits Parma_Polyhedra_Library::PIP_Tree_Node.

List of all members.

## Classes
struct | No_Constraints
| A tag type to select the alternative copy constructor. More...
## Public Member Functions
| PIP_Solution_Node (const PIP_Problem *owner)
| Constructor: builds a solution node owned by `*owner`.
virtual PIP_Tree_Node * | clone () const
| Returns a pointer to a dynamically-allocated copy of `*this`.
virtual | ~PIP_Solution_Node ()
| Destructor.
virtual bool | OK () const
| Returns `true` if and only if `*this` is well formed.
virtual const PIP_Solution_Node * | as_solution () const
| Returns `this`.
const Linear_Expression & | parametric_values (Variable var) const
| Returns a parametric expression for the values of problem variable `var`.
void | ascii_dump (std::ostream &s) const
| Dumps to `s` an ASCII representation of `*this`.
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.
virtual memory_size_type | total_memory_in_bytes () const
| Returns the total size in bytes of the memory occupied by `*this`.
virtual memory_size_type | external_memory_in_bytes () const
| Returns the size in bytes of the memory managed by `*this`.
## Protected Member Functions
| PIP_Solution_Node (const PIP_Solution_Node &y)
| Copy constructor.
| PIP_Solution_Node (const PIP_Solution_Node &y, No_Constraints)
| Alternative copy constructor.
virtual void | set_owner (const PIP_Problem *owner)
| Sets the pointer to the PIP_Problem owning object.
virtual bool | check_ownership (const PIP_Problem *owner) const
| Returns `true` if and only if all the nodes in the subtree rooted in `*this` is owned by `*pip`.
virtual void | update_tableau (const PIP_Problem &pip, dimension_type external_space_dim, dimension_type first_pending_constraint, const Constraint_Sequence &input_cs, const Variables_Set &parameters)
| Implements pure virtual method PIP_Tree_Node::update_tableau.
void | update_solution (const std::vector< bool > &pip_dim_is_param) const
| Update the solution values.
void | update_solution () const
| Helper method.
virtual PIP_Tree_Node * | solve (const PIP_Problem &pip, bool check_feasible_context, const Matrix &context, const Variables_Set &params, dimension_type space_dim, unsigned indent_level)
| Implements pure virtual method PIP_Tree_Node::solve.
void | generate_cut (dimension_type i, Variables_Set &parameters, Matrix &context, dimension_type &space_dimension, unsigned indent_level)
| Generate a Gomory cut using non-integer tableau row `i`.
virtual void | print_tree (std::ostream &s, unsigned indent, const std::vector< bool > &pip_dim_is_param, dimension_type first_art_dim) const
| Prints on `s` the tree rooted in `*this`.

## Detailed Description

A tree node representing part of the space of solutions.

## Constructor & Destructor Documentation

Parma_Polyhedra_Library::PIP_Solution_Node::PIP_Solution_Node | ( | const PIP_Solution_Node & | y,
|  | No_Constraints |  |
| ) |  |  | `[protected]`

Alternative copy constructor.

This constructor differs from the default copy constructor in that it will not copy the constraint system, nor the artificial parameters.

## Member Function Documentation

const Linear_Expression& Parma_Polyhedra_Library::PIP_Solution_Node::parametric_values | ( | Variable | var | ) | const

Returns a parametric expression for the values of problem variable `var`.

The returned linear expression may involve problem parameters as well as artificial parameters.

Parameters:

  | var | The problem variable which is queried about.

Exceptions:

  | std::invalid_argument | Thrown if `var` is dimension-incompatible with the PIP_Problem owning this solution node, or if `var` is a problem parameter.

void Parma_Polyhedra_Library::PIP_Solution_Node::update_solution | ( | const std::vector< bool > & | pip_dim_is_param | ) | const`[protected]`

Update the solution values.

Parameters:

  | pip_dim_is_param | A vector of Boolean flags telling which PIP problem dimensions are problem parameters. The size of the vector is equal to the PIP problem internal space dimension (i.e., no artificial parameters).

void Parma_Polyhedra_Library::PIP_Solution_Node::generate_cut | ( | dimension_type | i,
|  | Variables_Set & | parameters,
|  | Matrix & | context,
|  | dimension_type & | space_dimension,
|  | unsigned | indent_level |
| ) |  |  | `[protected]`

Generate a Gomory cut using non-integer tableau row `i`.

Parameters:

  | i | Row index in simplex tableau from which the cut is generated
  | parameters | A std::set of the current parameter dimensions (including artificials); to be updated if a new artificial parameter is to be created
  | context | A set of linear inequalities on the parameters, in matrix form; to be updated if a new artificial parameter is to be created
  | space_dimension | The current space dimension, including variables and all parameters; to be updated if an extra parameter is to be created
  | indent_level | The indentation level (for debugging output only).

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

- ppl.hh