bigladder / btwxt

N-dimensional grid interpolation library
BSD 3-Clause "New" or "Revised" License
15 stars 8 forks source link

More usability and other comments #40

Open chipbarnaby opened 9 months ago

chipbarnaby commented 9 months ago
  1. Default names should be shorter to make small string optimization more likely.
  2. GridPointDataSet() does not accept a Courier. The day may come when there are possible errors.
  3. Data vector sizes are not checked for consistency with grid. In debug, out-of-bounds exceptions occur. In release, nothing. All possible consistency checks should be done during initialization.
  4. A more convenient argument order for constructors would be xxxx( name, courier *, blah blah blah). Pass nullptr to get default courier. Motivation: get name and in general error handling are ALWAYS needed (no "real" application would use the default courier). Putting courier at the end means args must be provided where defaults could have been used.
  5. Add RGI parent pointers to subobjects. Would allow full context (both RGI and subobject) to be included in error messages.
  6. Still too much copying. Make it possible to use caller's data directly, no copying.
  7. A case could be made that there are too many constructors. Modest convenience at the cost of confusion. Define a single API and live with it. Simplifies testing.
  8. Change g format in error messages so moderately sized values do not use exponential form.

Probably more to come.

nealkruis commented 9 months ago

@nealkruis: Fix 3 and 4, move courier argument in GridAxis (compromise on 4) @chipbarnaby: provide g format for 8