polylib: ranking.h File Reference

# ranking.h File Reference

`#include <polylib/polylib.h>`

Go to the source code of this file.

## Functions
Polyhedron * | LexSmaller (Polyhedron *P, Polyhedron *D, unsigned dim, Polyhedron *C, unsigned MAXRAYS)
| Tools to compute the ranking function of an iteration J: the number of integer points in P that are lexicographically inferior to J.
Enumeration * | Polyhedron_LexSmallerEnumerate (Polyhedron *P, Polyhedron *D, unsigned dim, Polyhedron *C, unsigned MAXRAYS)
| Returns the number of points in P that are lexicographically smaller than a given point in D.
Enumeration * | Polyhedron_Ranking (Polyhedron *P, Polyhedron *C, unsigned MAXRAYS)

## Function Documentation

Polyhedron* LexSmaller | ( | Polyhedron * | P,
|  | Polyhedron * | D,
|  | unsigned | dim,
|  | Polyhedron * | C,
|  | unsigned | MAXRAYS |
| ) |  |  |

Tools to compute the ranking function of an iteration J: the number of integer points in P that are lexicographically inferior to J.

Author:
  B. Meister <meister@icps.u-strasbg.fr> 6/2005 LSIIT-ICPS, UMR 7005 CNRS Universit� Louis Pasteur HiPEAC Network

Tools to compute the ranking function of an iteration J: the number of integer points in P that are lexicographically inferior to J.

Meister 6/2005 LSIIT-ICPS, UMR 7005 CNRS Universit� Louis Pasteur HiPEAC Network Returns a list of polytopes needed to compute the number of points in P that are lexicographically smaller than a given point in D. Only the first dim dimensions are taken into account for computing the lexsmaller relation. The remaining variables are assumed to be extra existential/control variables. When P == D, this is the conventional ranking function. P and D are assumed to have the same parameter domain C.

The first polyhedron in the list returned is the updated context: a combination of D and C or an extended C.

The order of the variables in the remaining polyhedra is

- first dim variables of P
- existential variables of P
- existential variables of D
- first dim variables of D
- the parameters

Definition at line 51 of file ranking.c.

References assert, polyhedron::Constraint, Constraints2Polyhedron(), polyhedron::Dimension, Matrix_Alloc(), Matrix_Copy(), Matrix_Free(), matrix::NbColumns, polyhedron::NbConstraints, matrix::NbRows, polyhedron::next, matrix::p, POL_ENSURE_INEQUALITIES, POL_NO_DUAL, show_matrix, value_assign, value_set_si, and Vector_Copy().

Referenced by Polyhedron_LexSmallerEnumerate().

Enumeration* Polyhedron_LexSmallerEnumerate | ( | Polyhedron * | P,
|  | Polyhedron * | D,
|  | unsigned | dim,
|  | Polyhedron * | C,
|  | unsigned | MAXRAYS |
| ) |  |  |

Returns the number of points in P that are lexicographically smaller than a given point in D.

Only the first dim dimensions are taken into account for computing the lexsmaller relation. The remaining variables are assumed to be extra existential/control variables. When P == D, this is the conventional ranking function. P and D are assumed to have the same parameter domain C. The variables in the Enumeration correspond to the first dim variables in D followed by the parameters of D (the variables of C).

Definition at line 192 of file ranking.c.

References Domain_Enumerate(), Domain_Free(), LexSmaller(), polyhedron::next, and Polyhedron_Free().

Referenced by main(), and Polyhedron_Ranking().

Enumeration* Polyhedron_Ranking | ( | Polyhedron * | P,
|  | Polyhedron * | C,
|  | unsigned | MAXRAYS |
| ) |  |  |

Definition at line 223 of file ranking.c.

References polyhedron::Dimension, and Polyhedron_LexSmallerEnumerate().