Clean up dependencies

This commit is contained in:
2021-01-04 11:15:57 +01:00
parent 0d2714e814
commit fcccf88e6f
12 changed files with 532 additions and 1781 deletions

View File

@@ -10,21 +10,6 @@ pub use exponential::Exponential;
pub use matern32::Matern32;
pub use matern52::Matern52;
#[inline]
pub(crate) fn transition(t0: f64, t1: f64, feedback: Array2<f64>) -> Array2<f64> {
let a = feedback * (t1 - t0);
if a.shape() == [1, 1] {
array![[a[(0, 0)].exp()]]
} else {
let mut b = Array2::<f64>::zeros(a.dim());
crate::expm::expm(&a, &mut b);
b
}
}
pub(crate) fn distance(ts1: &[f64], ts2: &[f64]) -> Array2<f64> {
let mut r = Array2::zeros((ts1.len(), ts2.len()));
@@ -54,27 +39,9 @@ pub trait Kernel {
unimplemented!();
}
fn transition(&self, t0: f64, t1: f64) -> Array2<f64> {
transition(t0, t1, self.feedback())
}
fn transition(&self, t0: f64, t1: f64) -> Array2<f64>;
fn noise_cov(&self, _t0: f64, _t1: f64) -> Array2<f64> {
/*
mat = self.noise_effect.dot(self.noise_density).dot(self.noise_effect.T)
#print(g)
print(mat)
Phi = np.vstack((
np.hstack((self.feedback, mat)),
np.hstack((np.zeros_like(mat), -self.feedback.T))))
print(Phi)
m = self.order
AB = np.dot(sp.linalg.expm(Phi * (t2 - t1)), np.eye(2*m, m, k=-m))
print(AB)
return sp.linalg.solve(AB[m:,:].T, AB[:m,:].T)
*/
// let mat = self.noise_effect()
todo!();
}
}