Skip to content
b-k edited this page Jul 24, 2013 · 9 revisions

Version 1.0 is a good time to fix minor mistakes in design and simplify away excess features, even if doing so breaks compatibility. These are proposed changes, to be made in the v1 branch.

apop_name struct

  • change column to col [done]
  • change title from char [101] to char * [done]

apop_data struct

  • Deprecate all the apop_data(get|set|ptr)_(ti|it|tt|ii) functions; use apop_data_get, apop_data_set, and apop_data_ptr only
  • apop_data_get_page gets pages using regexes; use simple string comparison. Same with apop_data_rm_page.

apop_model struct

  • Change p and log_likelihood return valuess to long double, not double. Especially for p, the precision matters.
  • Remove Apop_settings_alloc
  • Rename Apop_model_add_group to Apop_settings_add_group.
  • Change name from char [101] to char *
  • Remove score, predict and parameter_model; implement using the vtable mechanism
  • estimate method can return void, saving a line of code everywhere. Note again that the prep method makes a copy of the model.

apop_opts struct

  • Deprecate many global options that have no business being global: apop_opts.output_delimiter ? apop_opts.input_delimiters apop_opts.db_nan apop_opts.db_user/pass

Functions and macros

  • Apop_row should produces a full data set, not a vector as it does now. That is, rename Apop_data_row to Apop_row.
  • apop_data_add_named_elmt should write to the vector (as it once did), thanks to the DWIM exception added to apop_get, apop_set, &c. [i.e., given a data set with no matrix and a vector set up with the post-revision apop_data_add_named_elmt, apop_data_get(result, .rowname="xx") will get the vector element in the given row; before it searched the matrix.] This affects where many model coefficients get written.
  • Model coefficients with common Greek names [μ, σ] should be labelled as such, not via English-language spellings of those names.
  • Deprecate apop_line_to_data.
  • for apop_mle, trace_path should produce a matrix, not write to the db.
  • Replace enum for search methods (APOP_SIMPLEX_NM, APOP_CG_PR) with a char.

Clone this wiki locally