Elaboradar 0.1
Caricamento in corso...
Ricerca in corso...
Nessun risultato

◆ compute_intercept()

template<typename T >
radarelab::Statistic< T >::compute_intercept ( unsigned minimum = 2)
inline

Compute least square linear fit (no exception if only scalars where provided)

Parametri
[in]minimumMinimum amount of accumulated data to perform the computation
Restituisce
value of the intercept. If N is less the minimum returns NaN

Definizione alla linea 141 del file statistics.h.

142 {
143 if(N>=minimum)
144 intercept = (sum_y*sum_x2-sum_x*sum_xy)/(N*sum_x2-sum_x*sum_x);
145 else intercept = sqrt(-1);
146 return intercept;
147 }