static void size_allocate_global_button (PsppireSheet *sheet);
-static void psppire_sheet_button_size_request (PsppireSheet *sheet,
- const PsppireSheetButton *button,
- GtkRequisition *requisition);
static void psppire_sheet_real_cell_clear (PsppireSheet *sheet,
gint row,
return TRUE;
}
-static void
-psppire_sheet_button_size_request (PsppireSheet *sheet,
- const PsppireSheetButton *button,
- GtkRequisition *button_requisition)
-{
- GtkRequisition requisition;
- GtkRequisition label_requisition;
-
- label_requisition.height = DEFAULT_ROW_HEIGHT;
- label_requisition.width = COLUMN_MIN_WIDTH;
-
- requisition.height = DEFAULT_ROW_HEIGHT;
- requisition.width = COLUMN_MIN_WIDTH;
-
-
- *button_requisition = requisition;
- button_requisition->width = MAX (requisition.width, label_requisition.width);
- button_requisition->height = MAX (requisition.height, label_requisition.height);
-
-}
-
static void
psppire_sheet_forall (GtkContainer *container,
gboolean include_internals,
}
+#if 0
static void
dump_matrix (const gsl_matrix *m)
{
}
printf ("\n");
}
+#endif
static int
}
+#if 0
void
categoricals_dump (const struct categoricals *cat)
{
for (node = hmap_first (m); node; node = hmap_next (m, node))
{
struct string s;
- ds_init_empty (&s);
const struct value_node *vn = HMAP_DATA (node, struct value_node, node);
+ ds_init_empty (&s);
var_append_value_name (vp->var, &vn->value, &s);
printf ("Value: %s; Index %d; CC %g\n",
ds_cstr (&s),
printf ("%d ", cat->reverse_variable_map[v]);
printf ("\n");
}
+#endif
return categoricals_get_binary_by_subscript (cov->categoricals, i - cov->n_vars, c);
}
+#if 0
void
dump_matrix (const gsl_matrix *m)
{
printf ("\n");
}
}
+#endif
/* Call this function for every case in the data set */
void
covariance_calculate_single_pass_unnormalized (struct covariance *cov)
{
size_t i, j;
- size_t m;
for (i = 0 ; i < cov->dim; ++i)
{
static void
linreg_fit_qr (const gsl_matrix *cov, linreg *l)
{
+ double intcpt_coef = 0.0;
+ double intercept_variance = 0.0;
gsl_matrix *xtx;
gsl_matrix *q;
gsl_matrix *r;
gsl_blas_dtrsm (CblasLeft, CblasLower, CblasNoTrans, CblasNonUnit, linreg_mse (l),
r, q);
/* Copy the lower triangle into the upper triangle. */
- double intercept_variance = 0.0;
for (i = 0; i < q->size1; i++)
{
gsl_matrix_set (l->cov, i + 1, i + 1, gsl_matrix_get (q, i, i));
/* Covariances related to the intercept. */
intercept_variance += linreg_mse (l) / linreg_n_obs (l);
gsl_matrix_set (l->cov, 0, 0, intercept_variance);
- double intcpt_coef = 0.0;
for (i = 0; i < q->size1; i++)
{
for (j = 0; j < q->size2; j++)
}
-/* If there's nothing selected in the variable treeview,
- then automatically select the first item */
-static void
-select_something (GtkTreeModel *treemodel,
- GtkTreePath *arg1,
- GtkTreeIter *arg2,
- gpointer data)
-{
- struct recode_dialog *rd = data;
- GtkTreeSelection *sel;
-
- sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (rd->variable_treeview));
-
- if ( gtk_tree_selection_count_selected_rows (sel) < 1)
- {
- GtkTreeIter iter;
-
- gtk_tree_model_get_iter_first (treemodel, &iter);
-
- gtk_tree_selection_select_iter (sel, &iter);
- }
-}
-
-
/* Callback for the new_value_entry and new_value_togglebutton widgets.
It's used to enable/disable the acr. */
static void
if (rd.different)
{
- GtkTreeModel *model = GTK_TREE_MODEL (PSPPIRE_VAR_VIEW (rd.variable_treeview)->list);
GtkTreeSelection *sel;
GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();