Struct particular::compute_method::storage::ParticleOrdered
source · pub struct ParticleOrdered<V, S> { /* private fields */ }
Expand description
Storage inside of which the massive particles are placed before the massless ones.
Allows for easy optimisation of the computation of forces between massive and massless particles.
Implementations§
source§impl<V, S> ParticleOrdered<V, S>
impl<V, S> ParticleOrdered<V, S>
sourcepub fn with<I, U>(massive: I, massless: U) -> Selfwhere
S: PartialEq + Zero,
I: IntoIterator<Item = PointMass<V, S>>,
U: IntoIterator<Item = PointMass<V, S>>,
pub fn with<I, U>(massive: I, massless: U) -> Selfwhere
S: PartialEq + Zero,
I: IntoIterator<Item = PointMass<V, S>>,
U: IntoIterator<Item = PointMass<V, S>>,
Creates a new ParticleOrdered
with the given massive and massless particles.
sourcepub const fn massive_len(&self) -> usize
pub const fn massive_len(&self) -> usize
Returns the number of stored massive particles.
sourcepub fn massive_mut(&mut self) -> &mut [PointMass<V, S>]
pub fn massive_mut(&mut self) -> &mut [PointMass<V, S>]
Returns a mutable reference to the massive particles.
sourcepub fn massless_mut(&mut self) -> &mut [PointMass<V, S>]
pub fn massless_mut(&mut self) -> &mut [PointMass<V, S>]
Returns a mutable reference to the massless particles.
sourcepub fn particles_mut(&mut self) -> &mut [PointMass<V, S>]
pub fn particles_mut(&mut self) -> &mut [PointMass<V, S>]
Returns a mutable reference to the stored ordered particles.
Trait Implementations§
source§impl<V: Clone, S: Clone> Clone for ParticleOrdered<V, S>
impl<V: Clone, S: Clone> Clone for ParticleOrdered<V, S>
source§fn clone(&self) -> ParticleOrdered<V, S>
fn clone(&self) -> ParticleOrdered<V, S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<V, S> ComputeMethod<&ParticleOrdered<V, S>> for BruteForcePairs
impl<V, S> ComputeMethod<&ParticleOrdered<V, S>> for BruteForcePairs
source§impl<V, S> ComputeMethod<&ParticleOrdered<V, S>> for BruteForcePairsSoftened<S>
impl<V, S> ComputeMethod<&ParticleOrdered<V, S>> for BruteForcePairsSoftened<S>
Auto Trait Implementations§
impl<V, S> Freeze for ParticleOrdered<V, S>
impl<V, S> RefUnwindSafe for ParticleOrdered<V, S>where
S: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, S> Send for ParticleOrdered<V, S>
impl<V, S> Sync for ParticleOrdered<V, S>
impl<V, S> Unpin for ParticleOrdered<V, S>
impl<V, S> UnwindSafe for ParticleOrdered<V, S>where
S: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
source§impl<U> AsPrimitive for U
impl<U> AsPrimitive for U
source§fn as_<F: FromPrimitive<Self>>(self) -> F
fn as_<F: FromPrimitive<Self>>(self) -> F
Converts this primitive into the input primitive.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<V, S, C, O> ComputeMethod<&ParticleOrdered<V, S>> for Cwhere
O: IntoIterator,
C: for<'a> ComputeMethod<ParticleSystem<'a, V, S, [PointMass<V, S>]>, Output = O>,
impl<V, S, C, O> ComputeMethod<&ParticleOrdered<V, S>> for Cwhere
O: IntoIterator,
C: for<'a> ComputeMethod<ParticleSystem<'a, V, S, [PointMass<V, S>]>, Output = O>,
source§fn compute(
&mut self,
ordered: &ParticleOrdered<V, S>
) -> <C as ComputeMethod<&ParticleOrdered<V, S>>>::Output
fn compute( &mut self, ordered: &ParticleOrdered<V, S> ) -> <C as ComputeMethod<&ParticleOrdered<V, S>>>::Output
Performs the computation between objects contained in the storage.