Struct fdg_sim::SimulationParameters
source · [−]pub struct SimulationParameters<N, E, Ty = Undirected> {
pub node_start_size: f32,
pub dimensions: Dimensions,
/* private fields */
}
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.
Implementations
sourceimpl<N, E, Ty: EdgeType> SimulationParameters<N, E, Ty>
impl<N, E, Ty: EdgeType> SimulationParameters<N, E, Ty>
sourcepub fn new(
node_start_size: f32,
dimensions: Dimensions,
force: Force<N, E, Ty>
) -> Self
pub fn new(
node_start_size: f32,
dimensions: Dimensions,
force: Force<N, E, Ty>
) -> Self
Create a new SimulationParameters
.
sourcepub fn force_mut(&mut self) -> &mut Force<N, E, Ty>
pub fn force_mut(&mut self) -> &mut Force<N, E, Ty>
Retrieve a mutable reference to the internal Force
.
sourcepub fn from_force(force: Force<N, E, Ty>) -> Self
pub fn from_force(force: Force<N, E, Ty>) -> Self
Create a new SimulationParameters
from a Force
.
Trait Implementations
sourceimpl<N: Clone, E: Clone, Ty: Clone> Clone for SimulationParameters<N, E, Ty>
impl<N: Clone, E: Clone, Ty: Clone> Clone for SimulationParameters<N, E, Ty>
sourcefn clone(&self) -> SimulationParameters<N, E, Ty>
fn clone(&self) -> SimulationParameters<N, E, Ty>
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, Ty> RefUnwindSafe for SimulationParameters<N, E, Ty>
impl<N, E, Ty> Send for SimulationParameters<N, E, Ty>
impl<N, E, Ty> Sync for SimulationParameters<N, E, Ty>
impl<N, E, Ty> Unpin for SimulationParameters<N, E, Ty>
impl<N, E, Ty> UnwindSafe for SimulationParameters<N, E, Ty>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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