00001 /* PIP_Problem 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 00025 package parma_polyhedra_library; 00026 00027 import java.io.Writer; 00028 import java.io.IOException; 00029 00031 00097 public class PIP_Problem extends PPL_Object { 00098 00100 00113 public PIP_Problem(long dim) { 00114 build_cpp_object(dim); 00115 } 00116 00118 00123 public PIP_Problem(long dim, Constraint_System cs, Variables_Set params) { 00124 build_cpp_object(dim, cs, params); 00125 } 00126 00128 public PIP_Problem(PIP_Problem y) { 00129 build_cpp_object(y); 00130 } 00131 00136 public native void free(); 00137 00139 protected native void finalize(); 00140 /* Constructors and Destructor */ 00142 00144 00146 00147 public native long max_space_dimension(); 00148 00150 public native long space_dimension(); 00151 00153 public native long number_of_parameter_space_dimensions(); 00154 00158 public native Variables_Set parameter_space_dimensions(); 00159 00161 public native long get_big_parameter_dimension(); 00162 00167 public native long number_of_constraints(); 00168 00173 public native Constraint constraint_at_index(long dim); 00174 00176 public native Constraint_System constraints(); 00177 00179 public native String ascii_dump(); 00180 00182 public native String toString(); 00183 00188 public native long total_memory_in_bytes(); 00189 00194 public native long external_memory_in_bytes(); 00195 00201 public native boolean OK(); 00202 /* Functions that Do Not Modify the MIP_Problem */ 00204 00205 00207 00209 00210 00213 public native void clear(); 00214 00215 00233 public native void add_space_dimensions_and_embed(long pip_vars, 00234 long pip_params); 00235 00240 public native void add_to_parameter_space_dimensions(Variables_Set vars); 00241 00245 public native void set_big_parameter_dimension(long d); 00246 00254 public native void add_constraint(Constraint c); 00255 00264 public native void add_constraints(Constraint_System cs); 00265 /* Functions that May Modify the PIP_Problem */ 00267 00269 00271 00272 00276 public native boolean is_satisfiable(); 00277 00279 00288 public native PIP_Problem_Status solve(); 00289 00291 public native PIP_Tree_Node solution(); 00292 00294 public native PIP_Tree_Node optimizing_solution(); 00295 /* Computing the Solution of the PIP_Problem */ 00297 00299 00304 public native PIP_Problem_Control_Parameter_Value 00305 get_pip_problem_control_parameter 00306 (PIP_Problem_Control_Parameter_Name name); 00307 00311 public native void set_pip_problem_control_parameter 00312 (PIP_Problem_Control_Parameter_Value value); 00313 /* Querying/Setting Control Parameters */ 00315 00317 private native void build_cpp_object(long dim); 00318 00320 private native void build_cpp_object(long dim, 00321 Constraint_System cs, 00322 Variables_Set vars); 00323 00325 private native void build_cpp_object(PIP_Problem y); 00326 }
1.6.3