1 // This is a -*- C++ -*- header file. 2 3 /* ReadLatteStyle.h -- Read input data in the LattE style 4 5 Copyright 2006, 2007 Matthias Koeppe 6 7 This file is part of LattE. 8 9 LattE is free software; you can redistribute it and/or modify it 10 under the terms of the version 2 of the GNU General Public License 11 as published by the Free Software Foundation. 12 13 LattE is distributed in the hope that it will be useful, but 14 WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with LattE; if not, write to the Free Software Foundation, 20 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 21 */ 22 23 #ifndef READLATTESTYLE__H 24 #define READLATTESTYLE__H 25 26 #include <fstream> 27 #include "latte_cddlib.h" 28 #include "Polyhedron.h" 29 30 /* Read a file in LattE format and return a cddlib matrix. 31 32 If HOMOGENIZE is true, add a zero column in front. This is useful 33 for reading in 4ti2-style matrix files. 34 35 If NONNEGATIVITY is true, add non-negativity constraints to all 36 variables. 37 */ 38 dd_MatrixPtr ReadLatteStyleMatrix(istream &f, bool vrep, 39 bool homogenize, 40 const char *file_description = "", 41 bool nonnegativity = false); 42 dd_MatrixPtr ReadLatteStyleMatrix(const char *fileName, bool vrep, 43 bool homogenize, 44 bool nonnegativity = false); 45 46 /* Write a cddlib matrix to a file in LattE format. */ 47 void WriteLatteStyleMatrix(ostream &f, dd_MatrixPtr matrix); 48 void WriteLatteStyleMatrix(const char *fileName, dd_MatrixPtr matrix); 49 50 #endif 51 52