Trait particular::compute_method::ComputeMethod
source · pub trait ComputeMethod<Storage> {
type Output: IntoIterator;
// Required method
fn compute(&mut self, storage: Storage) -> Self::Output;
}
Expand description
Trait to perform a computation of values between objects contained in a storage of type S
.
§Example
struct AccelerationCalculator;
impl ComputeMethod<&[PointMass<Vec3, f32>]> for AccelerationCalculator {
type Output = Vec<Vec3>;
fn compute(&mut self, storage: &[PointMass<Vec3, f32>]) -> Self::Output {
// ...
}
}
Required Associated Types§
sourcetype Output: IntoIterator
type Output: IntoIterator
IntoIterator that yields the computed values.