Struct fdg_sim::SimulationParameters
source · [−]pub struct SimulationParameters<N: Clone, E: Clone> {
pub node_start_size: f32,
pub dimensions: Dimensions,
pub force: Force<N, E>,
}
Expand description
Parameters for the simulation.
Fields
node_start_size: f32
The width and height of the box that the nodes randomly start in at the beginning of the simulation.
dimensions: Dimensions
The number of dimensions that the simulation will run in.
force: Force<N, E>
The force that dictates how the simulation behaves.
Implementations
sourceimpl<N: Clone, E: Clone> SimulationParameters<N, E>
impl<N: Clone, E: Clone> SimulationParameters<N, E>
sourcepub fn new(
node_start_size: f32,
dimensions: Dimensions,
force: Force<N, E>
) -> Self
pub fn new(
node_start_size: f32,
dimensions: Dimensions,
force: Force<N, E>
) -> Self
Create a new SimulationParameters
.
sourcepub fn force_mut(&mut self) -> &mut Force<N, E>
pub fn force_mut(&mut self) -> &mut Force<N, E>
Retrieve a mutable reference to the internal Force
.
sourcepub fn from_force(force: Force<N, E>) -> Self
pub fn from_force(force: Force<N, E>) -> Self
Create a new SimulationParameters
from a Force
.
Trait Implementations
sourceimpl<N: Clone + Clone, E: Clone + Clone> Clone for SimulationParameters<N, E>
impl<N: Clone + Clone, E: Clone + Clone> Clone for SimulationParameters<N, E>
sourcefn clone(&self) -> SimulationParameters<N, E>
fn clone(&self) -> SimulationParameters<N, E>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<N, E> RefUnwindSafe for SimulationParameters<N, E>
impl<N, E> Send for SimulationParameters<N, E>
impl<N, E> Sync for SimulationParameters<N, E>
impl<N, E> Unpin for SimulationParameters<N, E>
impl<N, E> UnwindSafe for SimulationParameters<N, E>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more