Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > e7618febbb9cbed15bb79e326774c050 > files > 1312

ompl-devel-0.9.5-1.fc14.i686.rpm

<!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/xhtml; charset=UTF-8"/>
<title>OMPL: Operators for States and State Spaces</title>
<meta name="author" content="Ioan A. Șucan, Mark Moll, Lydia E. Kavraki">
<link rel="stylesheet" href="../css/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="../css/print.css" type="text/css" media="print">
<!--[if lt IE 7]>
<script type="text/javascript" src="../js/jquery/jquery.js"></script>
<script type="text/javascript" src="../js/jquery/jquery.dropdown.js"></script>
<![endif]-->
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-9156598-2']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search API');
--></script>
<div class="navigation" id="top">
  <div class="tabs" id="ompltitle">
    <ul class="tablist">
      <li>The Open Motion Planning Library</li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search API" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>

  <ul id="nav" class="dropdown">
    <li class="first"><a href="index.html">Home</a></li>
    <li><a href="download.html">Download</a></li>
    <li><a href="documentation.html">Documentation</a></li>
    <li><span class="dir">Code API</span>
      <ul>
        <li><a href="api_overview.html">API Overview</a></li>
        <li><a href="namespaces.html">Namespaces</a></li>
        <li><a href="annotated.html">Classes</a></li>
        <li><a href="files.html">Files</a></li>
        <li><a href="dirs.html">Directories</a></li>
      </ul>
    </li>
    <li><span class="dir">Community</span>
      <ul>
        <li><a href="developers.html">Developers</a></li>
        <li><a href="thirdparty.html">Contributions</a></li>
        <li><a href="education.html">Education</a></li>
        <li><a href="gallery.html">Gallery</a></li>
      </ul>
    </li>
    <li><span class="dir">About</span>
      <ul>
        <li><a href="license.html">License</a></li>
        <li><a href="citations.html">Citations</a></li>
        <li><a href="acknowledgements.html">Acknowledgments</a></li>
        <li><a href="contact.html">Contact Us</a></li>
      </ul>
    </li>
  </ul>
</div>

<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
  onmouseover="return searchBox.OnSearchSelectShow()"
  onmouseout="return searchBox.OnSearchSelectHide()"
  onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
  <iframe src="" frameborder="0"name="MSearchResults" id="MSearchResults"></iframe>
</div>

<div class="container">
  <div class="span-22 push-2 first last">
  <div>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Operators for States and State Spaces</div>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memTemplParams" colspan="2"><a class="anchor" id="ga17c5c6bebdc795305757693385c0593a"></a><!-- doxytag: member="stateAndSpaceOperators::operator&lt;&lt;" ref="ga17c5c6bebdc795305757693385c0593a" args="(std::ostream &amp;out, const ScopedState&lt; T &gt; &amp;state)" -->
