alyssajs / FLOPART

0 stars 2 forks source link

use class/struct as argument to Minimize / findMean #2

Closed tdhock closed 3 years ago

tdhock commented 3 years ago

@alyssajs that would make the decoding easier to understand

tdhock commented 3 years ago

Should there be a PiecewisePoissonLossLog member of this struct? No I don't think there should be a PiecewisePoissonLossLog member. And the name may be changed to something like "MinimizeResult" or "OptimalParameters" because it stores the output of the Minimize method, which is a set of optimal parameters. so something like

struct MinimizeResult{
  double cost;
  double log_mean;
  double prev_log_mean;
  int prev_seg_end;
};