Commit 799b7425 authored by Andreas J. Guelzow's avatar Andreas J. Guelzow Committed by Andreas J. Guelzow

read new radiobuttons and pass to ranking_tool add radio buttons add

2002-01-07  Andreas J. Guelzow  <aguelzow@taliesin.ca>

	* dialog-analysis-tools.c (rank_tool_ok_clicked_cb) : read new
	  radiobuttons and pass to ranking_tool
	* rank.glade : add radio buttons
	* tools.h : add av_ties_flag to ranking_tool

2002-01-07  Andreas J. Guelzow  <aguelzow@taliesin.ca>

	* analysis-tools.c (ranking_tool) : calculate rank for ties
	  based on av_ties_flag
parent 8df7721e
2002-01-07 Andreas J. Guelzow <aguelzow@taliesin.ca>
* analysis-tools.c (ranking_tool) : calculate rank for ties
based on av_ties_flag
2002-01-07 Andreas J. Guelzow <aguelzow@taliesin.ca>
* analysis-tools.h : add autofit_flag to data_analysis_output_t
* analysis-tools.c insert lots of calls to autofit_columns
* analysis-tools.c : insert lots of calls to autofit_columns
(autofit_columns) : new procedure
2002-01-07 Morten Welinder <welinder@rentec.com>
......
......@@ -2,6 +2,8 @@ Gnumeric 1.0.2
Andreas:
* Add `autofit columns' checkbox to all analysis tools.
* Add radio buttons to rank dialog to let user choose
behaviour in case of ties.
Morten:
* Make sure Linux ends up using IEEE_754 code in mathfunc.c.
......
2002-01-07 Andreas J. Guelzow <aguelzow@taliesin.ca>
* analysis-tools.c (ranking_tool) : calculate rank for ties
based on av_ties_flag
2002-01-07 Andreas J. Guelzow <aguelzow@taliesin.ca>
* analysis-tools.h : add autofit_flag to data_analysis_output_t
* analysis-tools.c insert lots of calls to autofit_columns
* analysis-tools.c : insert lots of calls to autofit_columns
(autofit_columns) : new procedure
2002-01-07 Morten Welinder <welinder@rentec.com>
......
2002-01-07 Andreas J. Guelzow <aguelzow@taliesin.ca>
* analysis-tools.c (ranking_tool) : calculate rank for ties
based on av_ties_flag
2002-01-07 Andreas J. Guelzow <aguelzow@taliesin.ca>
* analysis-tools.h : add autofit_flag to data_analysis_output_t
* analysis-tools.c insert lots of calls to autofit_columns
* analysis-tools.c : insert lots of calls to autofit_columns
(autofit_columns) : new procedure
2002-01-07 Morten Welinder <welinder@rentec.com>
......
2002-01-07 Andreas J. Guelzow <aguelzow@taliesin.ca>
* analysis-tools.c (ranking_tool) : calculate rank for ties
based on av_ties_flag
2002-01-07 Andreas J. Guelzow <aguelzow@taliesin.ca>
* analysis-tools.h : add autofit_flag to data_analysis_output_t
* analysis-tools.c insert lots of calls to autofit_columns
* analysis-tools.c : insert lots of calls to autofit_columns
(autofit_columns) : new procedure
2002-01-07 Morten Welinder <welinder@rentec.com>
......
......@@ -2693,7 +2693,7 @@ rank_compare (const rank_t *a, const rank_t *b)
int
ranking_tool (WorkbookControl *wbc, Sheet *sheet, GSList *input,
group_by_t group_by, data_analysis_output_t *dao)
group_by_t group_by, gboolean av_ties_flag, data_analysis_output_t *dao)
{
GSList *input_range = input;
GPtrArray *data = NULL;
......@@ -2750,7 +2750,8 @@ ranking_tool (WorkbookControl *wbc, Sheet *sheet, GSList *input,
/* Rank */
set_cell_float (dao, n_data * 4 + 2, i + 1,
rank[i].rank + rank[i].same_rank_count/2.);
rank[i].rank +
(av_ties_flag ? rank[i].same_rank_count/2. : 0));
/* Percent */
set_cell_float_na (dao, n_data * 4 + 3, i + 1,
......
2002-01-07 Andreas J. Guelzow <aguelzow@taliesin.ca>
* dialog-analysis-tools.c (rank_tool_ok_clicked_cb) : read new
radiobuttons and pass to ranking_tool
* rank.glade : add radio buttons
* tools.h : add av_ties_flag to ranking_tool
2002-01-07 Andreas J. Guelzow <aguelzow@taliesin.ca>
* anova-one.glade : add 'autofit columns' checkbox
......
......@@ -1529,6 +1529,7 @@ rank_tool_ok_clicked_cb (GtkWidget *button, GenericToolState *state)
GtkWidget *w;
GSList *input;
gint err;
gboolean av_ties_flag;
input = gnumeric_expr_entry_parse_to_list (
GNUMERIC_EXPR_ENTRY (state->input_entry), state->sheet);
......@@ -1538,9 +1539,12 @@ rank_tool_ok_clicked_cb (GtkWidget *button, GenericToolState *state)
w = glade_xml_get_widget (state->gui, "labels_button");
dao.labels_flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
w = glade_xml_get_widget (state->gui, "rank_button");
av_ties_flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
err = ranking_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet, input,
gnumeric_glade_group_value (state->gui, grouped_by_group),
&dao);
av_ties_flag, &dao);
switch (err) {
case 0: gtk_widget_destroy (state->dialog);
break;
......
......@@ -247,6 +247,96 @@
</widget>
</widget>
<widget>
<class>GtkTable</class>
<name>table1</name>
<border_width>5</border_width>
<rows>1</rows>
<columns>3</columns>
<homogeneous>False</homogeneous>
<row_spacing>0</row_spacing>
<column_spacing>0</column_spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkRadioButton</class>
<name>rank_button</name>
<can_focus>True</can_focus>
<label>Average _Rank</label>
<active>True</active>
<draw_indicator>True</draw_indicator>
<group>rank_or_placement</group>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>placement_button</name>
<can_focus>True</can_focus>
<label>_Top Rank</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>rank_or_placement</group>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label3</name>
<label>Ties:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
</widget>
<widget>
<class>GtkFrame</class>
<name>frame2</name>
......
......@@ -54,6 +54,7 @@ int exp_smoothing_tool (WorkbookControl *context, Sheet *sheet,
data_analysis_output_t *dao);
int ranking_tool (WorkbookControl *context, Sheet *sheet,
GSList *input, group_by_t group_by,
gboolean av_ties_flag,
data_analysis_output_t *dao);
int anova_single_factor_tool (WorkbookControl *context, Sheet *sheet,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment