This file is indexed.

/usr/share/doc/libghc-gloss-doc/html/Graphics-Gloss-Data-QuadTree.html is in libghc-gloss-doc 1.7.8.3-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Graphics.Gloss.Data.QuadTree</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Graphics-Gloss-Data-QuadTree.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-Gloss-Data-QuadTree.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">gloss-1.7.8.3: Painless 2D vector graphics, animations and simulations.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Graphics.Gloss.Data.QuadTree</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A QuadTree can be used to recursively divide up 2D space into quadrants.
   The smallest division corresponds to an unit <code><a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></code>, so the total depth 
   of the tree will depend on what sized <code><a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></code> you start with.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span>  <a href="#t:QuadTree">QuadTree</a> a<ul class="subs"><li>= <a href="#v:TNil">TNil</a>  </li><li>| <a href="#v:TLeaf">TLeaf</a> a  </li><li>| <a href="#v:TNode">TNode</a> (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a) (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a) (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a) (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a)  </li></ul></li><li class="src short"><a href="#v:emptyTree">emptyTree</a> ::  <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a</li><li class="src short"><a href="#v:emptyNode">emptyNode</a> ::  <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a</li><li class="src short"><a href="#v:takeQuadOfTree">takeQuadOfTree</a> ::  <a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a> -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a)</li><li class="src short"><a href="#v:liftToQuad">liftToQuad</a> ::  <a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a> -&gt; (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a) -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a</li><li class="src short"><a href="#v:insertByPath">insertByPath</a> ::  [<a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a>] -&gt; a -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a</li><li class="src short"><a href="#v:insertByCoord">insertByCoord</a> ::  <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a> -&gt; a -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a)</li><li class="src short"><a href="#v:lookupNodeByPath">lookupNodeByPath</a> ::  [<a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a>] -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a)</li><li class="src short"><a href="#v:lookupByPath">lookupByPath</a> ::  [<a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a>] -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a</li><li class="src short"><a href="#v:lookupByCoord">lookupByCoord</a> :: <span class="keyword">forall</span> a.  <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a> -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a</li><li class="src short"><a href="#v:flattenQuadTree">flattenQuadTree</a> :: <span class="keyword">forall</span> a.  <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; [(<a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a>, a)]</li><li class="src short"><a href="#v:flattenQuadTreeWithExtents">flattenQuadTreeWithExtents</a> :: <span class="keyword">forall</span> a.  <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; [(<a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a>, a)]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:QuadTree" class="def">QuadTree</a> a <a href="src/Graphics-Gloss-Data-QuadTree.html#QuadTree" class="link">Source</a></p><div class="doc"><p>The quad tree structure.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TNil" class="def">TNil</a></td><td class="doc"><p>An empty node.
</p></td></tr><tr><td class="src"><a name="v:TLeaf" class="def">TLeaf</a> a</td><td class="doc"><p>A leaf containint some value.
</p></td></tr><tr><td class="src"><a name="v:TNode" class="def">TNode</a> (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a) (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a) (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a) (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a)</td><td class="doc"><p>A node with four children.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:QuadTree" class="caption collapser" onclick="toggleSection('i:QuadTree')">Instances</p><div id="section.i:QuadTree" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:emptyTree" class="def">emptyTree</a> ::  <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a<a href="src/Graphics-Gloss-Data-QuadTree.html#emptyTree" class="link">Source</a></p><div class="doc"><p>A <code><a href="Graphics-Gloss-Data-QuadTree.html#v:TNil">TNil</a></code> tree.
</p></div></div><div class="top"><p class="src"><a name="v:emptyNode" class="def">emptyNode</a> ::  <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a<a href="src/Graphics-Gloss-Data-QuadTree.html#emptyNode" class="link">Source</a></p><div class="doc"><p>A node with <code><a href="Graphics-Gloss-Data-QuadTree.html#v:TNil">TNil</a></code>. for all its branches.
</p></div></div><div class="top"><p class="src"><a name="v:takeQuadOfTree" class="def">takeQuadOfTree</a> ::  <a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a> -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a)<a href="src/Graphics-Gloss-Data-QuadTree.html#takeQuadOfTree" class="link">Source</a></p><div class="doc"><p>Get a quadrant from a node.
   If the tree does not have an outer node then <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Nothing">Nothing</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:liftToQuad" class="def">liftToQuad</a> ::  <a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a> -&gt; (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a) -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a<a href="src/Graphics-Gloss-Data-QuadTree.html#liftToQuad" class="link">Source</a></p><div class="doc"><p>Apply a function to a quadrant of a node.
   If the tree does not have an outer node then return the original tree.
</p></div></div><div class="top"><p class="src"><a name="v:insertByPath" class="def">insertByPath</a> ::  [<a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a>] -&gt; a -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a<a href="src/Graphics-Gloss-Data-QuadTree.html#insertByPath" class="link">Source</a></p><div class="doc"><p>Insert a value into the tree at the position given by a path.
   If the path intersects an existing <code><a href="Graphics-Gloss-Data-QuadTree.html#v:TLeaf">TLeaf</a></code> then return the original tree.
</p></div></div><div class="top"><p class="src"><a name="v:insertByCoord" class="def">insertByCoord</a> ::  <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a> -&gt; a -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a)<a href="src/Graphics-Gloss-Data-QuadTree.html#insertByCoord" class="link">Source</a></p><div class="doc"><p>Insert a value into the node containing this coordinate.
   The node is created at maximum depth, corresponding to an unit <code><a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:lookupNodeByPath" class="def">lookupNodeByPath</a> ::  [<a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a>] -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a)<a href="src/Graphics-Gloss-Data-QuadTree.html#lookupNodeByPath" class="link">Source</a></p><div class="doc"><p>Lookup a node based on a path to it.
</p></div></div><div class="top"><p class="src"><a name="v:lookupByPath" class="def">lookupByPath</a> ::  [<a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a>] -&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a<a href="src/Graphics-Gloss-Data-QuadTree.html#lookupByPath" class="link">Source</a></p><div class="doc"><p>Lookup an element based given a path to it.
</p></div></div><div class="top"><p class="src"><a name="v:lookupByCoord" class="def">lookupByCoord</a><a href="src/Graphics-Gloss-Data-QuadTree.html#lookupByCoord" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <span class="keyword">forall</span> a . </td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></td><td class="doc"><p>Extent that covers the whole tree.
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a></td><td class="doc"><p>Coordinate of the value of interest.
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Lookup a node if a tree given a coordinate which it contains.
</p></div></div><div class="top"><p class="src"><a name="v:flattenQuadTree" class="def">flattenQuadTree</a><a href="src/Graphics-Gloss-Data-QuadTree.html#flattenQuadTree" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <span class="keyword">forall</span> a . </td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></td><td class="doc"><p>Extent that covers the whole tree.
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; [(<a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a>, a)]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Flatten a QuadTree into a list of its contained values, with coordinates.
</p></div></div><div class="top"><p class="src"><a name="v:flattenQuadTreeWithExtents" class="def">flattenQuadTreeWithExtents</a><a href="src/Graphics-Gloss-Data-QuadTree.html#flattenQuadTreeWithExtents" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <span class="keyword">forall</span> a . </td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></td><td class="doc"><p>Extent that covers the whole tree.
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Data-QuadTree.html#t:QuadTree">QuadTree</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; [(<a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a>, a)]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Flatten a QuadTree into a list of its contained values, with coordinates.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>