<!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>C++ API frePPLe: module_forecast::Forecast::MovingAverage Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="../styles.css" rel="stylesheet" type="text/css"> </head> <body> <div id="container"> <div id="menubar"> <div id="logo" align="center"> <br/><img src='../frepple.bmp' alt="frepple" /><br/> <a href='http://www.frepple.com/'> <strong>a Free<br/>Production Planning<br/>Library</strong> </a> </div> <div id="menu"> <br/> <h3><a href='../Main/HomePage.html'>Main</a></h3> <h3><a href='../UI/Main.html'>User Manual</a></h3> <h3><a href='../Tutorial/Main.html'>Tutorial</a></h3> <h3><a href='../Frepple/Main.html'>Reference Manual</a></h3> <h3><a href='../Main/FAQ.html'>FAQ</a></h3> <h3><a href='index.html'>C++ API</a></h3> <br/> </div> </div> <div id="content"> <br/> <!-- Generated by Doxygen 1.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related 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><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="a00258.html">module_forecast</a>::<a class="el" href="a00072.html">Forecast</a>::<a class="el" href="a00116.html">MovingAverage</a> </div> </div> <div class="contents"> <h1>module_forecast::Forecast::MovingAverage Class Reference</h1><!-- doxytag: class="module_forecast::Forecast::MovingAverage" --><!-- doxytag: inherits="module_forecast::Forecast::ForecastMethod" --> <p>A class to calculate a forecast based on a moving average. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="a00204_source.html">forecast.h</a>></code></p> <div class="dynheader"> Inheritance diagram for module_forecast::Forecast::MovingAverage:</div> <div class="dynsection"> <div class="center"><img src="a00675.png" border="0" usemap="#module__forecast_1_1_forecast_1_1_moving_average_inherit__map" alt="Inheritance graph"/></div> <map name="module__forecast_1_1_forecast_1_1_moving_average_inherit__map" id="module__forecast_1_1_forecast_1_1_moving_average_inherit__map"> <area shape="rect" id="node2" href="a00074.html" title="Abstract base class for all forecasting methods." alt="" coords="5,6,283,34"/> </map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="a00676.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#ae131a917e8a5aec9d09c81dd7aa0e453">applyForecast</a> (<a class="el" href="a00072.html">Forecast</a> *, const <a class="el" href="a00049.html">Date</a>[], unsigned int, bool)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#ab58b0e26e945b213dff768d92470733b">generateForecast</a> (<a class="el" href="a00072.html">Forecast</a> *fcst, const double history[], unsigned int count, const double weight[], bool debug)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a417566305e4377e105080c97569f9d5a">getName</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#aa43bc772fd55f5a2a0f62b4b7581eea4">MovingAverage</a> (int i=defaultbuckets)</td></tr> <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a16792cdfe89fe2e67b6d7f675dbeb30c">setDefaultBuckets</a> (int x)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>A class to calculate a forecast based on a moving average. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00321">321</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="aa43bc772fd55f5a2a0f62b4b7581eea4"></a><!-- doxytag: member="module_forecast::Forecast::MovingAverage::MovingAverage" ref="aa43bc772fd55f5a2a0f62b4b7581eea4" args="(int i=defaultbuckets)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">module_forecast::Forecast::MovingAverage::MovingAverage </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>i</em> = <code>defaultbuckets</code></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Constructor. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00337">337</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="ae131a917e8a5aec9d09c81dd7aa0e453"></a><!-- doxytag: member="module_forecast::Forecast::MovingAverage::applyForecast" ref="ae131a917e8a5aec9d09c81dd7aa0e453" args="(Forecast *, const Date[], unsigned int, bool)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void module_forecast::Forecast::MovingAverage::applyForecast </td> <td>(</td> <td class="paramtype"><a class="el" href="a00072.html">Forecast</a> * </td> <td class="paramname"> <em>forecast</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="a00049.html">Date</a> </td> <td class="paramname"> <em>buckets</em>[], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>bucketcount</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>debug</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p><a class="el" href="a00072.html" title="This class represents a bucketized demand signal.">Forecast</a> value updating. </p> <p>Implements <a class="el" href="a00074.html#a5b6313466ac20ca0e9a74139e868f04a">module_forecast::Forecast::ForecastMethod</a>.</p> <p>Definition at line <a class="el" href="a00251_source.html#l00173">173</a> of file <a class="el" href="a00251_source.html">timeseries.cpp</a>.</p> </div> </div> <a class="anchor" id="ab58b0e26e945b213dff768d92470733b"></a><!-- doxytag: member="module_forecast::Forecast::MovingAverage::generateForecast" ref="ab58b0e26e945b213dff768d92470733b" args="(Forecast *fcst, const double history[], unsigned int count, const double weight[], bool debug)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double module_forecast::Forecast::MovingAverage::generateForecast </td> <td>(</td> <td class="paramtype"><a class="el" href="a00072.html">Forecast</a> * </td> <td class="paramname"> <em>fcst</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const double </td> <td class="paramname"> <em>history</em>[], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const double </td> <td class="paramname"> <em>weight</em>[], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>debug</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p><a class="el" href="a00072.html" title="This class represents a bucketized demand signal.">Forecast</a> evaluation. </p> <p>Implements <a class="el" href="a00074.html#a72078544ba513ac4d9bae0ef64045480">module_forecast::Forecast::ForecastMethod</a>.</p> <p>Definition at line <a class="el" href="a00251_source.html#l00138">138</a> of file <a class="el" href="a00251_source.html">timeseries.cpp</a>.</p> </div> </div> <a class="anchor" id="a417566305e4377e105080c97569f9d5a"></a><!-- doxytag: member="module_forecast::Forecast::MovingAverage::getName" ref="a417566305e4377e105080c97569f9d5a" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string module_forecast::Forecast::MovingAverage::getName </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>The name of the method. </p> <p>Implements <a class="el" href="a00074.html#a5dff95401a41f796fbc243f4996afd27">module_forecast::Forecast::ForecastMethod</a>.</p> <p>Definition at line <a class="el" href="a00204_source.html#l00358">358</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="a16792cdfe89fe2e67b6d7f675dbeb30c"></a><!-- doxytag: member="module_forecast::Forecast::MovingAverage::setDefaultBuckets" ref="a16792cdfe89fe2e67b6d7f675dbeb30c" args="(int x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::MovingAverage::setDefaultBuckets </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Update the initial value for the alfa parameter. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00351">351</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="a00204_source.html">forecast.h</a></li> <li><a class="el" href="a00251_source.html">timeseries.cpp</a></li> </ul> </div> <hr size="1"/><address style="align: right;"><small>Documentation generated for frePPLe by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"/></a></small></address> </div> </div> </body> </html>