pypdevsbbl.extra.spatial.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>pypdevsbbl.extra.spatial module &#8212; Python(P)DEVS-BBL documentation</title>
  8. <link rel="stylesheet" href="_static/nature.css" type="text/css" />
  9. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  10. <link rel="stylesheet" type="text/css" href="_static/custom.css" />
  11. <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
  12. <script type="text/javascript" src="_static/jquery.js"></script>
  13. <script type="text/javascript" src="_static/underscore.js"></script>
  14. <script type="text/javascript" src="_static/doctools.js"></script>
  15. <script type="text/javascript" src="_static/language_data.js"></script>
  16. <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  17. <link rel="index" title="Index" href="genindex.html" />
  18. <link rel="search" title="Search" href="search.html" />
  19. <link rel="next" title="pypdevsbbl.generic package" href="pypdevsbbl.generic.html" />
  20. <link rel="prev" title="pypdevsbbl.extra.queues module" href="pypdevsbbl.extra.queues.html" />
  21. </head><body>
  22. <div class="related" role="navigation" aria-label="related navigation">
  23. <h3>Navigation</h3>
  24. <ul>
  25. <li class="right" style="margin-right: 10px">
  26. <a href="genindex.html" title="General Index"
  27. accesskey="I">index</a></li>
  28. <li class="right" >
  29. <a href="py-modindex.html" title="Python Module Index"
  30. >modules</a> |</li>
  31. <li class="right" >
  32. <a href="pypdevsbbl.generic.html" title="pypdevsbbl.generic package"
  33. accesskey="N">next</a> |</li>
  34. <li class="right" >
  35. <a href="pypdevsbbl.extra.queues.html" title="pypdevsbbl.extra.queues module"
  36. accesskey="P">previous</a> |</li>
  37. <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> &#187;</li>
  38. <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> &#187;</li>
  39. <li class="nav-item nav-item-2"><a href="pypdevsbbl.extra.html" accesskey="U">pypdevsbbl.extra package</a> &#187;</li>
  40. </ul>
  41. </div>
  42. <div class="document">
  43. <div class="documentwrapper">
  44. <div class="bodywrapper">
  45. <div class="body" role="main">
  46. <div class="section" id="module-pypdevsbbl.extra.spatial">
  47. <span id="pypdevsbbl-extra-spatial-module"></span><h1>pypdevsbbl.extra.spatial module<a class="headerlink" href="#module-pypdevsbbl.extra.spatial" title="Permalink to this headline">¶</a></h1>
  48. <p>This file contains additional classes w.r.t. spatial properties.</p>
  49. <p>Such properties include:
  50. - Coordinates
  51. - Distance computation
  52. - Multiple axes movement</p>
  53. <dl class="class">
  54. <dt id="pypdevsbbl.extra.spatial.Coordinate">
  55. <em class="property">class </em><code class="descclassname">pypdevsbbl.extra.spatial.</code><code class="descname">Coordinate</code><span class="sig-paren">(</span><em>x</em>, <em>y</em>, <em>z</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/spatial.html#Coordinate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.spatial.Coordinate" title="Permalink to this definition">¶</a></dt>
  56. <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
  57. <p>Simple 3-dimensional coordinate.</p>
  58. <p>A coordinate in 3D will follow a cartesian coorinate system over
  59. 3 axes: x, y and z.</p>
  60. <table class="docutils field-list" frame="void" rules="none">
  61. <col class="field-name" />
  62. <col class="field-body" />
  63. <tbody valign="top">
  64. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  65. <li><strong>x</strong> (<em>numeric</em>) – The x-value of the coordinate.</li>
  66. <li><strong>y</strong> (<em>numeric</em>) – The y-value of the coordinate.</li>
  67. <li><strong>z</strong> (<em>numeric</em>) – The z-value of the coordinate.</li>
  68. </ul>
  69. </td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. </dd></dl>
  74. <dl class="class">
  75. <dt id="pypdevsbbl.extra.spatial.distance">
  76. <em class="property">class </em><code class="descclassname">pypdevsbbl.extra.spatial.</code><code class="descname">distance</code><a class="reference internal" href="_modules/pypdevsbbl/extra/spatial.html#distance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.spatial.distance" title="Permalink to this definition">¶</a></dt>
  77. <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
  78. <p>Compute the distance between two points.</p>
  79. <dl class="staticmethod">
  80. <dt id="pypdevsbbl.extra.spatial.distance.euclidean">
  81. <em class="property">static </em><code class="descname">euclidean</code><span class="sig-paren">(</span><em>A</em>, <em>B</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/spatial.html#distance.euclidean"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.spatial.distance.euclidean" title="Permalink to this definition">¶</a></dt>
  82. <dd><p>Computes the Euclidean distance between <code class="xref py py-attr docutils literal notranslate"><span class="pre">A</span></code> and <code class="xref py py-attr docutils literal notranslate"><span class="pre">B</span></code>.</p>
  83. <table class="docutils field-list" frame="void" rules="none">
  84. <col class="field-name" />
  85. <col class="field-body" />
  86. <tbody valign="top">
  87. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  88. <li><strong>A</strong> (<a class="reference internal" href="#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><em>Coordinate</em></a>) – The first coordinate.</li>
  89. <li><strong>B</strong> (<a class="reference internal" href="#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><em>Coordinate</em></a>) – The second coordinate.</li>
  90. </ul>
  91. </td>
  92. </tr>
  93. </tbody>
  94. </table>
  95. </dd></dl>
  96. <dl class="staticmethod">
  97. <dt id="pypdevsbbl.extra.spatial.distance.manhattan">
  98. <em class="property">static </em><code class="descname">manhattan</code><span class="sig-paren">(</span><em>A</em>, <em>B</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/spatial.html#distance.manhattan"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.spatial.distance.manhattan" title="Permalink to this definition">¶</a></dt>
  99. <dd><p>Computes the Manhattan distance between <code class="xref py py-attr docutils literal notranslate"><span class="pre">A</span></code> and <code class="xref py py-attr docutils literal notranslate"><span class="pre">B</span></code>.</p>
  100. <table class="docutils field-list" frame="void" rules="none">
  101. <col class="field-name" />
  102. <col class="field-body" />
  103. <tbody valign="top">
  104. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  105. <li><strong>A</strong> (<a class="reference internal" href="#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><em>Coordinate</em></a>) – The first coordinate.</li>
  106. <li><strong>B</strong> (<a class="reference internal" href="#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><em>Coordinate</em></a>) – The second coordinate.</li>
  107. </ul>
  108. </td>
  109. </tr>
  110. </tbody>
  111. </table>
  112. </dd></dl>
  113. <dl class="staticmethod">
  114. <dt id="pypdevsbbl.extra.spatial.distance.chebyshev">
  115. <em class="property">static </em><code class="descname">chebyshev</code><span class="sig-paren">(</span><em>A</em>, <em>B</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/spatial.html#distance.chebyshev"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.spatial.distance.chebyshev" title="Permalink to this definition">¶</a></dt>
  116. <dd><p>Computes the Chebyshev distance between <code class="xref py py-attr docutils literal notranslate"><span class="pre">A</span></code> and <code class="xref py py-attr docutils literal notranslate"><span class="pre">B</span></code>.</p>
  117. <table class="docutils field-list" frame="void" rules="none">
  118. <col class="field-name" />
  119. <col class="field-body" />
  120. <tbody valign="top">
  121. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  122. <li><strong>A</strong> (<a class="reference internal" href="#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><em>Coordinate</em></a>) – The first coordinate.</li>
  123. <li><strong>B</strong> (<a class="reference internal" href="#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><em>Coordinate</em></a>) – The second coordinate.</li>
  124. </ul>
  125. </td>
  126. </tr>
  127. </tbody>
  128. </table>
  129. </dd></dl>
  130. <dl class="staticmethod">
  131. <dt id="pypdevsbbl.extra.spatial.distance.minkowski">
  132. <em class="property">static </em><code class="descname">minkowski</code><span class="sig-paren">(</span><em>A</em>, <em>B</em>, <em>p=2</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/spatial.html#distance.minkowski"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.spatial.distance.minkowski" title="Permalink to this definition">¶</a></dt>
  133. <dd><p>Computes the Minkowski distance between <code class="xref py py-attr docutils literal notranslate"><span class="pre">A</span></code> and <code class="xref py py-attr docutils literal notranslate"><span class="pre">B</span></code>.</p>
  134. <table class="docutils field-list" frame="void" rules="none">
  135. <col class="field-name" />
  136. <col class="field-body" />
  137. <tbody valign="top">
  138. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  139. <li><strong>A</strong> (<a class="reference internal" href="#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><em>Coordinate</em></a>) – The first coordinate.</li>
  140. <li><strong>B</strong> (<a class="reference internal" href="#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><em>Coordinate</em></a>) – The second coordinate.</li>
  141. <li><strong>p</strong> (<em>int</em>) – The order of the distance. Must be greater than
  142. or equal to 1. Defaults to 2 (= <a class="reference internal" href="#pypdevsbbl.extra.spatial.distance.euclidean" title="pypdevsbbl.extra.spatial.distance.euclidean"><code class="xref py py-meth docutils literal notranslate"><span class="pre">euclidean()</span></code></a>).</li>
  143. </ul>
  144. </td>
  145. </tr>
  146. </tbody>
  147. </table>
  148. </dd></dl>
  149. </dd></dl>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  155. <div class="sphinxsidebarwrapper">
  156. <h4>Previous topic</h4>
  157. <p class="topless"><a href="pypdevsbbl.extra.queues.html"
  158. title="previous chapter">pypdevsbbl.extra.queues module</a></p>
  159. <h4>Next topic</h4>
  160. <p class="topless"><a href="pypdevsbbl.generic.html"
  161. title="next chapter">pypdevsbbl.generic package</a></p>
  162. <div id="searchbox" style="display: none" role="search">
  163. <h3>Quick search</h3>
  164. <div class="searchformwrapper">
  165. <form class="search" action="search.html" method="get">
  166. <input type="text" name="q" />
  167. <input type="submit" value="Go" />
  168. <input type="hidden" name="check_keywords" value="yes" />
  169. <input type="hidden" name="area" value="default" />
  170. </form>
  171. </div>
  172. </div>
  173. <script type="text/javascript">$('#searchbox').show(0);</script>
  174. </div>
  175. </div>
  176. <div class="clearer"></div>
  177. </div>
  178. <div class="related" role="navigation" aria-label="related navigation">
  179. <h3>Navigation</h3>
  180. <ul>
  181. <li class="right" style="margin-right: 10px">
  182. <a href="genindex.html" title="General Index"
  183. >index</a></li>
  184. <li class="right" >
  185. <a href="py-modindex.html" title="Python Module Index"
  186. >modules</a> |</li>
  187. <li class="right" >
  188. <a href="pypdevsbbl.generic.html" title="pypdevsbbl.generic package"
  189. >next</a> |</li>
  190. <li class="right" >
  191. <a href="pypdevsbbl.extra.queues.html" title="pypdevsbbl.extra.queues module"
  192. >previous</a> |</li>
  193. <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> &#187;</li>
  194. <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> &#187;</li>
  195. <li class="nav-item nav-item-2"><a href="pypdevsbbl.extra.html" >pypdevsbbl.extra package</a> &#187;</li>
  196. </ul>
  197. </div>
  198. <div class="footer" role="contentinfo">
  199. &#169; Copyright 2020, Randy Paredis.
  200. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
  201. </div>
  202. </body>
  203. </html>