00001 /* Linear_Expression_Times class definition 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 00028 public class Linear_Expression_Times 00029 extends Linear_Expression { 00030 00032 protected Coefficient coeff; 00033 00035 protected Linear_Expression lin_expr; 00036 00038 public Linear_Expression_Times(Coefficient c, Variable v) { 00039 coeff = new Coefficient(c); 00040 lin_expr = new Linear_Expression_Variable(v); 00041 } 00042 00044 public Linear_Expression_Times(Coefficient c, Linear_Expression l) { 00045 coeff = new Coefficient(c); 00046 lin_expr = l.clone(); 00047 } 00048 00050 public Linear_Expression_Times(Linear_Expression l, Coefficient c) { 00051 coeff = new Coefficient(c); 00052 lin_expr = l.clone(); 00053 } 00054 00056 public Coefficient coefficient() { 00057 return coeff; 00058 } 00059 00061 public Linear_Expression linear_expression() { 00062 return lin_expr; 00063 } 00064 00066 public Linear_Expression_Times clone() { 00067 return new Linear_Expression_Times(coeff, lin_expr); 00068 } 00069 00070 private static native void initIDs(); 00071 static { 00072 initIDs(); 00073 } 00074 }
1.6.3