[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Coefficients Format of vectors
Normally we shoud use rational numbers for coefficients of vectors and matrices. avis98b observed experimentally in a very similar context that using a common denominator for all coefficients of a vector or of a matrix row is more efficient, probably because vector combination is easier. wilde93 uses also the same technique.
To avoid overflow problem, multi-precision integers are needed; their drawback is obviously the loss of speed. As a consequence, we have defined a generic interface for integers and the compile-time option allows to deal with either
The type pkint_t
is supposed to provide conversion operators from
machine int
to type pkint_t
. You should look at file `gint.nw'
for details.
As in wilde93 we reserve a particular treatment for equality constraints, instead of considering them as two opposed inequalities, because more efficient methods are available for example to minimize them (gauss pivot). Dually, we distinguish for generators bidirectionnal lines from normal rays.
The format of objects depends if the library has been opened with the
strict
option or not. We note d the dimension of affine
polyhedra, i.e., the number of dimensions different of \xi and
\epsilon.
If the strict
option is unset (no strict inequalities):
[0,b,a_0,...,a_{d-1}]
represents the equality constraint [1,b,a_0,...,a_{d-1}]
represents the inequality constraint [0,0,a_0,...,a_{d-1}]
represents the line of direction
(a_0,...,a_{d-1});
[1,0,a_0,...,a_{d-1}]
represents the ray of direction
(a_0,...,a_{d-1});
[1,b,a_0,...,a_{d-1}]
represents the vertex
(a_0/b,...,a_{d-1}/b);
[d,b,a_0,...,a_{d-1}]
represents the affine expression
If the strict
option is set (strict inequalities), an additionnal
dimension is introduced at index 2 to put \epsilon-coefficients:
[0,b,0,a_0,...,a_{d-1}]
represents the equality constraint [1,b,0,a_0,...,a_{d-1}]
represents the inequality constraint [1,b,-s,a_0,...,a_{d-1}]
where s>0
represents the inequality constraint [0,0,0,a_0,...,a_{d-1}]
represents the line of direction
(a_0,...,a_{d-1});
[1,0,0,a_0,...,a_{d-1}]
represents the ray of direction
(a_0,...,a_{d-1});
[1,b,s,a_0,...,a_{d-1}]
where s>=0 represents the vertex[den,b,0,a_0,...,a_{d-1}]
represents the affine expression If a vector is given without matching a suitable format, depending on its nature, the results are unpredictable. That's come from the fact that the library uses the assumption \xi >= 0 and possibly \epsilon >= 0 to decide wether a polyhedron is empty or not.
The constraint \xi >= 0 (\xi >= \epsilon wit strict option) is called the positivity constraint, and the constraint \epsilon >= 0 the strictness constraint.
To make more easy a certain form of genericity, the library offers
variables bool polka_strict
and int polka_dec
that memorized
respectively the operation mode (strict or non strict) and the index of
the first "normal" coefficient (2 or 3). The index of the constant
coefficient is in any case 1.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |