package lutin

  1. Overview
  2. Docs

Module Poly_drawSource

Drawing into convex Polyhedron.

This module implements algorithms to draw uniformally in a convex polyhedron given a set of generators.

Sourcetype point = float list
Sourceval draw_point_cheap : point list -> point

This one is cheaper, but a little bit unfair (i.e., not uniform).

Sourceval draw_n_distinct_points : int -> point list -> point list

Draws n dictinct points among a list of points l, or |l| if |l|<n (typically, vertices).

Sourceval draw_n_points : int -> point list -> point list

Draws n points among a list of points (any point may be drawn several times).

A fair but possibly inefficient drawing function.
Sourcetype poly_wrap

Parallelogram envelopping a convex Polyhedron defined by a set of generators.

Sourceval compute_poly_wrap : point list -> poly_wrap
Sourceval one_point_poly_wrap : poly_wrap -> point

Draw one point in a poly_wrap.

BEWARE: the point returned by one_point_poly_wrap is not necessary a solution!

Sourceval n_points_poly_wrap : poly_wrap -> int -> point list

Draw n points in a poly_wrap.

OCaml

Innovation. Community. Security.