<!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::Croston 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="a00043.html">Croston</a> </div> </div> <div class="contents"> <h1>module_forecast::Forecast::Croston Class Reference</h1><!-- doxytag: class="module_forecast::Forecast::Croston" --><!-- doxytag: inherits="module_forecast::Forecast::ForecastMethod" --> <p>A class to calculate a forecast with Croston's method. <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::Croston:</div> <div class="dynsection"> <div class="center"><img src="a00669.png" border="0" usemap="#module__forecast_1_1_forecast_1_1_croston_inherit__map" alt="Inheritance graph"/></div> <map name="module__forecast_1_1_forecast_1_1_croston_inherit__map" id="module__forecast_1_1_forecast_1_1_croston_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="a00670.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="a00043.html#afe2fcb57e279d7b9a5dfcbbed45cabd8">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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#a503cb95ed4cacb8dfff87f14767bb125">Croston</a> (double a=initial_alfa)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#a6d771f314418b878562305f4f24bbeae">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="a00043.html#a92db1a691233a916086d87c80d6f6965">getName</a> ()</td></tr> <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#a5701eb3d22717ec14451f40d1481d72f">getMinIntermittence</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#a63da877de6790c4276a64b9313390946">setInitialAlfa</a> (double x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#a98f0e961200fee3620f044b4968725f6">setMaxAlfa</a> (double x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#ad4beefa01700ced1c431affa59f6fe40">setMinAlfa</a> (double x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#aebbcc1ab851ce0a324c09d93f4ac39be">setMinIntermittence</a> (double x)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>A class to calculate a forecast with Croston's method. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00787">787</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a503cb95ed4cacb8dfff87f14767bb125"></a><!-- doxytag: member="module_forecast::Forecast::Croston::Croston" ref="a503cb95ed4cacb8dfff87f14767bb125" args="(double a=initial_alfa)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">module_forecast::Forecast::Croston::Croston </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>a</em> = <code>initial_alfa</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#l00818">818</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="afe2fcb57e279d7b9a5dfcbbed45cabd8"></a><!-- doxytag: member="module_forecast::Forecast::Croston::applyForecast" ref="afe2fcb57e279d7b9a5dfcbbed45cabd8" args="(Forecast *, const Date[], unsigned int, bool)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void module_forecast::Forecast::Croston::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#l00824">824</a> of file <a class="el" href="a00251_source.html">timeseries.cpp</a>.</p> </div> </div> <a class="anchor" id="a6d771f314418b878562305f4f24bbeae"></a><!-- doxytag: member="module_forecast::Forecast::Croston::generateForecast" ref="a6d771f314418b878562305f4f24bbeae" 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::Croston::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#l00723">723</a> of file <a class="el" href="a00251_source.html">timeseries.cpp</a>.</p> </div> </div> <a class="anchor" id="a5701eb3d22717ec14451f40d1481d72f"></a><!-- doxytag: member="module_forecast::Forecast::Croston::getMinIntermittence" ref="a5701eb3d22717ec14451f40d1481d72f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double module_forecast::Forecast::Croston::getMinIntermittence </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return the minimum intermittence before applying this method. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00864">864</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="a92db1a691233a916086d87c80d6f6965"></a><!-- doxytag: member="module_forecast::Forecast::Croston::getName" ref="a92db1a691233a916086d87c80d6f6965" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string module_forecast::Forecast::Croston::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#l00866">866</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="a63da877de6790c4276a64b9313390946"></a><!-- doxytag: member="module_forecast::Forecast::Croston::setInitialAlfa" ref="a63da877de6790c4276a64b9313390946" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::Croston::setInitialAlfa </td> <td>(</td> <td class="paramtype">double </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#l00832">832</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="a98f0e961200fee3620f044b4968725f6"></a><!-- doxytag: member="module_forecast::Forecast::Croston::setMaxAlfa" ref="a98f0e961200fee3620f044b4968725f6" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::Croston::setMaxAlfa </td> <td>(</td> <td class="paramtype">double </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 maximum value for the alfa parameter. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00848">848</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="ad4beefa01700ced1c431affa59f6fe40"></a><!-- doxytag: member="module_forecast::Forecast::Croston::setMinAlfa" ref="ad4beefa01700ced1c431affa59f6fe40" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::Croston::setMinAlfa </td> <td>(</td> <td class="paramtype">double </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 minimum value for the alfa parameter. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00840">840</a> of file <a class="el" href="a00204_source.html">forecast.h</a>.</p> </div> </div> <a class="anchor" id="aebbcc1ab851ce0a324c09d93f4ac39be"></a><!-- doxytag: member="module_forecast::Forecast::Croston::setMinIntermittence" ref="aebbcc1ab851ce0a324c09d93f4ac39be" args="(double x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void module_forecast::Forecast::Croston::setMinIntermittence </td> <td>(</td> <td class="paramtype">double </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 minimum intermittence before applying this method. </p> <p>Definition at line <a class="el" href="a00204_source.html#l00856">856</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>