The function API for fit_power_law_speed passes parameters directly, and does not allow variation of u_ref as a parameter, instead simply fitting alpha.
[ ] Alter the cost residual to accept u_ref and z_ref as parameters. NB problem is underconstrained if you allow them both to vary, so ensure there's an assertion to allow only one of them (either fit alpha and u_ref, alpha alone, or alpha and z_ref).
[ ] Alter the API to accept an Array2d &initial_parameters and Array2b &fixed_parameters the same as the API for fit_lewkowiz_speed. It may be possible to generalise the cost functor used for fitting lewkowicz speed, to help keep code DRY.
The function API for
fit_power_law_speed
passes parameters directly, and does not allow variation of u_ref as a parameter, instead simply fittingalpha
.u_ref
andz_ref
as parameters. NB problem is underconstrained if you allow them both to vary, so ensure there's an assertion to allow only one of them (either fitalpha
andu_ref
,alpha
alone, oralpha
andz_ref
).Array2d &initial_parameters
andArray2b &fixed_parameters
the same as the API forfit_lewkowiz_speed
. It may be possible to generalise the cost functor used for fitting lewkowicz speed, to help keep code DRY.