00001 /* H79_Certificate class implementation: inline functions. 00002 Copyright (C) 2001-2006 Roberto Bagnara <bagnara@cs.unipr.it> 00003 00004 This file is part of the Parma Polyhedra Library (PPL). 00005 00006 The PPL is free software; you can redistribute it and/or modify it 00007 under the terms of the GNU General Public License as published by the 00008 Free Software Foundation; either version 2 of the License, or (at your 00009 option) any later version. 00010 00011 The PPL is distributed in the hope that it will be useful, but WITHOUT 00012 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00014 for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software Foundation, 00018 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. 00019 00020 For the most up-to-date information see the Parma Polyhedra Library 00021 site: http://www.cs.unipr.it/ppl/ . */ 00022 00023 #ifndef PPL_H79_Certificate_inlines_hh 00024 #define PPL_H79_Certificate_inlines_hh 1 00025 00026 #include "Polyhedron.defs.hh" 00027 00028 namespace Parma_Polyhedra_Library { 00029 00030 inline 00031 H79_Certificate::H79_Certificate() 00032 : affine_dim(0), num_constraints(0) { 00033 // This is the certificate for a zero-dim universe polyhedron. 00034 } 00035 00036 inline 00037 H79_Certificate::H79_Certificate(const H79_Certificate& y) 00038 : affine_dim(y.affine_dim), num_constraints(y.num_constraints) { 00039 } 00040 00041 inline 00042 H79_Certificate::~H79_Certificate() { 00043 } 00044 00045 inline bool 00046 H79_Certificate::Compare::operator()(const H79_Certificate& x, 00047 const H79_Certificate& y) const { 00048 // For an efficient evaluation of the multiset ordering based 00049 // on this lgo relation, we want larger elements to come first. 00050 return x.compare(y) == 1; 00051 } 00052 00053 template <typename PH> 00054 inline 00055 H79_Certificate::H79_Certificate(const PH& ph) 00056 : affine_dim(0), num_constraints(0) { 00057 H79_Certificate cert(Polyhedron(NECESSARILY_CLOSED, ph.constraints())); 00058 affine_dim = cert.affine_dim; 00059 num_constraints = cert.num_constraints; 00060 } 00061 00062 template <typename PH> 00063 inline int 00064 H79_Certificate::compare(const PH& ph) const { 00065 return this->compare(Polyhedron(NECESSARILY_CLOSED, ph.constraints())); 00066 } 00067 00068 } // namespace Parma_Polyhedra_Library 00069 00070 #endif // !defined(PPL_H79_Certificate_inlines_hh)