MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / lrunpack

Function lrunpack

src/linreg.cpp:406–415  ·  view source on GitHub ↗

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 **************************************************

Source from the content-addressed store, hash-verified

404 Copyright 30.08.2008 by Bochkanov Sergey
405*************************************************************************/
406void 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/*************************************************************************

Callers 6

runEM_linearFunction · 0.85
runEMFunction · 0.85
runEMlogFunction · 0.85
calculateRatioUsingCGMethod · 0.85
calculateRatioMethod · 0.85

Calls 3

round_fFunction · 0.85
vmoveFunction · 0.85
setboundsMethod · 0.45

Tested by

no test coverage detected