Skip to content
b-k edited this page Sep 17, 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 for v0.995 and greater.

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 [done]
  • apop_data_get_page gets pages using regexes; use simple string comparison. Same with apop_data_rm_page. [done: changed default to case-insensitive search]
  • Change name from char [101] to char * [done]

apop_model struct

  • Change p, cdf, log_likelihood, constraint return values to long double, not double. Especially for p, the precision matters. [done]
  • Remove Apop_settings_alloc [done]
  • Rename Apop_model_add_group to Apop_settings_add_group. [done]
  • Change name from char [101] to char *
  • Remove score, predict and parameter_model; implement using the vtable mechanism [done]
  • estimate method can return void, saving a line of code everywhere. Note again that the prep method makes the copy of the model that the estimate method will parameterize. [done]
  • change vbase, m1base, m2base ==> vsize, msize1, msize2 [done]

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 [removed output_pipe, output_type,...; set on a per-function basis.]

Functions and macros

  • Apop_row should produces a one-row apop_data set, not a vector as it does now. That is, rename Apop_data_row to Apop_row. [done]
  • 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. [done]
  • Model coefficients with common Greek names [μ, σ] should be labeled as such, not via English-language spellings of those names. [done]
  • Deprecate apop_line_to_data; use apop_data_fill and apop_data_falloc. [done]
  • for apop_mle, trace_path should produce a matrix, not write to the db. [done]
  • Replace enum for search methods (APOP_SIMPLEX_NM, APOP_CG_PR) with a char.
  • Remove apop_strip_dots; coherent column names is the user's responsibility. [done]
  • Weighted moments like apop_vector_weighted_var merged with unweighted versions. fix in your code: just remove the _weighted substring. [done]
  • Remove apop_(vector|matrix)_increment, which were a silly idea. Use, e.g., *gsl_vector_ptr(v, 7) += 3; or (*gsl_vector_ptr(v, 7))++. [done]
Clone this wiki locally