package geoml

  1. Overview
  2. Docs

Module PolyhedronSource

The module for the polyhedron manipulation. We use the term "polyhedron" to define a set of linear constraint. Each constraint defines a half-plan. A polyhedron is then determined by the intersections of all the half-plans formed by its constaint. It differs from polygons which represent finite enveloppes (For example, convex polygons are a particular cases of polyhedra, which can be infinite).

Sourcetype t = private Constraint.t list
Sourceval make : Constraint.t list -> t
Sourceval is_empty : t -> bool

checks if the space defined by the constraint list is empty

Sourceval is_closed : t -> bool

checks if the space defined by the constraint list is finite

Sourceval is_open : t -> bool

checks if the space defined by the constraint list is infinite

Sourceval contains : t -> Point.t -> bool
Sourceval translate : float -> float -> t -> t
Sourceval intersection : t -> t -> t
Sourceval remove_redundancies : t -> t

remove redundant constraints of a polyhedra

Sourceval of_polygon : Polygon.Convex.t -> t

returns the polyhedron corresponding to the space defined by a polygon

Sourceval to_polygon : t -> Polygon.Convex.t

returns the polygon corresponding to the space defined by a polyhedron. raises a failure if the polyhedron is open

Sourceval get_constr : t -> Constraint.t list

returns the list of constraint of the polyhedron

Sourceval print : Format.formatter -> t -> unit

prints the list of constraint of the polyhedron

OCaml

Innovation. Community. Security.