00001 /* Linear_Expression Java 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 00026 import java.io.Writer; 00027 import java.io.IOException; 00028 00030 00036 public abstract class Linear_Expression implements Cloneable { 00037 00039 public Linear_Expression sum(Linear_Expression y) { 00040 return new Linear_Expression_Sum(this, y); 00041 } 00042 00044 public Linear_Expression subtract(Linear_Expression y) { 00045 return new Linear_Expression_Difference(this, y); 00046 } 00047 00049 public Linear_Expression times(Coefficient c) { 00050 return new Linear_Expression_Times(this, c); 00051 } 00052 00054 public Linear_Expression unary_minus() { 00055 return new Linear_Expression_Unary_Minus(this); 00056 } 00057 00059 public abstract Linear_Expression clone(); 00060 00062 public native String ascii_dump(); 00063 00065 public native String toString(); 00066 00068 public native boolean is_zero(); 00069 00073 public native boolean all_homogeneous_terms_are_zero(); 00074 00075 private static native void initIDs(); 00076 static { 00077 initIDs(); 00078 } 00079 }
1.6.3