Implement more and more logic.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use ndarray::prelude::*;
|
||||
|
||||
use super::Kernel;
|
||||
|
||||
pub struct Constant {
|
||||
@@ -10,4 +12,28 @@ impl Constant {
|
||||
}
|
||||
}
|
||||
|
||||
impl Kernel for Constant {}
|
||||
impl Kernel for Constant {
|
||||
fn k_diag(&self, ts: &[f64]) -> Array1<f64> {
|
||||
Array1::ones(ts.len()) * self.var
|
||||
}
|
||||
|
||||
fn order(&self) -> usize {
|
||||
1
|
||||
}
|
||||
|
||||
fn state_mean(&self, t: f64) -> Array1<f64> {
|
||||
Array1::zeros(1)
|
||||
}
|
||||
|
||||
fn state_cov(&self, t: f64) -> Array2<f64> {
|
||||
array![[1.0]] * self.var
|
||||
}
|
||||
|
||||
fn measurement_vector(&self) -> Array1<f64> {
|
||||
array![1.0]
|
||||
}
|
||||
|
||||
fn transition(&self, t0: f64, t1: f64) -> Array2<f64> {
|
||||
todo!();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user