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§
Source§impl<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§
Auto Trait Implementations§
impl<N, E, Ty> Freeze for SimulationParameters<N, E, Ty>
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§
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