template&lt;class T &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stateAndSpaceOperators.html#ga17c5c6bebdc795305757693385c0593a">ompl::base::operator&lt;&lt;</a> (std::ostream &amp;out, const ScopedState&lt; T &gt; &amp;state)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Overload stream output operator. Calls <a class="el" href="classompl_1_1base_1_1StateSpace.html#a5f92fa826285aaa7adff4c1fd07a4023" title="Print a state to a stream.">ompl::base::StateSpace::printState()</a> <br/></td></tr>
<tr><td class="memTemplParams" colspan="2"><a class="anchor" id="gaf8a616d4ac7f5f856d8a5fe95bb6ae73"></a><!-- doxytag: member="stateAndSpaceOperators::operator&lt;&lt;" ref="gaf8a616d4ac7f5f856d8a5fe95bb6ae73" args="(ScopedState&lt; T &gt; &amp;to, const ScopedState&lt; Y &gt; &amp;from)" -->
template&lt;class T , class Y &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">ScopedState&lt; T &gt; &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stateAndSpaceOperators.html#gaf8a616d4ac7f5f856d8a5fe95bb6ae73">ompl::base::operator&lt;&lt;</a> (ScopedState&lt; T &gt; &amp;to, const ScopedState&lt; Y &gt; &amp;from)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This is a fancy version of the assignment operator. It is a partial assignment, in some sense. The difference is that if the states are part of compound state spaces, the data is copied from <em>from</em> to <em>to</em> on a component by component basis. <a class="el" href="classompl_1_1base_1_1State.html" title="Definition of an abstract state.">State</a> spaces are matched by name. If the state space for <em>to</em> contains any subspace whose name matches any subspace of the state space for <em>from</em>, the corresponding state components are copied. <br/></td></tr>
<tr><td class="memTemplParams" colspan="2"><a class="anchor" id="ga5d41ba2026ef0c1de62ac81813ca7046"></a><!-- doxytag: member="stateAndSpaceOperators::operator&gt;&gt;" ref="ga5d41ba2026ef0c1de62ac81813ca7046" args="(const ScopedState&lt; T &gt; &amp;from, ScopedState&lt; Y &gt; &amp;to)" -->
template&lt;class T , class Y &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">const ScopedState&lt; T &gt; &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stateAndSpaceOperators.html#ga5d41ba2026ef0c1de62ac81813ca7046">ompl::base::operator&gt;&gt;</a> (const ScopedState&lt; T &gt; &amp;from, ScopedState&lt; Y &gt; &amp;to)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This is a fancy version of the assignment operator. It is a partial assignment, in some sense. The difference is that if the states are part of compound state spaces, the data is copied from <em>from</em> to <em>to</em> on a component by component basis. <a class="el" href="classompl_1_1base_1_1State.html" title="Definition of an abstract state.">State</a> spaces are matched by name. If the state space for <em>to</em> contains any subspace whose name matches any subspace of the state space for <em>from</em>, the corresponding state components are copied. <br/></td></tr>
<tr><td class="memTemplParams" colspan="2"><a class="anchor" id="ga6db8232ebedcab3a50779bc50a6b495c"></a><!-- doxytag: member="stateAndSpaceOperators::operator^" ref="ga6db8232ebedcab3a50779bc50a6b495c" args="(const ScopedState&lt; T &gt; &amp;a, const ScopedState&lt; Y &gt; &amp;b)" -->
template&lt;class T , class Y &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">ScopedState&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stateAndSpaceOperators.html#ga6db8232ebedcab3a50779bc50a6b495c">ompl::base::operator^</a> (const ScopedState&lt; T &gt; &amp;a, const ScopedState&lt; Y &gt; &amp;b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Given state <em>a</em> from state space A and state <em>b</em> from state space B, construct a state from state space A + B. The resulting state contains all the information from the input states (the states are concatenated). <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1a2a068c3ba88614e32425cf4c493261"></a><!-- doxytag: member="stateAndSpaceOperators::operator+" ref="ga1a2a068c3ba88614e32425cf4c493261" args="(const StateSpacePtr &amp;a, const StateSpacePtr &amp;b)" -->
StateSpacePtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stateAndSpaceOperators.html#ga1a2a068c3ba88614e32425cf4c493261">ompl::base::operator+</a> (const StateSpacePtr &amp;a, const StateSpacePtr &amp;b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a compound state space from two existing state spaces. The components of this compound space are <em>a</em> (or the components of <em>a</em>, if <em>a</em> is compound) and <em>b</em> (or the components of <em>b</em>, if <em>b</em> is compound). <a class="el" href="classompl_1_1base_1_1State.html" title="Definition of an abstract state.">State</a> spaces are identified by name. Duplicates are checked for and added only once. If the compound state space would end up containing solely one component, that component is returned instead. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga849c861f1e209144fbab68a95c479eb8"></a><!-- doxytag: member="stateAndSpaceOperators::operator&#45;" ref="ga849c861f1e209144fbab68a95c479eb8" args="(const StateSpacePtr &amp;a, const StateSpacePtr &amp;b)" -->
StateSpacePtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stateAndSpaceOperators.html#ga849c861f1e209144fbab68a95c479eb8">ompl::base::operator-</a> (const StateSpacePtr &amp;a, const StateSpacePtr &amp;b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a compound state space that contains subspaces only from <em>a</em>. If <em>a</em> is compound, <em>b</em> (or the components from <em>b</em>, if <em>b</em> is compound) are removed and the remaining components are returned as a compound state space. If the compound space would end up containing solely one component, that component is returned instead. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae1b5c9d6ea57481723cf8a9683a4eabc"></a><!-- doxytag: member="stateAndSpaceOperators::operator&#45;" ref="gae1b5c9d6ea57481723cf8a9683a4eabc" args="(const StateSpacePtr &amp;a, const std::string &amp;name)" -->
StateSpacePtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stateAndSpaceOperators.html#gae1b5c9d6ea57481723cf8a9683a4eabc">ompl::base::operator-</a> (const StateSpacePtr &amp;a, const std::string &amp;name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a compound state space that contains subspaces only from <em>a</em>, except for maybe the one named <em>name</em>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga16229a85742bb392d45ea9fdc49d7434"></a><!-- doxytag: member="stateAndSpaceOperators::operator*" ref="ga16229a85742bb392d45ea9fdc49d7434" args="(const StateSpacePtr &amp;a, const StateSpacePtr &amp;b)" -->
StateSpacePtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stateAndSpaceOperators.html#ga16229a85742bb392d45ea9fdc49d7434">ompl::base::operator*</a> (const StateSpacePtr &amp;a, const StateSpacePtr &amp;b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a compound state space that contains subspaces that are in both <em>a</em> and <em>b</em>. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>These operators are intended to simplify code that manipulates states and state spaces. They rely on the fact that state spaces have unique names. Here are some examples for using these operators: </p>
<div class="fragment"><pre class="fragment">           <span class="comment">// Assume X, Y, Z, W are state space instances, none of</span>
           <span class="comment">// which inherits from ompl::base::CompoundStateSpace.</span>
           <span class="comment">// Denote a compound state space as C[...], where &quot;...&quot; is the</span>
           <span class="comment">// list of subspaces.</span>

           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> X;
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> Y;
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> Z;
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> W;

           <span class="comment">// the following line will construct a state space C1 = C[X, Y]</span>
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> C1 = X + Y;

           <span class="comment">// the following line will construct a state space C2 = C[X, Y, Z]</span>
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> C2 = C1 + Z;

           <span class="comment">// the following line will leave C2 as C[X, Y, Z]</span>
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> C2 = C1 + C2;

           <span class="comment">// the following line will construct a state space C2 = C[X, Y, Z, W]</span>
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> C2 = C2 + W;

           <span class="comment">// the following line will construct a state space C3 = C[X, Z, Y]</span>
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> C3 = X + Z + Y;

           <span class="comment">// the following line will construct a state space C4 = C[Z, W]</span>
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> C4 = C2 - C1;

           <span class="comment">// the following line will construct a state space C5 = W</span>
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> C5 = C2 - C3;

           <span class="comment">// the following line will construct an empty state space C6 = C[]</span>
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> C6 = X - X;

           <span class="comment">// the following line will construct an empty state space C7 = Y</span>
           <a class="code" href="classompl_1_1base_1_1StateSpacePtr.html" title="A boost shared pointer wrapper for ompl::base::StateSpace.">ompl::base::StateSpacePtr</a> C7 = Y + C6;
</pre></div><p> These state spaces can be used when operating with states: </p>
<div class="fragment"><pre class="fragment">           <a class="code" href="classompl_1_1base_1_1ScopedState.html" title="Definition of a scoped state.">ompl::base::ScopedState&lt;&gt;</a> sX(X);
           <a class="code" href="classompl_1_1base_1_1ScopedState.html" title="Definition of a scoped state.">ompl::base::ScopedState&lt;&gt;</a> sXY(X + Y);
           <a class="code" href="classompl_1_1base_1_1ScopedState.html" title="Definition of a scoped state.">ompl::base::ScopedState&lt;&gt;</a> sY(Y);
           <a class="code" href="classompl_1_1base_1_1ScopedState.html" title="Definition of a scoped state.">ompl::base::ScopedState&lt;&gt;</a> sZX(Z + X);
           <a class="code" href="classompl_1_1base_1_1ScopedState.html" title="Definition of a scoped state.">ompl::base::ScopedState&lt;&gt;</a> sXZW(X + Z + W);

           <span class="comment">// the following line will copy the content of the state sX to</span>
           <span class="comment">// the corresponding locations in sXZW. The components of the state</span>
           <span class="comment">// corresponding to the Z and W state spaces are not touched</span>
           sX &gt;&gt; sXZW;

           <span class="comment">// the following line will initialize the X component of sXY with</span>
           <span class="comment">// the X component of sXZW;</span>
           sXY &lt;&lt; sXZW;

           <span class="comment">// the following line will initialize both components of sZX, using</span>
           <span class="comment">// the X and Z components of sXZW;</span>
           sZX &lt;&lt; sXZW;

           <span class="comment">// the following line compares the concatenation of states sX and sY with sXY</span>
           <span class="comment">// the concatenation will automatically construct the state space X + Y and a state</span>
           <span class="comment">// from that state space containing the information from sX and sY. Since sXY is</span>
           <span class="comment">// constructed from the state space X + Y, the two are comparable.</span>
           <span class="keywordtype">bool</span> eq = (sX ^ sY) == sXY;
</pre></div> </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div>

<div class="footer span-22 push-2 last">
  <a href="http://www.kavrakilab.org">Physical and Biological Computing Group</a> &bull;
  <a href="http://www.cs.rice.edu">Department of Computer Science</a> &bull;
  <a href="http://www.rice.edu">Rice University</a><br>
  <div class="gray">Generated on Sun Oct 9 2011 23:04:41 by&#160;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.7.4</div>
</div>
</div>
</body>
</html>