pub trait Gain: Debug + Sized {
type G: GainCalculatorGenerator;
// Required method
fn init(self) -> Result<Self::G, GainError>;
// Provided method
fn init_full(
self,
_: &Geometry,
_filter: Option<&HashMap<usize, BitVec>>,
_parallel: bool,
) -> 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§
Sourcetype G: GainCalculatorGenerator
type G: GainCalculatorGenerator
The type of the calculator generator.
Required Methods§
Provided Methods§
Sourcefn init_full(
self,
_: &Geometry,
_filter: Option<&HashMap<usize, BitVec>>,
_parallel: bool,
) -> Result<Self::G, GainError>
fn init_full( self, _: &Geometry, _filter: Option<&HashMap<usize, BitVec>>, _parallel: bool, ) -> 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.