Struct criterion_stats::bivariate::regression::StraightLine[][src]

pub struct StraightLine<A> where
    A: Float, 
{ pub intercept: A, pub slope: A, }

A straight line y = m * x + b

Fields

The y-intercept of the line

The slope of the line

Methods

impl<A> StraightLine<A> where
    A: Float, 
[src]

Fits the data to a straight line using ordinary least squares

  • Time: O(length)

Computes the goodness of fit (coefficient of determination) for this data set

  • Time: O(length)

Trait Implementations

impl<A: Clone> Clone for StraightLine<A> where
    A: Float, 
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<A: Copy> Copy for StraightLine<A> where
    A: Float, 
[src]

Auto Trait Implementations

impl<A> Send for StraightLine<A>

impl<A> Sync for StraightLine<A>