Update Spanish translation
[gnumeric.git] / src / tools / analysis-histogram.h
blobccb2b6e6bc92a251e26f2bf9e14b0ca892ff3580
1 /*
2 * analysis-histogram.h:
4 * This is a complete reimplementation of the histogram 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_HISTOGRAM_H
28 #define ANALYSIS_HISTOGRAM_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 bintype_no_inf_lower = 0,
38 bintype_no_inf_upper = 1 << 0,
39 bintype_p_inf_lower = 1 << 1,
40 bintype_p_inf_upper = bintype_no_inf_upper | bintype_p_inf_lower,
41 bintype_m_inf_lower = 1 << 2,
42 bintype_m_inf_upper = bintype_m_inf_lower | bintype_no_inf_upper,
43 bintype_pm_inf_lower = bintype_m_inf_lower | bintype_p_inf_lower,
44 bintype_pm_inf_upper = bintype_m_inf_lower | bintype_p_inf_lower | bintype_no_inf_upper
45 } analysis_histogram_bin_type_t;
47 typedef enum {
48 NO_CHART = 0,
49 HISTOGRAM_CHART,
50 BAR_CHART,
51 COLUMN_CHART
52 } chart_t;
55 typedef struct {
56 analysis_tools_data_generic_t base;
57 gboolean predetermined;
58 GnmValue *bin;
59 analysis_histogram_bin_type_t bin_type;
60 gboolean max_given;
61 gboolean min_given;
62 gnm_float max;
63 gnm_float min;
64 gint n;
65 gboolean percentage;
66 gboolean cumulative;
67 gboolean only_numbers;
68 chart_t chart;
69 } analysis_tools_data_histogram_t;
71 gboolean analysis_tool_histogram_engine (GOCmdContext *gcc, data_analysis_output_t *dao, gpointer specs,
72 analysis_tool_engine_t selector, gpointer result);
74 #endif