Files
mlpack/doc/html/classmlpack_1_1tree_1_1MidpointSplit.html
T

407 lines
20 KiB
HTML

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>mlpack: mlpack::tree::MidpointSplit&lt; BoundType, MatType &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra-stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">mlpack
&#160;<span id="projectnumber">master</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<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" 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>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacemlpack.html">mlpack</a></li><li class="navelem"><a class="el" href="namespacemlpack_1_1tree.html">tree</a></li><li class="navelem"><a class="el" href="classmlpack_1_1tree_1_1MidpointSplit.html">MidpointSplit</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classmlpack_1_1tree_1_1MidpointSplit-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mlpack::tree::MidpointSplit&lt; BoundType, MatType &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A binary space partitioning tree node is split into its left and right child.
<a href="classmlpack_1_1tree_1_1MidpointSplit.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmlpack_1_1tree_1_1MidpointSplit_1_1SplitInfo.html">SplitInfo</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A struct that contains an information about the split. <a href="structmlpack_1_1tree_1_1MidpointSplit_1_1SplitInfo.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a4ee14de7e93943843c7b95c807e1e699"><td class="memTemplParams" colspan="2">template&lt;typename VecType &gt; </td></tr>
<tr class="memitem:a4ee14de7e93943843c7b95c807e1e699"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1MidpointSplit.html#a4ee14de7e93943843c7b95c807e1e699">AssignToLeftNode</a> (const VecType &amp;point, const <a class="el" href="structmlpack_1_1tree_1_1MidpointSplit_1_1SplitInfo.html">SplitInfo</a> &amp;splitInfo)</td></tr>
<tr class="memdesc:a4ee14de7e93943843c7b95c807e1e699"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates that a point should be assigned to the left subtree. <a href="#a4ee14de7e93943843c7b95c807e1e699">More...</a><br /></td></tr>
<tr class="separator:a4ee14de7e93943843c7b95c807e1e699"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66f6747fa959b473f7c0921b756080dc"><td class="memItemLeft" align="right" valign="top">static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1MidpointSplit.html#a66f6747fa959b473f7c0921b756080dc">PerformSplit</a> (MatType &amp;data, const size_t begin, const size_t count, const <a class="el" href="structmlpack_1_1tree_1_1MidpointSplit_1_1SplitInfo.html">SplitInfo</a> &amp;splitInfo)</td></tr>
<tr class="memdesc:a66f6747fa959b473f7c0921b756080dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform the split process according to the information about the split. <a href="#a66f6747fa959b473f7c0921b756080dc">More...</a><br /></td></tr>
<tr class="separator:a66f6747fa959b473f7c0921b756080dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e35881dc80212dd155f620e45a77be3"><td class="memItemLeft" align="right" valign="top">static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1MidpointSplit.html#a9e35881dc80212dd155f620e45a77be3">PerformSplit</a> (MatType &amp;data, const size_t begin, const size_t count, const <a class="el" href="structmlpack_1_1tree_1_1MidpointSplit_1_1SplitInfo.html">SplitInfo</a> &amp;splitInfo, std::vector&lt; size_t &gt; &amp;oldFromNew)</td></tr>
<tr class="memdesc:a9e35881dc80212dd155f620e45a77be3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform the split process according to the information about the split and return the list of changed indices. <a href="#a9e35881dc80212dd155f620e45a77be3">More...</a><br /></td></tr>
<tr class="separator:a9e35881dc80212dd155f620e45a77be3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95eff4025f6fef17cb5832472e006bbd"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1MidpointSplit.html#a95eff4025f6fef17cb5832472e006bbd">SplitNode</a> (const BoundType &amp;bound, MatType &amp;data, const size_t begin, const size_t count, <a class="el" href="structmlpack_1_1tree_1_1MidpointSplit_1_1SplitInfo.html">SplitInfo</a> &amp;splitInfo)</td></tr>
<tr class="memdesc:a95eff4025f6fef17cb5832472e006bbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the partition of the node. <a href="#a95eff4025f6fef17cb5832472e006bbd">More...</a><br /></td></tr>
<tr class="separator:a95eff4025f6fef17cb5832472e006bbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename BoundType, typename MatType = arma::mat&gt;<br />
class mlpack::tree::MidpointSplit&lt; BoundType, MatType &gt;</h3>
<p>A binary space partitioning tree node is split into its left and right child. </p>
<p>The split is done in the dimension that has the maximum width. The points are divided into two parts based on the midpoint in this dimension. </p>
<p>Definition at line <a class="el" href="midpoint__split_8hpp_source.html#l00030">30</a> of file <a class="el" href="midpoint__split_8hpp_source.html">midpoint_split.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4ee14de7e93943843c7b95c807e1e699"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename BoundType , typename MatType = arma::mat&gt; </div>
<div class="memtemplate">
template&lt;typename VecType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool <a class="el" href="classmlpack_1_1tree_1_1MidpointSplit.html">mlpack::tree::MidpointSplit</a>&lt; BoundType, MatType &gt;::AssignToLeftNode </td>
<td>(</td>
<td class="paramtype">const VecType &amp;&#160;</td>
<td class="paramname"><em>point</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structmlpack_1_1tree_1_1MidpointSplit_1_1SplitInfo.html">SplitInfo</a> &amp;&#160;</td>
<td class="paramname"><em>splitInfo</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Indicates that a point should be assigned to the left subtree. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">point</td><td>The point that is being assigned. </td></tr>
<tr><td class="paramname">splitInfo</td><td>An information about the split. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="midpoint__split_8hpp_source.html#l00115">115</a> of file <a class="el" href="midpoint__split_8hpp_source.html">midpoint_split.hpp</a>.</p>
<p>References <a class="el" href="midpoint__split_8hpp_source.html#l00037">mlpack::tree::MidpointSplit&lt; BoundType, MatType &gt;::SplitInfo::splitDimension</a>, and <a class="el" href="midpoint__split_8hpp_source.html#l00039">mlpack::tree::MidpointSplit&lt; BoundType, MatType &gt;::SplitInfo::splitVal</a>.</p>
</div>
</div>
<a class="anchor" id="a66f6747fa959b473f7c0921b756080dc"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename BoundType , typename MatType = arma::mat&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static size_t <a class="el" href="classmlpack_1_1tree_1_1MidpointSplit.html">mlpack::tree::MidpointSplit</a>&lt; BoundType, MatType &gt;::PerformSplit </td>
<td>(</td>
<td class="paramtype">MatType &amp;&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const size_t&#160;</td>
<td class="paramname"><em>begin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const size_t&#160;</td>
<td class="paramname"><em>count</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structmlpack_1_1tree_1_1MidpointSplit_1_1SplitInfo.html">SplitInfo</a> &amp;&#160;</td>
<td class="paramname"><em>splitInfo</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Perform the split process according to the information about the split. </p>
<p>This will order the dataset such that points that belong to the left subtree are on the left of the split column, and points from the right subtree are on the right side of the split column.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bound</td><td>The bound used for this node. </td></tr>
<tr><td class="paramname">data</td><td>The dataset used by the binary space tree. </td></tr>
<tr><td class="paramname">begin</td><td>Index of the starting point in the dataset that belongs to this node. </td></tr>
<tr><td class="paramname">count</td><td>Number of points in this node. </td></tr>
<tr><td class="paramname">splitInfo</td><td>The information about the split. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="midpoint__split_8hpp_source.html#l00073">73</a> of file <a class="el" href="midpoint__split_8hpp_source.html">midpoint_split.hpp</a>.</p>
</div>
</div>
<a class="anchor" id="a9e35881dc80212dd155f620e45a77be3"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename BoundType , typename MatType = arma::mat&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static size_t <a class="el" href="classmlpack_1_1tree_1_1MidpointSplit.html">mlpack::tree::MidpointSplit</a>&lt; BoundType, MatType &gt;::PerformSplit </td>
<td>(</td>
<td class="paramtype">MatType &amp;&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const size_t&#160;</td>
<td class="paramname"><em>begin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const size_t&#160;</td>
<td class="paramname"><em>count</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structmlpack_1_1tree_1_1MidpointSplit_1_1SplitInfo.html">SplitInfo</a> &amp;&#160;</td>
<td class="paramname"><em>splitInfo</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; size_t &gt; &amp;&#160;</td>
<td class="paramname"><em>oldFromNew</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Perform the split process according to the information about the split and return the list of changed indices. </p>
<p>This will order the dataset such that points that belong to the left subtree are on the left of the split column, and points from the right subtree are on the right side of the split column.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bound</td><td>The bound used for this node. </td></tr>
<tr><td class="paramname">data</td><td>The dataset used by the binary space tree. </td></tr>
<tr><td class="paramname">begin</td><td>Index of the starting point in the dataset that belongs to this node. </td></tr>
<tr><td class="paramname">count</td><td>Number of points in this node. </td></tr>
<tr><td class="paramname">splitInfo</td><td>The information about the split. </td></tr>
<tr><td class="paramname">oldFromNew</td><td>Vector which will be filled with the old positions for each new point. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="midpoint__split_8hpp_source.html#l00098">98</a> of file <a class="el" href="midpoint__split_8hpp_source.html">midpoint_split.hpp</a>.</p>
</div>
</div>
<a class="anchor" id="a95eff4025f6fef17cb5832472e006bbd"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename BoundType , typename MatType = arma::mat&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool <a class="el" href="classmlpack_1_1tree_1_1MidpointSplit.html">mlpack::tree::MidpointSplit</a>&lt; BoundType, MatType &gt;::SplitNode </td>
<td>(</td>
<td class="paramtype">const BoundType &amp;&#160;</td>
<td class="paramname"><em>bound</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">MatType &amp;&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const size_t&#160;</td>
<td class="paramname"><em>begin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const size_t&#160;</td>
<td class="paramname"><em>count</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structmlpack_1_1tree_1_1MidpointSplit_1_1SplitInfo.html">SplitInfo</a> &amp;&#160;</td>
<td class="paramname"><em>splitInfo</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Find the partition of the node. </p>
<p>This method fills up the dimension that will be used to split the node and the value according which the split will be performed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bound</td><td>The bound used for this node. </td></tr>
<tr><td class="paramname">data</td><td>The dataset used by the binary space tree. </td></tr>
<tr><td class="paramname">begin</td><td>Index of the starting point in the dataset that belongs to this node. </td></tr>
<tr><td class="paramname">count</td><td>Number of points in this node. </td></tr>
<tr><td class="paramname">splitInfo</td><td>An information about the split. This information contains the dimension and the value. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/mlpack/core/tree/binary_space_tree/<a class="el" href="midpoint__split_8hpp_source.html">midpoint_split.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
<script type="text/javascript">
var x = document.getElementsByClassName("formulaDsp");
var i;
for (i = 0; i < x.length; i++)
{
x[i].width /= 4;
}
</script>
</html>