Parma_Polyhedra_Library::NNC_Polyhedron Class Reference
[C++ Language Interface]

A not necessarily closed convex polyhedron. More...

#include <NNC_Polyhedron.defs.hh>

Inheritance diagram for Parma_Polyhedra_Library::NNC_Polyhedron:

Inheritance graph
[legend]
Collaboration diagram for Parma_Polyhedra_Library::NNC_Polyhedron:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 NNC_Polyhedron (dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE)
 Builds either the universe or the empty NNC polyhedron.
 NNC_Polyhedron (const Constraint_System &cs)
 Builds an NNC polyhedron from a system of constraints.
 NNC_Polyhedron (Constraint_System &cs)
 Builds an NNC polyhedron recycling a system of constraints.
 NNC_Polyhedron (const Generator_System &gs)
 Builds an NNC polyhedron from a system of generators.
 NNC_Polyhedron (Generator_System &gs)
 Builds an NNC polyhedron recycling a system of generators.
 NNC_Polyhedron (const Congruence_System &cgs)
 Builds an NNC polyhedron from a system of congruences.
 NNC_Polyhedron (Congruence_System &cgs)
 Builds an NNC polyhedron recycling a system of congruences.
 NNC_Polyhedron (const C_Polyhedron &y)
 Builds an NNC polyhedron from the C polyhedron y.
template<typename Box>
 NNC_Polyhedron (const Box &box, From_Bounding_Box dummy)
 Builds an NNC polyhedron out of a generic, interval-based bounding box.
 NNC_Polyhedron (const NNC_Polyhedron &y)
 Ordinary copy-constructor.
NNC_Polyhedronoperator= (const NNC_Polyhedron &y)
 The assignment operator. (*this and y can be dimension-incompatible.).
NNC_Polyhedronoperator= (const C_Polyhedron &y)
 Assigns to *this the C polyhedron y.
 ~NNC_Polyhedron ()
 Destructor.
bool poly_hull_assign_if_exact (const NNC_Polyhedron &y)
 If the poly-hull of *this and y is exact it is assigned to *this and true is returned, otherwise false is returned.
bool upper_bound_assign_if_exact (const NNC_Polyhedron &y)
 Same as poly_hull_assign_if_exact(y).


Detailed Description

A not necessarily closed convex polyhedron.

An object of the class NNC_Polyhedron represents a not necessarily closed (NNC) convex polyhedron in the vector space $\Rset^n$.

Note:
Since NNC polyhedra are a generalization of closed polyhedra, any object of the class C_Polyhedron can be (explicitly) converted into an object of the class NNC_Polyhedron. The reason for defining two different classes is that objects of the class C_Polyhedron are characterized by a more efficient implementation, requiring less time and memory resources.

Definition at line 44 of file NNC_Polyhedron.defs.hh.


Constructor & Destructor Documentation

Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron ( dimension_type  num_dimensions = 0,
Degenerate_Element  kind = UNIVERSE 
) [inline, explicit]

Builds either the universe or the empty NNC polyhedron.

Parameters:
num_dimensions The number of dimensions of the vector space enclosing the NNC polyhedron;
kind Specifies whether a universe or an empty NNC 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 NNC polyhedron is built.

Definition at line 31 of file NNC_Polyhedron.inlines.hh.

00033   : Polyhedron(NOT_NECESSARILY_CLOSED,
00034                num_dimensions <= max_space_dimension()
00035                ? num_dimensions
00036                : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00037                                                  "NNC_Polyhedron(n, k)",
00038                                                  "n exceeds the maximum "
00039                                                  "allowed space dimension"),
00040                   num_dimensions),
00041                kind) {
00042 }

Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron ( const Constraint_System cs  )  [inline, explicit]

Builds an NNC 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.

Definition at line 45 of file NNC_Polyhedron.inlines.hh.

00046   : Polyhedron(NOT_NECESSARILY_CLOSED,
00047                cs.space_dimension() <= max_space_dimension()
00048                ? cs
00049                : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00050                                                  "NNC_Polyhedron(cs)",
00051                                                  "the space dimension of cs "
00052                                                  "exceeds the maximum allowed "
00053                                                  "space dimension"), cs)) {
00054 }

Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron ( Constraint_System cs  )  [inline, explicit]

Builds an NNC 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.

Definition at line 57 of file NNC_Polyhedron.inlines.hh.

00058   : Polyhedron(NOT_NECESSARILY_CLOSED,
00059                cs.space_dimension() <= max_space_dimension()
00060                ? cs
00061                : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00062                                                  "NNC_Polyhedron(cs)",
00063                                                  "the space dimension of cs "
00064                                                  "exceeds the maximum allowed "
00065                                                  "space dimension"), cs)) {
00066 }

Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron ( const Generator_System gs  )  [inline, explicit]

Builds an NNC 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.

Definition at line 69 of file NNC_Polyhedron.inlines.hh.

00070   : Polyhedron(NOT_NECESSARILY_CLOSED,
00071                gs.space_dimension() <= max_space_dimension()
00072                ? gs
00073                : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00074                                                  "NNC_Polyhedron(gs)",
00075                                                  "the space dimension of gs "
00076                                                  "exceeds the maximum allowed "
00077                                                  "space dimension"), gs)) {
00078 }

Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron ( Generator_System gs  )  [inline, explicit]

Builds an NNC 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.

Definition at line 81 of file NNC_Polyhedron.inlines.hh.

00082   : Polyhedron(NOT_NECESSARILY_CLOSED,
00083                gs.space_dimension() <= max_space_dimension()
00084                ? gs
00085                : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00086                                                  "NNC_Polyhedron(gs)",
00087                                                  "the space dimension of gs "
00088                                                  "exceeds the maximum allowed "
00089                                                  "space dimension"), gs)) {
00090 }

Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron ( const Congruence_System cgs  )  [explicit]

Builds an NNC polyhedron from a system of congruences.

The polyhedron inherits the space dimension of the congruence system.

Parameters:
cgs The system of congruences defining the polyhedron. It is not declared const because its data-structures will be recycled to build the polyhedron.

Definition at line 37 of file NNC_Polyhedron.cc.

References Parma_Polyhedra_Library::Polyhedron::add_congruences().

00038   : Polyhedron(NOT_NECESSARILY_CLOSED,
00039                cgs.space_dimension() <= max_space_dimension()
00040                ? cgs.space_dimension()
00041                : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00042                                                  "NNC_Polyhedron(cgs)",
00043                                                  "the space dimension of cgs "
00044                                                  "exceeds the maximum allowed "
00045                                                  "space dimension"), 0),
00046                UNIVERSE) {
00047   add_congruences(cgs);
00048 }

Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron ( Congruence_System cgs  )  [explicit]

Builds an NNC polyhedron recycling a system of congruences.

The polyhedron inherits the space dimension of the congruence system.

Parameters:
cgs The system of congruences defining the polyhedron. It is not declared const because its data-structures will be recycled to build the polyhedron.

Definition at line 50 of file NNC_Polyhedron.cc.

References Parma_Polyhedra_Library::Polyhedron::add_congruences().

00051   : Polyhedron(NOT_NECESSARILY_CLOSED,
00052                cgs.space_dimension() <= max_space_dimension()
00053                ? cgs.space_dimension()
00054                : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00055                                                  "NNC_Polyhedron(cgs)",
00056                                                  "the space dimension of cgs "
00057                                                  "exceeds the maximum allowed "
00058                                                  "space dimension"), 0),
00059                UNIVERSE) {
00060   add_congruences(cgs);
00061 }

Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron ( const C_Polyhedron y  )  [explicit]

Builds an NNC polyhedron from the C polyhedron y.

Definition at line 31 of file NNC_Polyhedron.cc.

References Parma_Polyhedra_Library::Polyhedron::add_constraints(), Parma_Polyhedra_Library::Polyhedron::constraints(), and Parma_Polyhedra_Library::Polyhedron::OK().

00032   : Polyhedron(NOT_NECESSARILY_CLOSED, y.space_dimension(), UNIVERSE) {
00033   add_constraints(y.constraints());
00034   assert(OK());
00035 }

template<typename Box>
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron ( const Box &  box,
From_Bounding_Box  dummy 
) [inline]

Builds an NNC 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::length_error Thrown if the space dimension of box exceeds the maximum allowed space dimension.

Definition at line 94 of file NNC_Polyhedron.inlines.hh.

00095   : Polyhedron(NOT_NECESSARILY_CLOSED,
00096                box.space_dimension() <= max_space_dimension()
00097                ? box
00098                : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00099                                                  "NNC_Polyhedron(box)",
00100                                                  "the space dimension of box "
00101                                                  "exceeds the maximum allowed "
00102                                                  "space dimension"), box)) {
00103 }

Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron ( const NNC_Polyhedron y  )  [inline]

Ordinary copy-constructor.

Definition at line 106 of file NNC_Polyhedron.inlines.hh.

00107   : Polyhedron(y) {
00108 }

Parma_Polyhedra_Library::NNC_Polyhedron::~NNC_Polyhedron (  )  [inline]

Destructor.

Definition at line 124 of file NNC_Polyhedron.inlines.hh.

00124                                 {
00125 }


Member Function Documentation

NNC_Polyhedron & Parma_Polyhedra_Library::NNC_Polyhedron::operator= ( const NNC_Polyhedron y  )  [inline]

The assignment operator. (*this and y can be dimension-incompatible.).

Definition at line 111 of file NNC_Polyhedron.inlines.hh.

References Parma_Polyhedra_Library::Polyhedron::operator=().

00111                                                  {
00112   Polyhedron::operator=(y);
00113   return *this;
00114 }

NNC_Polyhedron & Parma_Polyhedra_Library::NNC_Polyhedron::operator= ( const C_Polyhedron y  )  [inline]

Assigns to *this the C polyhedron y.

Definition at line 117 of file NNC_Polyhedron.inlines.hh.

References Parma_Polyhedra_Library::Polyhedron::swap().

00117                                                {
00118   NNC_Polyhedron nnc_y(y);
00119   swap(nnc_y);
00120   return *this;
00121 }

bool Parma_Polyhedra_Library::NNC_Polyhedron::poly_hull_assign_if_exact ( const NNC_Polyhedron y  ) 

If the poly-hull of *this and y is exact it is assigned to *this and true is returned, otherwise false is returned.

Exceptions:
std::invalid_argument Thrown if *this and y are dimension-incompatible.

Definition at line 64 of file NNC_Polyhedron.cc.

Referenced by upper_bound_assign_if_exact().

00064                                                                     {
00065   return PPL::poly_hull_assign_if_exact(*this, y);
00066 }

bool Parma_Polyhedra_Library::NNC_Polyhedron::upper_bound_assign_if_exact ( const NNC_Polyhedron y  )  [inline]

Same as poly_hull_assign_if_exact(y).

Definition at line 128 of file NNC_Polyhedron.inlines.hh.

References poly_hull_assign_if_exact().

00128                                                                    {
00129   return poly_hull_assign_if_exact(y);
00130 }


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

Generated on Wed Jul 16 22:55:51 2008 for PPL by  doxygen 1.5.6