Compilation: fix up tools includes.
[gnumeric.git] / src / tools / analysis-histogram.h
blob105ab4533ef71521423b7f6643f4babc7955052f
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * analysis-histogram.h:
5 * This is a complete reimplementation of the histogram tool in 2008
7 * Author:
8 * Andreas J. Guelzow <aguelzow@pyrshep.ca>
10 * (C) Copyright 2008 by Andreas J. Guelzow <aguelzow@pyrshep.ca>
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, see <https://www.gnu.org/licenses/>.
28 #ifndef ANALYSIS_HISTOGRAM_H
29 #define ANALYSIS_HISTOGRAM_H
31 #include "gnumeric.h"
32 #include "numbers.h"
33 #include <tools/dao.h>
34 #include "tools.h"
35 #include "analysis-tools.h"
37 typedef enum {
38 bintype_no_inf_lower = 0,
39 bintype_no_inf_upper = 1 << 0,
40 bintype_p_inf_lower = 1 << 1,
41 bintype_p_inf_upper = bintype_no_inf_upper | bintype_p_inf_lower,
42 bintype_m_inf_lower = 1 << 2,
43 bintype_m_inf_upper = bintype_m_inf_lower | bintype_no_inf_upper,
44 bintype_pm_inf_lower = bintype_m_inf_lower | bintype_p_inf_lower,
45 bintype_pm_inf_upper = bintype_m_inf_lower | bintype_p_inf_lower | bintype_no_inf_upper
46 } analysis_histogram_bin_type_t;
48 typedef enum {
49 NO_CHART = 0,
50 HISTOGRAM_CHART,
51 BAR_CHART,
52 COLUMN_CHART
53 } chart_t;
56 typedef struct {
57 analysis_tools_data_generic_t base;
58 gboolean predetermined;
59 GnmValue *bin;
60 analysis_histogram_bin_type_t bin_type;
61 gboolean max_given;
62 gboolean min_given;
63 gnm_float max;
64 gnm_float min;
65 gint n;
66 gboolean percentage;
67 gboolean cumulative;
68 gboolean only_numbers;
69 chart_t chart;
70 } analysis_tools_data_histogram_t;
72 gboolean analysis_tool_histogram_engine (GOCmdContext *gcc, data_analysis_output_t *dao, gpointer specs,
73 analysis_tool_engine_t selector, gpointer result);
75 #endif