#include <assert.h>
#include <polylib/polylib.h>
#include <polylib/homogenization.h>
Go to the source code of this file.
Functions | |
evalue * | dehomogenize_periodic (enode *en, int nb_param) |
homogenization.c copyright 2004-2005 Bavo Nootaert | |
evalue * | dehomogenize_polynomial (enode *en, int nb_param) |
dehomogenize a polynomial. | |
Polyhedron * | homogenize (Polyhedron *P, unsigned MAXRAYS) |
void | dehomogenize_evalue (evalue *ep, int nb_param) |
dehomogenize an evalue. | |
void | dehomogenize_enode (enode *p, int nb_param) |
dehomogenize all evalues in an enode. | |
Polyhedron * | dehomogenize_polyhedron (Polyhedron *p, int maxRays) |
dehomogenize a polyhedron. | |
void | dehomogenize_enumeration (Enumeration *en, int nb_params, int maxRays) |
dehomogenize an enumeration. |
|
dehomogenize all evalues in an enode. This function is mutually recursive with dehomogenize_evalue. Definition at line 58 of file homogenization.c. References dehomogenize_evalue(), enode, evalue, and p. Referenced by dehomogenize_evalue(). |
|
dehomogenize an enumeration. Replaces each validity domain and Ehrhart polynomial in the Enumeration en with the dehomogenized form. Definition at line 153 of file homogenization.c. References dehomogenize_evalue(), dehomogenize_polyhedron(), Enumeration, _enumeration::EP, _enumeration::next, Polyhedron, Polyhedron_Free(), and _enumeration::ValidityDomain. Referenced by main(). |
|
dehomogenize an evalue. The last parameter (nb_param) is replaced by 1. This function is mutually recursive with dehomogenize_enode. cannot dehomogenize rationals * we need to replace the last parameter * Not the last parameter. Recurse * Definition at line 29 of file homogenization.c. References _evalue::d, dehomogenize_enode(), dehomogenize_periodic(), dehomogenize_polynomial(), evalue, free_evalue_refs(), periodic, value_zero_p, and _evalue::x. Referenced by dehomogenize_enode(), dehomogenize_enumeration(), and Polyhedron_Enumerate(). |
|
homogenization.c copyright 2004-2005 Bavo Nootaert
Definition at line 68 of file homogenization.c. References _enode::arr, assert, _evalue::d, enode, evalue, periodic, _enode::size, _enode::type, value_assign, value_init, value_notzero_p, and _evalue::x. Referenced by dehomogenize_evalue(). |
|
dehomogenize a polyhedron. Assume the polyhedron p is homogenous. Returns a new polyhedron. Definition at line 136 of file homogenization.c. References Constraints2Polyhedron(), Matrix, Matrix_Alloc(), Matrix_Free(), matrix::NbColumns, matrix::NbRows, p, matrix::p, Polyhedron, Polyhedron2Constraints(), and Vector_Copy(). Referenced by dehomogenize_enumeration(). |
|
dehomogenize a polynomial. Assume the enode contains a polynomial in one variable, the homogenous parameter. Returns an new evalue, representing a rational. enumerate over all coefficients (which are either periodic or rational, but not polynomial) * add ev (fraction) to num/den * simplify num/den * create new evalue representing num/den* cleanup * Definition at line 83 of file homogenization.c. References _enode::arr, assert, _evalue::d, enode, evalue, Gcd(), polynomial, _enode::size, _enode::type, Value, value_addto, value_assign, value_clear, value_division, value_init, value_multiply, value_set_si, value_zero_p, and _evalue::x. Referenced by dehomogenize_evalue(). |
|
Definition at line 12 of file homogenization.c. References AddANullColumn(), polyhedron::Constraint, Constraints2Polyhedron(), polyhedron::Dimension, Matrix, Matrix_Free(), MAXRAYS, matrix::NbColumns, polyhedron::NbConstraints, matrix::NbRows, matrix::p, matrix::p_Init, polyhedron::p_Init, and Polyhedron. Referenced by Polyhedron_Enumerate(). |