/// Construct a new KalmanFilter initialized to the supplied sample.
Construct a new KalmanFilter initialized to the supplied sample.
Construct a new KalmanFilter initialized to the supplied sample .
pub fn new(sample: Sample) -> Self {
        let Sample { utc, monotonic, std_dev } = sample;
        let covariance_00 = duration_to_f64(std_dev).powf(2.0).max(MIN_COVARIANCE);
        KalmanFilter {
            reference_utc: utc,
            monotonic,
            estimate_0: 0f64,
            estimate_1: 1f64,
            covariance_00,
        }
    }
pub fn new ( sample : Sample ) -> Self { let Sample { utc , monotonic , std_dev } = sample ; let covariance_00 = duration_to_f64 ( std_dev ) . powf ( 2.0 ) . max ( MIN_COVARIANCE ) ; KalmanFilter { reference_utc : utc , monotonic , estimate_0 : 0f64 , estimate_1 : 1f64 , covariance_00 , } }
Construct a new KalmanFilter initialized to the supplied sample.
Construct a new KalmanFilter initialized to the supplied sample .
sample
Sample