Pairs of (x,y) values
Temporary scratch space used by the function
number of (x,y) pairs
numerator of calculated slope
denominator of calculated slope
Offset at Y-axis
Offset at X-axis
R-squared
%TRUE if the linear regression was successfully calculated
1.12
Calculates the linear regression of the values @xy and places the result in @m_num, @m_denom, @b and @xbase, representing the function y(x) = m_num/m_denom * (x - xbase) + b that has the least-square distance from all points @x and @y.
@r_squared will contain the remaining error.
If @temp is not %NULL, it will be used as temporary space for the function, in which case the function works without any allocation at all. If @temp is %NULL, an allocation will take place. @temp should have at least the same amount of memory allocated as @xy, i.e. 2*n*sizeof(GstClockTime).
> This function assumes (x,y) values with reasonable large differences > between them. It will not calculate the exact results if the differences > between neighbouring values are too small due to not being able to > represent sub-integer values during the calculations.