00001 /* Poly_Con_Relation Java class declaration and implementation. 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 package parma_polyhedra_library; 00025 00027 00031 public class Poly_Con_Relation { 00032 00033 public static final int NOTHING = 0; 00034 public static final int IS_DISJOINT = 1; 00035 public static final int STRICTLY_INTERSECTS = 2; 00036 public static final int IS_INCLUDED = 4; 00037 public static final int SATURATES = 8; 00038 00040 private int mask_value; 00041 00043 public Poly_Con_Relation(int val) { 00044 mask_value = val; 00045 } 00046 00048 public static Poly_Con_Relation nothing() { 00049 return new Poly_Con_Relation(Poly_Con_Relation.NOTHING); 00050 } 00051 00056 public static Poly_Con_Relation is_disjoint() { 00057 return new Poly_Con_Relation(Poly_Con_Relation.IS_DISJOINT); 00058 } 00059 00064 public static Poly_Con_Relation strictly_intersects() { 00065 return new Poly_Con_Relation(Poly_Con_Relation.STRICTLY_INTERSECTS); 00066 } 00067 00072 public static Poly_Con_Relation is_included() { 00073 return new Poly_Con_Relation(Poly_Con_Relation.IS_INCLUDED); 00074 } 00075 00080 public static Poly_Con_Relation saturates() { 00081 return new Poly_Con_Relation(Poly_Con_Relation.SATURATES); 00082 } 00083 00085 public boolean implies(Poly_Con_Relation y) { 00086 return (this.mask_value & y.mask_value) == y.mask_value; 00087 } 00088 00089 private static native void initIDs(); 00090 static { 00091 initIDs(); 00092 } 00093 }
1.6.3