1 /*-- vartable.h --*/ 2 3 #ifndef VARTABLE_H 4 #define VARTABLE_H 5 6 #include "types.h" 7 8 enum { 9 VT_VARNAME, VT_TFORM, 10 VT_REAL_USER_MIN, VT_REAL_USER_MAX, 11 VT_REAL_DATA_MIN, VT_REAL_DATA_MAX, 12 VT_MEAN, VT_MEDIAN, 13 VT_NLEVELS, VT_LEVEL_NAME, VT_LEVEL_VALUE, VT_LEVEL_COUNT, 14 VT_CAT_USER_MIN, VT_CAT_USER_MAX, 15 VT_CAT_DATA_MIN, VT_CAT_DATA_MAX, 16 VT_NMISSING, 17 NCOLS_VT 18 }; 19 20 typedef enum {ADDVAR_ROWNOS = 0, ADDVAR_BGROUP} NewVariableType; 21 22 extern const double AddVarRowNumbers; 23 extern const double AddVarBrushGroup; 24 25 typedef enum {real, categorical, integer, counter, uniform, all_vartypes} vartyped; 26 27 /* 28 * A vartabled object is not a table, but rather an entry in a table: 29 * it's all the data for a single variable, and it is used to populate 30 * a row in the variable manipulation table. Now that is done using a 31 * GtkTreeModel, so be careful before adding or moving an element in 32 * this structure. 33 */ 34 typedef struct { 35 GObject *d; /*-- the parent datad --*/ 36 37 gchar *collab, *collab_tform; 38 gchar *nickname; /*-- very short name to use in tour axis labels --*/ 39 40 /*-- is this variable categorical? --*/ 41 vartyped vartype; 42 gboolean isTime; 43 44 /*-- categorical_p --*/ 45 gint nlevels; 46 gint *level_values; 47 gint *level_counts; 48 gchar **level_names; /*-- strings --*/ 49 50 /*-- unadjusted, unaffected by imputation --*/ 51 gfloat mean, median; 52 53 lims lim_raw; /*-- range of the raw data --*/ 54 lims lim_tform; /*-- range of d->tform --*/ 55 56 /* 57 * the limits to be put into the table: presently, this is 58 * lim_tform but it excludes any missing values. 59 */ 60 lims lim_display; 61 62 /* 63 * If the user has supplied limits, lim_specified_p = true 64 * and the limits are stored in lim_specified.{min,max} 65 */ 66 gboolean lim_specified_p; 67 lims lim_specified; 68 lims lim_specified_tform; 69 70 lims lim; /*-- limits in use: lim_specified_tform or lim_tform --*/ 71 72 /*-- transformations --*/ 73 gint tform0; 74 gfloat domain_incr; /*-- stage 0 --*/ 75 gfloat (*domain_adj) (gfloat x, gfloat incr); 76 gfloat (*inv_domain_adj) (gfloat x, gfloat incr); 77 gint tform1; 78 gfloat param; 79 gint tform2; 80 81 /*-- jittering --*/ 82 gfloat jitter_factor; 83 84 /*-- in variable table --*/ 85 gboolean selected; 86 87 } vartabled; 88 89 90 #endif 91