pub trait Backend: Send {
    type PlotConfig: Config;

    // Required methods
    fn new() -> Self;
    fn initialize(&mut self) -> Result<(), VisualizerError>;
    fn plot_1d(
        observe_points: Vec<f64>,
        acoustic_pressures: Vec<Complex>,
        resolution: f64,
        x_label: &str,
        config: Self::PlotConfig
    ) -> Result<(), VisualizerError>;
    fn plot_2d(
        observe_x: Vec<f64>,
        observe_y: Vec<f64>,
        acoustic_pressures: Vec<Complex>,
        resolution: f64,
        x_label: &str,
        y_label: &str,
        config: Self::PlotConfig
    ) -> Result<(), VisualizerError>;
    fn plot_modulation(
        modulation: Vec<f64>,
        config: Self::PlotConfig
    ) -> Result<(), VisualizerError>;
    fn plot_phase<T: Transducer>(
        config: Self::PlotConfig,
        geometry: &Geometry<T>,
        phases: Vec<f64>
    ) -> Result<(), VisualizerError>;
}
Expand description

Plotting backend

Required Associated Types§

Required Methods§

source

fn new() -> Self

source

fn initialize(&mut self) -> Result<(), VisualizerError>

source

fn plot_1d( observe_points: Vec<f64>, acoustic_pressures: Vec<Complex>, resolution: f64, x_label: &str, config: Self::PlotConfig ) -> Result<(), VisualizerError>

source

fn plot_2d( observe_x: Vec<f64>, observe_y: Vec<f64>, acoustic_pressures: Vec<Complex>, resolution: f64, x_label: &str, y_label: &str, config: Self::PlotConfig ) -> Result<(), VisualizerError>

source

fn plot_modulation( modulation: Vec<f64>, config: Self::PlotConfig ) -> Result<(), VisualizerError>

source

fn plot_phase<T: Transducer>( config: Self::PlotConfig, geometry: &Geometry<T>, phases: Vec<f64> ) -> Result<(), VisualizerError>

Object Safety§

This trait is not object safe.

Implementors§