polylib 5.22.8
ranking.c File Reference
#include <polylib/polylib.h>
#include <polylib/ranking.h>

Go to the source code of this file.

Functions

PolyhedronLexSmaller (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 B. More...
 
EnumerationPolyhedron_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. More...
 
EnumerationPolyhedron_Ranking (Polyhedron *P, Polyhedron *C, unsigned MAXRAYS)
 

Function Documentation

◆ LexSmaller()

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 B.

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 Universite 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 34 of file ranking.c.

References assert, polyhedron::Constraint, Constraints2Polyhedron(), polyhedron::Dimension, Matrix_Alloc(), Matrix_Copy(), Matrix_Free(), MAXRAYS, 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().

◆ 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 179 of file ranking.c.

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

Referenced by main(), and Polyhedron_Ranking().

◆ Polyhedron_Ranking()

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

Definition at line 208 of file ranking.c.

References polyhedron::Dimension, MAXRAYS, and Polyhedron_LexSmallerEnumerate().