<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Polyhedron (geoml.Geoml.Polyhedron)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.1.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> â€“ <a href="../../index.html">geoml</a> &#x00BB; <a href="../index.html">Geoml</a> &#x00BB; Polyhedron</nav><header class="odoc-preamble"><h1>Module <code><span>Geoml.Polyhedron</span></code></h1><p>The module for the polyhedron manipulation. We use the term &quot;polyhedron&quot; 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).</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type" id="type-t" class="anchored"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = <span class="keyword">private</span> <span><a href="../Constraint/index.html#type-t">Constraint.t</a> list</span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-make" class="anchored"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make : <span><span><a href="../Constraint/index.html#type-t">Constraint.t</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-is_empty" class="anchored"><a href="#val-is_empty" class="anchor"></a><code><span><span class="keyword">val</span> is_empty : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div><div class="spec-doc"><p>checks if the space defined by the constraint list is empty</p></div></div><div class="odoc-spec"><div class="spec value" id="val-is_closed" class="anchored"><a href="#val-is_closed" class="anchor"></a><code><span><span class="keyword">val</span> is_closed : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div><div class="spec-doc"><p>checks if the space defined by the constraint list is finite</p></div></div><div class="odoc-spec"><div class="spec value" id="val-is_open" class="anchored"><a href="#val-is_open" class="anchor"></a><code><span><span class="keyword">val</span> is_open : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div><div class="spec-doc"><p>checks if the space defined by the constraint list is infinite</p></div></div><div class="odoc-spec"><div class="spec value" id="val-contains" class="anchored"><a href="#val-contains" class="anchor"></a><code><span><span class="keyword">val</span> contains : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Point/index.html#type-t">Point.t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-translate" class="anchored"><a href="#val-translate" class="anchor"></a><code><span><span class="keyword">val</span> translate : <span>float <span class="arrow">&#45;&gt;</span></span> <span>float <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-intersection" class="anchored"><a href="#val-intersection" class="anchor"></a><code><span><span class="keyword">val</span> intersection : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-remove_redundancies" class="anchored"><a href="#val-remove_redundancies" class="anchor"></a><code><span><span class="keyword">val</span> remove_redundancies : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>remove redundant constraints of a polyhedra</p></div></div><div class="odoc-spec"><div class="spec value" id="val-of_polygon" class="anchored"><a href="#val-of_polygon" class="anchor"></a><code><span><span class="keyword">val</span> of_polygon : <span><a href="../Polygon/Convex/index.html#type-t">Polygon.Convex.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>returns the polyhedron corresponding to the space defined by a polygon</p></div></div><div class="odoc-spec"><div class="spec value" id="val-to_polygon" class="anchored"><a href="#val-to_polygon" class="anchor"></a><code><span><span class="keyword">val</span> to_polygon : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Polygon/Convex/index.html#type-t">Polygon.Convex.t</a></span></code></div><div class="spec-doc"><p>returns the polygon corresponding to the space defined by a polyhedron. raises a failure if the polyhedron is open</p></div></div><div class="odoc-spec"><div class="spec value" id="val-get_constr" class="anchored"><a href="#val-get_constr" class="anchor"></a><code><span><span class="keyword">val</span> get_constr : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Constraint/index.html#type-t">Constraint.t</a> list</span></span></code></div><div class="spec-doc"><p>returns the list of constraint of the polyhedron</p></div></div><div class="odoc-spec"><div class="spec value" id="val-print" class="anchored"><a href="#val-print" class="anchor"></a><code><span><span class="keyword">val</span> print : <span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>prints the list of constraint of the polyhedron</p></div></div></div></body></html>