Procesing INPUT PARAMETERS: LM - linear model X - input vector, array[0..NVars-1]. Result: value of linear model regression estimate -- ALGLIB -- Copyright 03.09.2008 by Bochkanov Sergey *************************************************************************/
| 457 | Copyright 03.09.2008 by Bochkanov Sergey |
| 458 | *************************************************************************/ |
| 459 | double lrprocess(const linearmodel& lm, const ap::real_1d_array& x) |
| 460 | { |
| 461 | double result; |
| 462 | double v; |
| 463 | int offs; |
| 464 | int nvars; |
| 465 | |
| 466 | ap::ap_error::make_assertion(ap::round_f(lm.w(1))==lrvnum, "LINREG: Incorrect LINREG version!"); |
| 467 | nvars = ap::round_f(lm.w(2)); |
| 468 | offs = ap::round_f(lm.w(3)); |
| 469 | v = ap::vdotproduct(&x(0), 1, &lm.w(offs), 1, ap::vlen(0,nvars-1)); |
| 470 | result = v+lm.w(offs+nvars); |
| 471 | return result; |
| 472 | } |
| 473 | |
| 474 | |
| 475 | /************************************************************************* |
nothing calls this directly
no test coverage detected