Trait Gain

Source
pub trait Gain: Debug + Sized {
    type G: GainCalculatorGenerator;

    // Required method
    fn init(
        self,
        geometry: &Geometry,
        env: &Environment,
        filter: &TransducerFilter,
    ) -> Result<Self::G, GainError>;
}
Available on crate feature gain only.
Expand description

Trait for calculating the phase/amplitude of each transducer.

See also Gain derive macro.

Required Associated Types§

Source

type G: GainCalculatorGenerator

The type of the calculator generator.

Required Methods§

Source

fn init( self, geometry: &Geometry, env: &Environment, filter: &TransducerFilter, ) -> Result<Self::G, GainError>

Initialize the gain and generate the calculator generator.

filter is a hash map that holds a bit vector representing the indices of the enabled transducers for each device index. If filter is None, all transducers are enabled.

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§