polylib
5.22.8
r2p.c
Go to the documentation of this file.
1
/* Rays 2 Polyhedron
2
*/
3
4
#define WS 0
5
6
#include <stdio.h>
7
#include <stdlib.h>
8
#include <
polylib/polylib.h
>
9
10
int
main
() {
11
12
Matrix
*R;
13
Polyhedron
*P;
14
15
R =
Matrix_Read
();
16
if
(R->
NbColumns
< 2) {
17
printf(
"Wrong input: %d columns\n"
, R->
NbColumns
);
18
Matrix_Free
(R);
19
exit(1);
20
}
21
P =
Rays2Polyhedron
(R,
WS
);
22
Matrix_Free
(R);
23
Polyhedron_Print
(stdout,
P_VALUE_FMT
,P);
24
Domain_Free
(P);
25
return
0;
26
}
27
Matrix_Read
Matrix * Matrix_Read(void)
Definition:
matrix.c:209
Matrix_Free
void Matrix_Free(Matrix *Mat)
Definition:
matrix.c:71
Rays2Polyhedron
Polyhedron * Rays2Polyhedron(Matrix *Ray, unsigned NbMaxConstrs)
Given a matrix of rays 'Ray', create and return a polyhedron.
Definition:
polyhedron.c:2087
Polyhedron_Print
void Polyhedron_Print(FILE *Dst, const char *Format, const Polyhedron *Pol)
Definition:
polyhedron.c:1639
Domain_Free
void Domain_Free(Polyhedron *Pol)
Definition:
polyhedron.c:1626
polylib.h
WS
#define WS
Definition:
r2p.c:4
main
int main()
Definition:
r2p.c:10
matrix
Definition:
types.h:75
matrix::NbColumns
unsigned NbColumns
Definition:
types.h:76
polyhedron
Definition:
types.h:93
P_VALUE_FMT
#define P_VALUE_FMT
Definition:
types.h:39
applications
r2p.c
Generated by
1.9.4