1.12.42
[gnumeric.git] / src / tools / analysis-exp-smoothing.h
blob16b04ae8d97ce3adfdfcfb3bb9cdb2b95ac46d11
1 /*
2 * analysis-histogram.h:
4 * This is a complete reimplementation of the exponential smoothing tool in 2008
6 * Author:
7 * Andreas J. Guelzow <aguelzow@pyrshep.ca>
9 * (C) Copyright 2008 by Andreas J. Guelzow <aguelzow@pyrshep.ca>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses/>.
27 #ifndef ANALYSIS_EXP_SMOOTHING_H
28 #define ANALYSIS_EXP_SMOOTHING_H
30 #include <gnumeric.h>
31 #include <numbers.h>
32 #include <tools/dao.h>
33 #include <tools/tools.h>
34 #include <tools/analysis-tools.h>
36 typedef enum {
37 exp_smoothing_type_ses_h = 0,
38 exp_smoothing_type_ses_r,
39 exp_smoothing_type_des,
40 exp_smoothing_type_ates,
41 exp_smoothing_type_mtes
42 } exponential_smoothing_type_t;
44 typedef struct {
45 analysis_tools_data_generic_t base;
46 gnm_float damp_fact;
47 gnm_float g_damp_fact;
48 gnm_float s_damp_fact;
49 int s_period;
50 int std_error_flag;
51 int df;
52 gboolean show_graph;
53 exponential_smoothing_type_t es_type;
54 } analysis_tools_data_exponential_smoothing_t;
56 gboolean analysis_tool_exponential_smoothing_engine (GOCmdContext *gcc, data_analysis_output_t *dao,
57 gpointer specs,
58 analysis_tool_engine_t selector,
59 gpointer result);
62 #endif