00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <config.h>
00024
00025 #include "NNC_Polyhedron.defs.hh"
00026 #include "C_Polyhedron.defs.hh"
00027 #include "algorithms.hh"
00028
00029 namespace PPL = Parma_Polyhedra_Library;
00030
00031 PPL::NNC_Polyhedron::NNC_Polyhedron(const C_Polyhedron& y)
00032 : Polyhedron(NOT_NECESSARILY_CLOSED, y.space_dimension(), UNIVERSE) {
00033 add_constraints(y.constraints());
00034 assert(OK());
00035 }
00036
00037 PPL::NNC_Polyhedron::NNC_Polyhedron(const Congruence_System& cgs)
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 }
00049
00050 PPL::NNC_Polyhedron::NNC_Polyhedron(Congruence_System& cgs)
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 }
00062
00063 bool
00064 PPL::NNC_Polyhedron::poly_hull_assign_if_exact(const NNC_Polyhedron& y) {
00065 return PPL::poly_hull_assign_if_exact(*this, y);
00066 }