Skip to main content

Predictor

Trait Predictor 

Source
pub trait Predictor:
    Debug
    + Send
    + Sync {
    // Required methods
    fn embed(&self, psi: &[Complex64]) -> Vec<f64>;
    fn predict(&self, z: &[f64], a: Condition) -> Vec<f64>;
    fn dist(&self, a: &[f64], b: &[f64]) -> f64;
}
Expand description

Predictor backend trait — PRD §5.3

Required Methods§

Source

fn embed(&self, psi: &[Complex64]) -> Vec<f64>

Isometry I: H → Z

Source

fn predict(&self, z: &[f64], a: Condition) -> Vec<f64>

Predictor P: Z × Condition → Z

Source

fn dist(&self, a: &[f64], b: &[f64]) -> f64

Distance in latent space

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§