Files
mlpack/doc/html/default__param_8hpp_source.html
T

120 lines
16 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: src/mlpack/core/util/default_param.hpp Source File</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><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#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="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_44a936ef30fc126706c6284a2fc0c990.html">mlpack</a></li><li class="navelem"><a class="el" href="dir_f7ac9cdfd28b2e882eb44d163e3b98b4.html">core</a></li><li class="navelem"><a class="el" href="dir_e173a4984165953811b5143e3b27486f.html">util</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">default_param.hpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="default__param_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#ifndef MLPACK_CORE_UTIL_DEFAULT_PARAM_HPP</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#define MLPACK_CORE_UTIL_DEFAULT_PARAM_HPP</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="prereqs_8hpp.html">mlpack/prereqs.hpp</a>&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacemlpack.html">mlpack</a> {</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="keyword">namespace </span>util {</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<a class="code" href="bindings_2matlab_2CMakeLists_8txt.html#ad3a3f86b22ab94a882506e9e614165f1">std::string</a> <a class="code" href="namespacemlpack_1_1util.html#a7a07ecac4cd6cb8d46e06e99a38034b2">DefaultParamImpl</a>(</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; <span class="keyword">const</span> ParamData&amp; data,</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; <span class="keyword">const</span> <span class="keyword">typename</span> boost::disable_if&lt;arma::is_arma_type&lt;T&gt;&gt;::type* = 0,</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; <span class="keyword">const</span> <span class="keyword">typename</span> boost::disable_if&lt;IsStdVector&lt;T&gt;&gt;::type* = 0,</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; <span class="keyword">const</span> <span class="keyword">typename</span> boost::disable_if&lt;data::HasSerialize&lt;T&gt;&gt;::type* = 0,</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; <span class="keyword">const</span> <span class="keyword">typename</span> boost::disable_if&lt;std::is_same&lt;T, std::string&gt;&gt;::type* = 0,</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; <span class="keyword">const</span> <span class="keyword">typename</span> boost::disable_if&lt;std::is_same&lt;T,</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; std::tuple&lt;mlpack::data::DatasetInfo, arma::mat&gt;&gt;&gt;::type* = 0);</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<a class="code" href="bindings_2matlab_2CMakeLists_8txt.html#ad3a3f86b22ab94a882506e9e614165f1">std::string</a> <a class="code" href="namespacemlpack_1_1util.html#a7a07ecac4cd6cb8d46e06e99a38034b2">DefaultParamImpl</a>(</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; <span class="keyword">const</span> ParamData&amp; data,</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keyword">const</span> <span class="keyword">typename</span> boost::enable_if&lt;IsStdVector&lt;T&gt;&gt;::type* = 0);</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<a class="code" href="bindings_2matlab_2CMakeLists_8txt.html#ad3a3f86b22ab94a882506e9e614165f1">std::string</a> <a class="code" href="namespacemlpack_1_1util.html#a7a07ecac4cd6cb8d46e06e99a38034b2">DefaultParamImpl</a>(</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keyword">const</span> ParamData&amp; data,</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keyword">const</span> <span class="keyword">typename</span> boost::enable_if_c&lt;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; arma::is_arma_type&lt;T&gt;::value ||</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <a class="code" href="structmlpack_1_1data_1_1HasSerialize.html#a4a79528513f2e61a4eb161398a837bac">data::HasSerialize&lt;T&gt;::value</a> ||</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; std::is_same&lt;T, std::tuple&lt;<a class="code" href="classmlpack_1_1data_1_1DatasetMapper.html">mlpack::data::DatasetInfo</a>,</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; arma::mat&gt;&gt;::value ||</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; std::is_same&lt;T, std::string&gt;::value&gt;::type* <span class="comment">/* junk */</span> = 0);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="namespacemlpack_1_1util.html#a10e767ce28784a5d9d1254e64c247f29"> 55</a></span>&#160;<a class="code" href="bindings_2matlab_2CMakeLists_8txt.html#ad3a3f86b22ab94a882506e9e614165f1">std::string</a> <a class="code" href="namespacemlpack_1_1util.html#a10e767ce28784a5d9d1254e64c247f29">DefaultParam</a>(<span class="keyword">const</span> <a class="code" href="structmlpack_1_1util_1_1ParamData.html">ParamData</a>&amp; data)</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;{</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keywordflow">return</span> DefaultParamImpl&lt;T&gt;(data);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;}</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;} <span class="comment">// namespace util</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;} <span class="comment">// namespace mlpack</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="comment">// Include implementation.</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<span class="preprocessor">#include &quot;default_param_impl.hpp&quot;</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classmlpack_1_1data_1_1DatasetMapper_html"><div class="ttname"><a href="classmlpack_1_1data_1_1DatasetMapper.html">mlpack::data::DatasetMapper</a></div><div class="ttdoc">Auxiliary information for a dataset, including mappings to/from strings and the datatype of each dime...</div><div class="ttdef"><b>Definition:</b> <a href="dataset__mapper_8hpp_source.html#l00036">dataset_mapper.hpp:36</a></div></div>
<div class="ttc" id="structmlpack_1_1data_1_1HasSerialize_html_a4a79528513f2e61a4eb161398a837bac"><div class="ttname"><a href="structmlpack_1_1data_1_1HasSerialize.html#a4a79528513f2e61a4eb161398a837bac">mlpack::data::HasSerialize::value</a></div><div class="ttdeci">static const bool value</div><div class="ttdef"><b>Definition:</b> <a href="serialization__shim_8hpp_source.html#l00058">serialization_shim.hpp:58</a></div></div>
<div class="ttc" id="namespacemlpack_html"><div class="ttname"><a href="namespacemlpack.html">mlpack</a></div><div class="ttdoc">Linear algebra utility functions, generally performed on matrices or vectors. </div><div class="ttdef"><b>Definition:</b> <a href="binarize_8hpp_source.html#l00018">binarize.hpp:18</a></div></div>
<div class="ttc" id="prereqs_8hpp_html"><div class="ttname"><a href="prereqs_8hpp.html">prereqs.hpp</a></div><div class="ttdoc">The core includes that mlpack expects; standard C++ includes and Armadillo. </div></div>
<div class="ttc" id="namespacemlpack_1_1util_html_a10e767ce28784a5d9d1254e64c247f29"><div class="ttname"><a href="namespacemlpack_1_1util.html#a10e767ce28784a5d9d1254e64c247f29">mlpack::util::DefaultParam</a></div><div class="ttdeci">std::string DefaultParam(const ParamData &amp;data)</div><div class="ttdoc">Return the default value of an option. </div><div class="ttdef"><b>Definition:</b> <a href="default__param_8hpp_source.html#l00055">default_param.hpp:55</a></div></div>
<div class="ttc" id="structmlpack_1_1util_1_1ParamData_html"><div class="ttname"><a href="structmlpack_1_1util_1_1ParamData.html">mlpack::util::ParamData</a></div><div class="ttdoc">This structure holds all of the information about a single parameter, including its value (which is s...</div><div class="ttdef"><b>Definition:</b> <a href="param__data_8hpp_source.html#l00112">param_data.hpp:112</a></div></div>
<div class="ttc" id="bindings_2matlab_2CMakeLists_8txt_html_ad3a3f86b22ab94a882506e9e614165f1"><div class="ttname"><a href="bindings_2matlab_2CMakeLists_8txt.html#ad3a3f86b22ab94a882506e9e614165f1">string</a></div><div class="ttdeci">test cpp RESULT_VARIABLE MEX_RESULT_TRASH OUTPUT_VARIABLE MEX_OUTPUT ERROR_VARIABLE MEX_ERROR_TRASH string(REGEX MATCH&quot;Warning: You are using&quot;MEX_WARNING&quot;${MEX_OUTPUT}&quot;) if(MEX_WARNING) string(REGEX REPLACE&quot;.*using [a-zA-Z]* version \&quot;([0-9.]*)[^\&quot;]*\&quot;.*&quot;&quot;\\1&quot;OTHER_COMPILER_VERSION&quot;$</div><div class="ttdef"><b>Definition:</b> <a href="bindings_2matlab_2CMakeLists_8txt_source.html#l00018">CMakeLists.txt:18</a></div></div>
<div class="ttc" id="namespacemlpack_1_1util_html_a7a07ecac4cd6cb8d46e06e99a38034b2"><div class="ttname"><a href="namespacemlpack_1_1util.html#a7a07ecac4cd6cb8d46e06e99a38034b2">mlpack::util::DefaultParamImpl</a></div><div class="ttdeci">std::string DefaultParamImpl(const ParamData &amp;data, const typename boost::disable_if&lt; arma::is_arma_type&lt; T &gt;&gt;::type *=0, const typename boost::disable_if&lt; IsStdVector&lt; T &gt;&gt;::type *=0, const typename boost::disable_if&lt; data::HasSerialize&lt; T &gt;&gt;::type *=0, const typename boost::disable_if&lt; std::is_same&lt; T, std::string &gt;&gt;::type *=0, const typename boost::disable_if&lt; std::is_same&lt; T, std::tuple&lt; mlpack::data::DatasetInfo, arma::mat &gt;&gt;&gt;::type *=0)</div><div class="ttdoc">Return the default value of an option. </div></div>
</div><!-- fragment --></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>