Unpacks coefficients of linear model. INPUT PARAMETERS: LM - linear model in ALGLIB format OUTPUT PARAMETERS: V - coefficients, array[0..NVars] NVars - number of independent variables (one less than number of coefficients) -- ALGLIB -- Copyright 30.08.2008 by Bochkanov Sergey **************************************************
| 404 | Copyright 30.08.2008 by Bochkanov Sergey |
| 405 | *************************************************************************/ |
| 406 | void lrunpack(const linearmodel& lm, ap::real_1d_array& v, int& nvars) |
| 407 | { |
| 408 | int offs; |
| 409 | |
| 410 | ap::ap_error::make_assertion(ap::round_f(lm.w(1))==lrvnum, "LINREG: Incorrect LINREG version!"); |
| 411 | nvars = ap::round_f(lm.w(2)); |
| 412 | offs = ap::round_f(lm.w(3)); |
| 413 | v.setbounds(0, nvars); |
| 414 | ap::vmove(&v(0), 1, &lm.w(offs), 1, ap::vlen(0,nvars)); |
| 415 | } |
| 416 | |
| 417 | |
| 418 | /************************************************************************* |
no test coverage detected