piplib 1.1
[piplib.git] / example / example.c
blobee48514c0de4b0e0fd48d65daddfc33dfb1541fb
1 /* This is a very simple example of how to use the PipLib inside your programs.
2 * You should compile it by typing 'make' (after edition of the makefile), then
3 * test it for instance by typing 'more FILE.pol | ./example'. Finally you can
4 * compare results given by PIP by typing 'pip32 FILE.dat'
5 */
7 # include <stdio.h>
8 /*# include <gmp.h>*/
9 # include <piplib/piplib32.h>
11 int main()
12 { PipMatrix * domain, * context ;
13 PipQuast * solution ;
15 printf("Enter the Matrices :\n") ;
16 domain = pip_matrix_read(stdin) ;
17 pip_matrix_print(stdout,domain) ;
18 context = pip_matrix_read(stdin) ;
19 pip_matrix_print(stdout,context) ;
20 printf("\n") ;
22 solution = pip_solve(domain,context,-1,1,0,0,0) ;
24 pip_matrix_free(domain) ;
25 pip_matrix_free(context) ;
27 pip_quast_print(stdout,solution,0) ;
29 pip_quast_free(solution) ;
30 return 0 ;