SerializableKernelApproximation

Trait SerializableKernelApproximation 

Source
pub trait SerializableKernelApproximation {
    // Required methods
    fn export_config(&self) -> Result<SerializableKernelConfig>;
    fn import_config(config: &SerializableKernelConfig) -> Result<Self>
       where Self: Sized;
    fn export_fitted_params(&self) -> Result<SerializableFittedParams>;
    fn import_fitted_params(
        &mut self,
        params: &SerializableFittedParams,
    ) -> Result<()>;

    // Provided methods
    fn save_to_file<P: AsRef<Path>>(&self, path: P) -> Result<()> { ... }
    fn load_from_file<P: AsRef<Path>>(path: P) -> Result<Self>
       where Self: Sized { ... }
}
Expand description

Trait for serializable kernel approximation methods

Required Methods§

Source

fn export_config(&self) -> Result<SerializableKernelConfig>

Export configuration to serializable format

Source

fn import_config(config: &SerializableKernelConfig) -> Result<Self>
where Self: Sized,

Import configuration from serializable format

Source

fn export_fitted_params(&self) -> Result<SerializableFittedParams>

Export fitted parameters to serializable format

Source

fn import_fitted_params( &mut self, params: &SerializableFittedParams, ) -> Result<()>

Import fitted parameters from serializable format

Provided Methods§

Source

fn save_to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>

Save model to file

Source

fn load_from_file<P: AsRef<Path>>(path: P) -> Result<Self>
where Self: Sized,

Load model from file

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§