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