Finance manager
Лабораторна робота №2 - Документація коду
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ExponentialSmoothingStrategy Class Reference

#include <ExponentialSmoothingStrategy.h>

Inheritance diagram for ExponentialSmoothingStrategy:
Inheritance graph
[legend]
Collaboration diagram for ExponentialSmoothingStrategy:
Collaboration graph
[legend]

Public Member Functions

 ExponentialSmoothingStrategy (double a=0.5)
 
double forecast (const std::vector< Transaction > &history, int months) override
 Чисто віртуальний (pure virtual) метод для розрахунку прогнозу.
 
- Public Member Functions inherited from ForecastStrategy
virtual ~ForecastStrategy ()
 Віртуальний деструктор.
 

Public Attributes

double alpha
 

Constructor & Destructor Documentation

◆ ExponentialSmoothingStrategy()

ExponentialSmoothingStrategy::ExponentialSmoothingStrategy ( double  a = 0.5)
inline

Member Function Documentation

◆ forecast()

double ExponentialSmoothingStrategy::forecast ( const std::vector< Transaction > &  history,
int  months 
)
overridevirtual

Чисто віртуальний (pure virtual) метод для розрахунку прогнозу.

Похідні класи зобов'язані реалізувати цей метод.

Parameters
historyВектор минулих транзакцій, що використовується для аналізу.
monthsПараметр, що визначає, як саме робиться прогноз. (Наприклад, у MovingAverageStrategy це кількість останніх транзакцій).
Returns
Прогнозоване значення (double).

Implements ForecastStrategy.

Member Data Documentation

◆ alpha

double ExponentialSmoothingStrategy::alpha

The documentation for this class was generated from the following files: