1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#[macro_use]
extern crate trackable;
use self::vector::Vector;
pub use self::error::{Error, ErrorKind};
pub mod autograd;
pub mod distributions;
pub mod kernels;
pub mod matrix;
pub mod means;
pub mod vector;
mod error;
pub type Result<T> = std::result::Result<T, Error>;
pub trait Mean<X> {
fn mean(&self, x: &X) -> f64;
}
pub trait Kernel<X = Vector> {
type HyperParams;
fn kernel(&self, x0: &X, x1: &X) -> f64;
}
pub trait DifferentiableKernel: Kernel {
fn partial<'a>(
&self,
x0: &'a Vector,
x1: &'a Vector,
) -> Box<dyn 'a + Fn(Self::HyperParams) -> f64>;
}