Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

# Parma_Polyhedra_Library::C_Polyhedron Class Reference

A closed convex polyhedron. More...

Inherits Parma_Polyhedra_Library::Polyhedron.

List of all members.

## Public Member Functions
| C_Polyhedron (dimension_type num_dimensions=0, Degenerate_Kind kind=UNIVERSE)
| Builds either the universe or the empty C polyhedron.
| C_Polyhedron (const ConSys &cs)
| Builds a C polyhedron from a system of constraints.
| C_Polyhedron (ConSys &cs)
| Builds a C polyhedron recycling a system of constraints.
| C_Polyhedron (const GenSys &gs)
| Builds a C polyhedron from a system of generators.
| C_Polyhedron (GenSys &gs)
| Builds a C polyhedron recycling a system of generators.
| C_Polyhedron (const NNC_Polyhedron &y)
| Builds a C polyhedron from the NNC polyhedron `y`.
template<typename Box> | C_Polyhedron (const Box &box, From_Bounding_Box dummy)
| Builds a C polyhedron out of a generic, interval-based bounding box.
| C_Polyhedron (const C_Polyhedron &y)
| Ordinary copy-constructor.
C_Polyhedron & | operator= (const C_Polyhedron &y)
| The assignment operator. (`*this` and `y` can be dimension-incompatible.).
| ~C_Polyhedron ()
| Destructor.
## Static Public Member Functions
dimension_type | max_space_dimension ()
| Returns the maximum space dimension a C_Polyhedron can handle.

## Detailed Description

A closed convex polyhedron.

An object of the class C_Polyhedron represents a topologically closed convex polyhedron in the vector space .

When building a closed polyhedron starting from a system of constraints, an exception is thrown if the system contains a strict inequality constraint. Similarly, an exception is thrown when building a closed polyhedron starting from a system of generators containing a closure point.

Note:
  Such an exception will be obtained even if the system of constraints (resp., generators) actually defines a topologically closed subset of the vector space, i.e., even if all the strict inequalities (resp., closure points) in the system happen to be redundant with respect to the system obtained by removing all the strict inequality constraints (resp., all the closure points). In contrast, when building a closed polyhedron starting from an object of the class NNC_Polyhedron, the precise topological closure test will be performed.

## Constructor & Destructor Documentation

Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | dimension_type | num_dimensions = `0`,
|  | Degenerate_Kind | kind = `UNIVERSE`
| ) | `[explicit]`

  | Builds either the universe or the empty C polyhedron. Parameters:
  | num_dimensions | The number of dimensions of the vector space enclosing the C polyhedron;
  | kind | Specifies whether a universe or an empty C polyhedron should be built.
  Exceptions:
  | std::length_error | Thrown if `num_dimensions` exceeds the maximum allowed space dimension.
Both parameters are optional: by default, a 0-dimension space universe C polyhedron is built.

Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | const ConSys & | cs | ) |

  | Builds a C polyhedron from a system of constraints. The polyhedron inherits the space dimension of the constraint system. Parameters:
  | cs | The system of constraints defining the polyhedron.
  Exceptions:
  | std::invalid_argument | Thrown if the system of constraints contains strict inequalities.

Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | ConSys & | cs | ) |

  | Builds a C polyhedron recycling a system of constraints. The polyhedron inherits the space dimension of the constraint system. Parameters:
  | cs | The system of constraints defining the polyhedron. It is not declared `const` because its data-structures will be recycled to build the polyhedron.
  Exceptions:
  | std::invalid_argument | Thrown if the system of constraints contains strict inequalities.

Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | const GenSys & | gs | ) |

  | Builds a C polyhedron from a system of generators. The polyhedron inherits the space dimension of the generator system. Parameters:
  | gs | The system of generators defining the polyhedron.
  Exceptions:
  | std::invalid_argument | Thrown if the system of generators is not empty but has no points, or if it contains closure points.

Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | GenSys & | gs | ) |

  | Builds a C polyhedron recycling a system of generators. The polyhedron inherits the space dimension of the generator system. Parameters:
  | gs | The system of generators defining the polyhedron. It is not declared `const` because its data-structures will be recycled to build the polyhedron.
  Exceptions:
  | std::invalid_argument | Thrown if the system of generators is not empty but has no points, or if it contains closure points.

Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | const NNC_Polyhedron & | y | ) | `[explicit]`

  | Builds a C polyhedron from the NNC polyhedron `y`. Exceptions:
  | std::invalid_argument | Thrown if the polyhedron `y` is not topologically closed.

template<typename Box>
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | const Box & | box,
|  | From_Bounding_Box | dummy
| ) |

  | Builds a C polyhedron out of a generic, interval-based bounding box. For a description of the methods that should be provided by the template class Box, see the documentation of the protected method: template <typename Box> Polyhedron::Polyhedron(Topology topol, const Box& box); Parameters:
  | box | The bounding box representing the polyhedron to be built;
  | dummy | A dummy tag to syntactically differentiate this one from the other constructors.
  Exceptions:
  | std::invalid_argument | Thrown if `box` has intervals that are not topologically closed (i.e., having some finite but open bounds).