polylib: c2p.c Source File

- Main Page
- Classes
- Files

- File List
- File Members

# c2p.c

Go to the documentation of this file.

    00001 /*
    00002     This file is part of PolyLib.
    00003
    00004     PolyLib is free software: you can redistribute it and/or modify
    00005     it under the terms of the GNU General Public License as published by
    00006     the Free Software Foundation, either version 3 of the License, or
    00007     (at your option) any later version.
    00008
    00009     PolyLib is distributed in the hope that it will be useful,
    00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012     GNU General Public License for more details.
    00013
    00014     You should have received a copy of the GNU General Public License
    00015     along with PolyLib.  If not, see <http://www.gnu.org/licenses/>.
    00016 */
    00017
    00018 #define WS 0
    00019
    00020 #include <stdlib.h>
    00021 #include <polylib/polylib.h>
    00022
    00023 int main() {
    00024
    00025   Matrix *A;
    00026   Polyhedron *P;
    00027
    00028   A = Matrix_Read();
    00029   if(A->NbColumns < 2) {
    00030     printf("Wrong input: %d columns\n", A->NbColumns );
    00031     Matrix_Free(A);
    00032     exit(1);
    00033   }
    00034   Matrix_Print(stdout,P_VALUE_FMT,A);
    00035   P = Constraints2Polyhedron(A,WS);
    00036   Matrix_Free(A);
    00037   Polyhedron_Print(stdout,P_VALUE_FMT,P);
    00038   Domain_Free(P);
    00039   return 0;
    00040 }