classfv_1_1DerivedValue.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.13"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>TTTT Analysis: fv::DerivedValue&lt; T &gt; Class Template Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">TTTT Analysis
  25. &#160;<span id="projectnumber">0.1</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.13 -->
  34. <script type="text/javascript">
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. </script>
  37. <script type="text/javascript" src="menudata.js"></script>
  38. <script type="text/javascript" src="menu.js"></script>
  39. <script type="text/javascript">
  40. $(function() {
  41. initMenu('',true,false,'search.php','Search');
  42. $(document).ready(function() { init_search(); });
  43. });
  44. </script>
  45. <div id="main-nav"></div>
  46. <!-- window showing the filter options -->
  47. <div id="MSearchSelectWindow"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. onkeydown="return searchBox.OnSearchSelectKey(event)">
  51. </div>
  52. <!-- iframe showing the search results (closed by default) -->
  53. <div id="MSearchResultsWindow">
  54. <iframe src="javascript:void(0)" frameborder="0"
  55. name="MSearchResults" id="MSearchResults">
  56. </iframe>
  57. </div>
  58. <div id="nav-path" class="navpath">
  59. <ul>
  60. <li class="navelem"><a class="el" href="namespacefv.html">fv</a></li><li class="navelem"><a class="el" href="classfv_1_1DerivedValue.html">DerivedValue</a></li> </ul>
  61. </div>
  62. </div><!-- top -->
  63. <div class="header">
  64. <div class="summary">
  65. <a href="#pub-methods">Public Member Functions</a> &#124;
  66. <a href="#pro-methods">Protected Member Functions</a> &#124;
  67. <a href="#pro-attribs">Protected Attributes</a> &#124;
  68. <a href="classfv_1_1DerivedValue-members.html">List of all members</a> </div>
  69. <div class="headertitle">
  70. <div class="title">fv::DerivedValue&lt; T &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  71. </div><!--header-->
  72. <div class="contents">
  73. <p>A <a class="el" href="classfv_1_1Value.html" title="A templated value. ">Value</a> derived from some other Values, not directly from the dataset.
  74. <a href="classfv_1_1DerivedValue.html#details">More...</a></p>
  75. <p><code>#include &lt;<a class="el" href="value_8hpp_source.html">value.hpp</a>&gt;</code></p>
  76. <div class="dynheader">
  77. Inheritance diagram for fv::DerivedValue&lt; T &gt;:</div>
  78. <div class="dyncontent">
  79. <div class="center"><img src="classfv_1_1DerivedValue__inherit__graph.png" border="0" usemap="#fv_1_1DerivedValue_3_01T_01_4_inherit__map" alt="Inheritance graph"/></div>
  80. <map name="fv_1_1DerivedValue_3_01T_01_4_inherit__map" id="fv_1_1DerivedValue_3_01T_01_4_inherit__map">
  81. <area shape="rect" id="node3" href="classfv_1_1BoundValue.html" title="A generic value owning only a function object. " alt="" coords="5,155,163,181"/>
  82. <area shape="rect" id="node4" href="classfv_1_1ConstantValue.html" title="A Value which always returns the same value, supplied in the constructor. " alt="" coords="187,155,362,181"/>
  83. <area shape="rect" id="node5" href="classfv_1_1Reduce.html" title="Reduce a Value of type vector&lt;T&gt; to just a T. " alt="" coords="386,155,513,181"/>
  84. <area shape="rect" id="node2" href="classfv_1_1Value.html" title="A templated value. " alt="" coords="217,5,333,32"/>
  85. <area shape="rect" id="node6" href="classfv_1_1ElementOf.html" title="Extract the element at a specific index from a vector. " alt="" coords="88,229,237,256"/>
  86. <area shape="rect" id="node7" href="classfv_1_1Max.html" title="Find and return the maximum value of a vector. " alt="" coords="261,229,368,256"/>
  87. <area shape="rect" id="node8" href="classfv_1_1Mean.html" title="Calculate the mean value of a vector. " alt="" coords="392,229,507,256"/>
  88. <area shape="rect" id="node9" href="classfv_1_1Min.html" title="Find and return the minimum value of a vector. " alt="" coords="531,229,634,256"/>
  89. <area shape="rect" id="node10" href="classfv_1_1Range.html" title="Calculate the range of the values in a vector. " alt="" coords="658,229,779,256"/>
  90. </map>
  91. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  92. <div class="dynheader">
  93. Collaboration diagram for fv::DerivedValue&lt; T &gt;:</div>
  94. <div class="dyncontent">
  95. <div class="center"><img src="classfv_1_1DerivedValue__coll__graph.png" border="0" usemap="#fv_1_1DerivedValue_3_01T_01_4_coll__map" alt="Collaboration graph"/></div>
  96. <map name="fv_1_1DerivedValue_3_01T_01_4_coll__map" id="fv_1_1DerivedValue_3_01T_01_4_coll__map">
  97. <area shape="rect" id="node2" href="classfv_1_1Value.html" title="A templated value. " alt="" coords="31,5,147,32"/>
  98. </map>
  99. <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
  100. <table class="memberdecls">
  101. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  102. Public Member Functions</h2></td></tr>
  103. <tr class="memitem:a00219a17112600afdc060d67d6f95b21"><td class="memItemLeft" align="right" valign="top"><a id="a00219a17112600afdc060d67d6f95b21"></a>
  104. &#160;</td><td class="memItemRight" valign="bottom"><b>DerivedValue</b> (const std::string &amp;name, const std::string &amp;alias=&quot;&quot;)</td></tr>
  105. <tr class="separator:a00219a17112600afdc060d67d6f95b21"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:a7ac6d7f0a92fb9753f7c0bfcf26b6b0d"><td class="memItemLeft" align="right" valign="top"><a id="a7ac6d7f0a92fb9753f7c0bfcf26b6b0d"></a>
  107. void&#160;</td><td class="memItemRight" valign="bottom"><b>log</b> ()</td></tr>
  108. <tr class="separator:a7ac6d7f0a92fb9753f7c0bfcf26b6b0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:a39970158aa8f6eb062a28037df6e2128"><td class="memItemLeft" align="right" valign="top"><a id="a39970158aa8f6eb062a28037df6e2128"></a>
  110. T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfv_1_1DerivedValue.html#a39970158aa8f6eb062a28037df6e2128">get_value</a> ()</td></tr>
  111. <tr class="memdesc:a39970158aa8f6eb062a28037df6e2128"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate, if necessary, and return the value held by this object. <br /></td></tr>
  112. <tr class="separator:a39970158aa8f6eb062a28037df6e2128"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="inherit_header pub_methods_classfv_1_1Value"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classfv_1_1Value')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classfv_1_1Value.html">fv::Value&lt; T &gt;</a></td></tr>
  114. <tr class="memitem:afded92c24f946c1551c1f1b005f31091 inherit pub_methods_classfv_1_1Value"><td class="memItemLeft" align="right" valign="top"><a id="afded92c24f946c1551c1f1b005f31091"></a>
  115. &#160;</td><td class="memItemRight" valign="bottom"><b>Value</b> (const std::string &amp;name, const std::string &amp;alias=&quot;&quot;)</td></tr>
  116. <tr class="separator:afded92c24f946c1551c1f1b005f31091 inherit pub_methods_classfv_1_1Value"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:a477ab6275568b0c5afbcf92901cc3a6e inherit pub_methods_classfv_1_1Value"><td class="memItemLeft" align="right" valign="top"><a id="a477ab6275568b0c5afbcf92901cc3a6e"></a>
  118. void&#160;</td><td class="memItemRight" valign="bottom"><b>enable_logging</b> (const std::function&lt; std::string(T)&gt; &amp;value_to_string=[](T){return &quot;&quot;;})</td></tr>
  119. <tr class="separator:a477ab6275568b0c5afbcf92901cc3a6e inherit pub_methods_classfv_1_1Value"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a8a3517fdba15dcb2c141dbd58fc232b1 inherit pub_methods_classfv_1_1Value"><td class="memItemLeft" align="right" valign="top"><a id="a8a3517fdba15dcb2c141dbd58fc232b1"></a>
  121. void&#160;</td><td class="memItemRight" valign="bottom"><b>disable_logging</b> ()</td></tr>
  122. <tr class="separator:a8a3517fdba15dcb2c141dbd58fc232b1 inherit pub_methods_classfv_1_1Value"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. </table><table class="memberdecls">
  124. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
  125. Protected Member Functions</h2></td></tr>
  126. <tr class="memitem:ae59e80a98eb74b95d8961bfe12ee5ec2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfv_1_1DerivedValue.html#ae59e80a98eb74b95d8961bfe12ee5ec2">update_value</a> ()=0</td></tr>
  127. <tr class="memdesc:ae59e80a98eb74b95d8961bfe12ee5ec2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the internal value. <a href="#ae59e80a98eb74b95d8961bfe12ee5ec2">More...</a><br /></td></tr>
  128. <tr class="separator:ae59e80a98eb74b95d8961bfe12ee5ec2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. </table><table class="memberdecls">
  130. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
  131. Protected Attributes</h2></td></tr>
  132. <tr class="memitem:aeb7ff5d17ad44b2040fc9930bbcc2c7a"><td class="memItemLeft" align="right" valign="top"><a id="aeb7ff5d17ad44b2040fc9930bbcc2c7a"></a>
  133. T&#160;</td><td class="memItemRight" valign="bottom"><b>value</b></td></tr>
  134. <tr class="separator:aeb7ff5d17ad44b2040fc9930bbcc2c7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="inherit_header pro_attribs_classfv_1_1Value"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classfv_1_1Value')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classfv_1_1Value.html">fv::Value&lt; T &gt;</a></td></tr>
  136. <tr class="memitem:aa0269699348665b8e978c1e848e74abe inherit pro_attribs_classfv_1_1Value"><td class="memItemLeft" align="right" valign="top"><a id="aa0269699348665b8e978c1e848e74abe"></a>
  137. std::function&lt; std::string(T)&gt;&#160;</td><td class="memItemRight" valign="bottom"><b>value_to_string</b></td></tr>
  138. <tr class="separator:aa0269699348665b8e978c1e848e74abe inherit pro_attribs_classfv_1_1Value"><td class="memSeparator" colspan="2">&#160;</td></tr>
  139. </table>
  140. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  141. <div class="textblock"><h3>template&lt;typename T&gt;<br />
  142. class fv::DerivedValue&lt; T &gt;</h3>
  143. <p>A <a class="el" href="classfv_1_1Value.html" title="A templated value. ">Value</a> derived from some other Values, not directly from the dataset. </p>
  144. <p>A <a class="el" href="classfv_1_1DerivedValue.html" title="A Value derived from some other Values, not directly from the dataset. ">DerivedValue</a> is generally defined as some function of other <a class="el" href="classfv_1_1Value.html" title="A templated value. ">Value</a> objects. For example, a <a class="el" href="classfv_1_1Pair.html" title="Creates a std::pair type from a two other Value objects. ">Pair</a> is a function of two other <a class="el" href="classfv_1_1Value.html" title="A templated value. ">Value</a> objects that makes a pair of them. Note that these other <a class="el" href="classfv_1_1Value.html" title="A templated value. ">Value</a> objects are free to be either ObservedValues or other DerivedValues.</p>
  145. <p>It is desireable from a performance standpoint that each <a class="el" href="classfv_1_1DerivedValue.html" title="A Value derived from some other Values, not directly from the dataset. ">DerivedValue</a> be calculated no more than once per observation. Therefore, when a get_value is called on a <a class="el" href="classfv_1_1DerivedValue.html" title="A Value derived from some other Values, not directly from the dataset. ">DerivedValue</a>, it first checks whether the value that it holds is <b>valid</b>, meaning it has already been calculated for this observation. If so, it simply returns the value. If not, the update_value function is called to calculate the value. and then the newly calculated value is marked as valid and returned. </p>
  146. </div><h2 class="groupheader">Member Function Documentation</h2>
  147. <a id="ae59e80a98eb74b95d8961bfe12ee5ec2"></a>
  148. <h2 class="memtitle"><span class="permalink"><a href="#ae59e80a98eb74b95d8961bfe12ee5ec2">&#9670;&nbsp;</a></span>update_value()</h2>
  149. <div class="memitem">
  150. <div class="memproto">
  151. <div class="memtemplate">
  152. template&lt;typename T&gt; </div>
  153. <table class="mlabels">
  154. <tr>
  155. <td class="mlabels-left">
  156. <table class="memname">
  157. <tr>
  158. <td class="memname">virtual void <a class="el" href="classfv_1_1DerivedValue.html">fv::DerivedValue</a>&lt; T &gt;::update_value </td>
  159. <td>(</td>
  160. <td class="paramname"></td><td>)</td>
  161. <td></td>
  162. </tr>
  163. </table>
  164. </td>
  165. <td class="mlabels-right">
  166. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
  167. </tr>
  168. </table>
  169. </div><div class="memdoc">
  170. <p>Updates the internal value. </p>
  171. <p>This function should be overridden by any child class to do the actual work of updating value based on whatever rules the class chooses. Normally, this consists of geting the values from some associated <a class="el" href="classfv_1_1Value.html" title="A templated value. ">Value</a> objects, doing some calculation on them, and storing the result in value. </p>
  172. <p>Implemented in <a class="el" href="classfv_1_1ConstantValue.html#a6581e7fb69c082c07c9714138063b320">fv::ConstantValue&lt; T &gt;</a>, <a class="el" href="classfv_1_1PointerValue.html#a81e39d040919be39c37f845a27343f3e">fv::PointerValue&lt; T &gt;</a>, <a class="el" href="classfv_1_1BoundValue.html#a51ba914f1eac694af4264d62785282a1">fv::BoundValue&lt; T &gt;</a>, <a class="el" href="classfv_1_1CartProduct.html#a087a4b184e628e3fa20040b33225a906">fv::CartProduct&lt; FST, SND &gt;</a>, <a class="el" href="classfv_1_1Combinations.html#a69ce557136cf74ba2e8540e06151bfa5">fv::Combinations&lt; T, Size &gt;</a>, <a class="el" href="classfv_1_1ReduceIndex.html#a462bffebe2a93c940aca526566d48e37">fv::ReduceIndex&lt; T &gt;</a>, <a class="el" href="classfv_1_1Reduce.html#ab0809c4ab1884b84a7f88e005ade76a5">fv::Reduce&lt; T &gt;</a>, <a class="el" href="classfv_1_1TupFilter.html#a0d1078323dca5f712ee122b14bafd20b">fv::TupFilter&lt; ArgTypes &gt;</a>, <a class="el" href="classfv_1_1Filter.html#a3666dcad055ca8b0f7c7ab675f5eb57d">fv::Filter&lt; T &gt;</a>, <a class="el" href="classfv_1_1Count.html#afff1c16a8747a82db1cc1c8248c56a08">fv::Count&lt; T &gt;</a>, <a class="el" href="classfv_1_1Apply_3_01Ret_07ArgTypes_8_8_8_08_4.html#ab983f969ff7652150e7ce1d1240672e0">fv::Apply&lt; Ret(ArgTypes...)&gt;</a>, <a class="el" href="classfv_1_1DeTupVector.html#a667043bb8851d8eb56d051e62e6d9646">fv::DeTupVector&lt; N, ArgTypes &gt;</a>, <a class="el" href="classfv_1_1DeTup.html#a9b49bc088a2c98356dec7709e7da8261">fv::DeTup&lt; N, ArgTypes &gt;</a>, <a class="el" href="classfv_1_1Tuple.html#a5cbf67ef6b68f1a18fb4b2b4e8b98c22">fv::Tuple&lt; ArgTypes &gt;</a>, <a class="el" href="classfv_1_1Map_3_01Ret_07ArgTypes_8_8_8_08_4.html#acd85576e1e4eb0eb4ef0d4947299478c">fv::Map&lt; Ret(ArgTypes...)&gt;</a>, <a class="el" href="classfv_1_1Zip.html#abecba2b15aa8dccf72c0dff1f2304c8b">fv::Zip&lt; ArgTypes &gt;</a>, <a class="el" href="classfv_1_1Pair.html#ab3225f03f49240fc1547a5005f57b864">fv::Pair&lt; T1, T2 &gt;</a>, and <a class="el" href="classfv_1_1WrapperVector.html#a2ee99bc4425642d209df7b48ee2ada95">fv::WrapperVector&lt; T &gt;</a>.</p>
  173. </div>
  174. </div>
  175. <hr/>The documentation for this class was generated from the following file:<ul>
  176. <li>/home/caleb/Sources/TTTT/filval/<a class="el" href="value_8hpp_source.html">value.hpp</a></li>
  177. </ul>
  178. </div><!-- contents -->
  179. <!-- start footer part -->
  180. <hr class="footer"/><address class="footer"><small>
  181. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  182. <img class="footer" src="doxygen.png" alt="doxygen"/>
  183. </a> 1.8.13
  184. </small></address>
  185. </body>
  186. </html>