package geoml

  1. Overview
  2. Docs

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

type t = private Constraint.t list
val make : Constraint.t list -> t
val is_empty : t -> bool

checks if the space defined by the constraint list is empty

val is_closed : t -> bool

checks if the space defined by the constraint list is finite

val is_open : t -> bool

checks if the space defined by the constraint list is infinite

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

remove redundant constraints of a polyhedra

val of_polygon : Polygon.Convex.t -> t

returns the polyhedron corresponding to the space defined by a polygon

val 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

val get_constr : t -> Constraint.t list

returns the list of constraint of the polyhedron

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

prints the list of constraint of the polyhedron

OCaml

Innovation. Community. Security.