pub trait Gain: Debug {
type G: GainContextGenerator;
// Required method
fn init(
self,
geometry: &Geometry,
filter: Option<&HashMap<usize, BitVec<u32>>>,
) -> Result<Self::G, AUTDDriverError>;
}Expand description
Trait for calculating the phase/amplitude of each transducer.
See also Gain derive macro.
Required Associated Types§
Sourcetype G: GainContextGenerator
type G: GainContextGenerator
The type of the context generator.
Required Methods§
Sourcefn init(
self,
geometry: &Geometry,
filter: Option<&HashMap<usize, BitVec<u32>>>,
) -> Result<Self::G, AUTDDriverError>
fn init( self, geometry: &Geometry, filter: Option<&HashMap<usize, BitVec<u32>>>, ) -> Result<Self::G, AUTDDriverError>
Initialize the gain and generate the context 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.