### pub fn add_force(self, name: impl AsRef, force: impl ForceBuilder) -> Self Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Simulation.html Adds a force, defined by a `ForceBuilder`, to the simulation. The `ForceBuilder` usually does some initialization of auxiliary data structures. Examples include `Center`, `PositionX`, `PositionY`, `Link`, and `ManyBody`. ```APIDOC ## pub fn add_force(self, name: impl AsRef, force: impl ForceBuilder) -> Self ### Description Adds a force, defined by a `ForceBuilder`, to the simulation. The `ForceBuilder` usually does some initialization of auxiliary data structures. Examples include `Center`, `PositionX`, `PositionY`, `Link`, and `ManyBody`. ### Method add_force ### Parameters - **name** (impl AsRef) - Required - The name of the force. - **force** (impl ForceBuilder) - Required - The force builder that defines the force. ### Returns - **Self** - The simulation with the force added. ``` -------------------------------- ### SimulationBuilder::new Source: https://docs.rs/fjadra/latest/fjadra/force/struct.SimulationBuilder.html Creates a new SimulationBuilder instance with default settings. ```APIDOC ## SimulationBuilder::new ### Description Creates a new SimulationBuilder instance with default settings. ### Method new ### Signature pub fn new() -> Self ### Parameters None ### Returns - **Self** - A new SimulationBuilder instance. ``` -------------------------------- ### PositionX::new Source: https://docs.rs/fjadra/latest/fjadra/force/struct.PositionX.html Creates a new PositionX force builder with default settings. ```APIDOC ## PositionX::new ### Description Creates a new PositionX force builder with default settings. ### Method new ### Signature pub fn new() -> Self ### Parameters None ### Returns - **Self** - A new PositionX instance. ### Example ```rust let force = PositionX::new(); ``` ``` -------------------------------- ### pub fn step(&mut self) Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Simulation.html Performs a full simulation, running until the alpha value reaches the minimum. ```APIDOC ## pub fn step(&mut self) ### Description Performs a full simulation, running until the alpha value reaches the minimum. ### Method step ### Parameters None ### Returns None ``` -------------------------------- ### Center::new Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Center.html Creates a new Center instance. This is the constructor for the Center force builder. ```APIDOC ## Center::new ### Description Creates a new Center instance. ### Method new ### Signature pub fn new() -> Self ### Parameters None ### Returns - **Self** - A new Center instance. ``` -------------------------------- ### PositionY::new Source: https://docs.rs/fjadra/latest/fjadra/force/struct.PositionY.html Creates a new PositionY force builder instance. ```APIDOC ## new ### Description Creates a new PositionY force builder. ### Method new ### Signature pub fn new() -> Self ### Parameters None ### Returns Self ### Example ```rust let force_builder = PositionY::new(); ``` ``` -------------------------------- ### pub fn tick(&mut self, iterations: usize) Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Simulation.html Advances the simulation by a number of iterations. ```APIDOC ## pub fn tick(&mut self, iterations: usize) ### Description Advances the simulation by a number of iterations. ### Method tick ### Parameters - **iterations** (usize) - Required - The number of iterations to advance the simulation. ### Returns None ``` -------------------------------- ### pub fn is_finished(&self) -> bool Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Simulation.html Checks if the simulation has finished. ```APIDOC ## pub fn is_finished(&self) -> bool ### Description Checks if the simulation has finished. ### Method is_finished ### Parameters None ### Returns - **bool** - `true` if the simulation has finished, `false` otherwise. ``` -------------------------------- ### SimulationBuilder::build Source: https://docs.rs/fjadra/latest/fjadra/force/struct.SimulationBuilder.html Builds a Simulation from the configured builder and a collection of particles. ```APIDOC ## SimulationBuilder::build ### Description Builds a Simulation from the configured builder and a collection of particles. ### Method build ### Signature pub fn build(&self, particles: impl IntoIterator) -> Simulation where N: Into, ### Parameters - **particles** (impl IntoIterator) - Required - An iterator of particles to include in the simulation. Each item must be convertible into a Node. ### Returns - **Simulation** - The constructed simulation. ``` -------------------------------- ### fn initialize(self, particles: &[Particle]) -> Force Source: https://docs.rs/fjadra/latest/fjadra/force/trait.ForceBuilder.html Initializes a force from the given particles and returns a Force instance. This is the required method of the ForceBuilder trait. ```APIDOC ## Trait: ForceBuilder ### Description Defines a builder for forces in the fjadra simulation library. Implementors provide an `initialize` method that constructs a `Force` from a slice of particles. ### Method `fn initialize(self, particles: &[Particle]) -> Force` ### Parameters - **self** - The builder instance. - **particles** (`&[Particle]`) - A slice of particles used to initialize the force. ### Return Value - **Force** - The initialized force. ### Implementors - `Center` - `Collide` - `Link` - `ManyBody` - `PositionX` - `PositionY` ### Dyn Compatibility This trait is dyn compatible. ``` -------------------------------- ### Collide::new Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Collide.html Creates a new Collide force builder. ```APIDOC ## Collide::new ### Description Creates a new Collide force builder. ### Method new ### Signature pub fn new() -> Self ### Parameters None ### Returns Self - A new Collide instance. ### Example ```rust let collide = Collide::new(); ``` ``` -------------------------------- ### Quadtree::visit_after Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quadtree.html Visits each quad in the quadtree after its children, calling the provided callback. ```APIDOC ## Quadtree::visit_after ### Description Visits each quad in the quadtree after its children, calling the provided callback. ### Method visit_after ### Signature pub fn visit_after(&mut self, callback: F) where F: FnMut(Quad<'_, Q, T>) ### Parameters - **callback** (F) - Required - A closure that receives a Quad. ### Returns None ``` -------------------------------- ### pub fn iter(&mut self) -> SimulationIter<'_> Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Simulation.html Returns an iterator over the simulation. ```APIDOC ## pub fn iter(&mut self) -> SimulationIter<'_> ### Description Returns an iterator over the simulation. ### Method iter ### Parameters None ### Returns - **SimulationIter<'_>** - An iterator over the simulation. ``` -------------------------------- ### Quadtree::visit Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quadtree.html Visits each quad in the quadtree, calling the provided callback. The callback can control traversal by returning a Visit value. ```APIDOC ## Quadtree::visit ### Description Visits each quad in the quadtree, calling the provided callback. The callback can control traversal by returning a Visit value. ### Method visit ### Signature pub fn visit(&mut self, callback: F) where F: FnMut(Quad<'_, Q, T>) -> Visit ### Parameters - **callback** (F) - Required - A closure that receives a Quad and returns a Visit to control traversal. ### Returns None ``` -------------------------------- ### ManyBody::new Source: https://docs.rs/fjadra/latest/fjadra/force/struct.ManyBody.html Creates a new ManyBody force instance. ```APIDOC ## ManyBody::new ### Description Creates a new ManyBody force instance. ### Method new ### Signature pub fn new() -> Self ### Parameters None ### Returns Self - A new ManyBody instance. ``` -------------------------------- ### ForceBuilder for Link Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Link.html Implementation of the ForceBuilder trait for Link, which initializes the force with the given particles. ```APIDOC ## ForceBuilder for Link ### Description Implementation of the `ForceBuilder` trait for `Link`, which initializes the force with the given particles. ### Method `fn initialize(self, _particles: &[Particle]) -> Force` ### Parameters - **self** - The `Link` instance. - **_particles** (&[Particle]) - Required - The particles in the simulation. ### Returns - **Force** - The initialized force. ``` -------------------------------- ### ForceBuilder for PositionX Source: https://docs.rs/fjadra/latest/fjadra/force/struct.PositionX.html Implementation of the ForceBuilder trait for PositionX, allowing it to be used as a force in the simulation. ```APIDOC ## ForceBuilder for PositionX ### Description Implementation of the ForceBuilder trait for PositionX, allowing it to be used as a force in the simulation. ### Method initialize ### Signature fn initialize(self, _: &[Particle]) -> Force ### Parameters - **particles** (&[Particle]) - Required - The particles to initialize the force with. ### Returns - **Force** - The initialized force. ### Example ```rust let force = PositionX::new().initialize(&particles); ``` ``` -------------------------------- ### pub fn forces(&self) -> impl Iterator Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Simulation.html Returns the names of the forces in the simulation. ```APIDOC ## pub fn forces(&self) -> impl Iterator ### Description Returns the names of the forces in the simulation. ### Method forces ### Parameters None ### Returns - **impl Iterator** - An iterator over the names of the forces. ``` -------------------------------- ### Link::new Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Link.html Creates a new Link force with the given links, each specified as a pair of particle indices. ```APIDOC ## Link::new ### Description Creates a new `Link` force with the given links, each specified as a pair of particle indices. ### Method `pub fn new(links: impl IntoIterator) -> Self` ### Parameters - **links** (impl IntoIterator) - Required - An iterator of tuples representing the indices of particles to link. ### Returns - **Self** - A new `Link` instance. ``` -------------------------------- ### Node::position Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Node.html Sets the initial position of the particle. This method takes x and y coordinates as f64 values and returns the updated Node builder. ```APIDOC ## Node::position ### Description Sets the initial position of the particle. ### Method pub fn position(self, x: f64, y: f64) -> Self ### Parameters - **x** (f64) - Required - The x-coordinate of the initial position. - **y** (f64) - Required - The y-coordinate of the initial position. ### Returns - **Self** - The updated Node builder with the position set. ``` -------------------------------- ### Quadtree::with_extent Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quadtree.html Creates a new Quadtree with a specified extent defined by minimum and maximum coordinates. ```APIDOC ## Quadtree::with_extent ### Description Creates a new Quadtree with a specified extent defined by minimum and maximum coordinates. ### Method with_extent ### Signature pub fn with_extent(min: [f64; 2], max: [f64; 2]) -> Self ### Parameters - **min** ([f64; 2]) - Required - The minimum coordinates [x, y]. - **max** ([f64; 2]) - Required - The maximum coordinates [x, y]. ### Returns Quadtree - A new Quadtree with the given extent. ``` -------------------------------- ### Quadtree::cover Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quadtree.html Expands the quadtree extent to cover the given point (x, y). ```APIDOC ## Quadtree::cover ### Description Expands the quadtree extent to cover the given point (x, y). ### Method cover ### Signature pub fn cover(&mut self, x: f64, y: f64) ### Parameters - **x** (f64) - Required - The x-coordinate of the point to cover. - **y** (f64) - Required - The y-coordinate of the point to cover. ### Returns None ``` -------------------------------- ### pub fn positions(&self) -> impl Iterator + '_ Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Simulation.html Returns the positions of the particles in the simulation. The ordering of the nodes is stable, so the order of the positions will be the same as initially supplied. ```APIDOC ## pub fn positions(&self) -> impl Iterator + '_ ### Description Returns the positions of the particles in the simulation. The ordering of the nodes is stable, so the order of the positions will be the same as initially supplied. ### Method positions ### Parameters None ### Returns - **impl Iterator + '_** - An iterator over the positions of the particles, each as a 2D coordinate. ``` -------------------------------- ### Quadtree::add_all Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quadtree.html Adds multiple points with associated values to the quadtree from an iterator. ```APIDOC ## Quadtree::add_all ### Description Adds multiple points with associated values to the quadtree from an iterator. ### Method add_all ### Signature pub fn add_all(&mut self, values: impl IntoIterator) ### Parameters - **values** (impl IntoIterator) - Required - An iterator of tuples (x, y, value) to insert. ### Returns None ``` -------------------------------- ### Quadtree::from_particles Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quadtree.html Constructs a Quadtree from an iterator of particles, each represented as (x, y, value). ```APIDOC ## Quadtree::from_particles ### Description Constructs a Quadtree from an iterator of particles, each represented as (x, y, value). ### Method from_particles ### Signature pub fn from_particles(particles: impl Iterator) -> Self ### Parameters - **particles** (impl Iterator) - Required - An iterator of (x, y, value) tuples. ### Returns Quadtree - A new Quadtree containing the given particles. ``` -------------------------------- ### pub fn set_alpha(&mut self, alpha: f64) Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Simulation.html Sets the alpha value of the simulation. This can be used to restart the simulation. ```APIDOC ## pub fn set_alpha(&mut self, alpha: f64) ### Description Sets the alpha value of the simulation. This can be used to restart the simulation. ### Method set_alpha ### Parameters - **alpha** (f64) - Required - The new alpha value. ### Returns None ``` -------------------------------- ### SimulationBuilder::with_alpha Source: https://docs.rs/fjadra/latest/fjadra/force/struct.SimulationBuilder.html Sets the alpha parameter for the simulation. ```APIDOC ## SimulationBuilder::with_alpha ### Description Sets the alpha parameter for the simulation. ### Method with_alpha ### Signature pub fn with_alpha(self, alpha: f64) -> Self ### Parameters - **alpha** (f64) - Required - The alpha value to set. ### Returns - **Self** - The builder instance with the updated alpha. ``` -------------------------------- ### ForceBuilder for ManyBody Source: https://docs.rs/fjadra/latest/fjadra/force/struct.ManyBody.html Implementation of the ForceBuilder trait for ManyBody, providing the initialize method. ```APIDOC ## ForceBuilder for ManyBody ### Description Implementation of the ForceBuilder trait for ManyBody, providing the initialize method. ### Method initialize ### Signature fn initialize(self, particles: &[Particle]) -> Force ### Parameters - **particles** (&[Particle]) - Required - The particles to initialize the force with. ### Returns Force - The initialized force. ``` -------------------------------- ### Visit::continue_if Source: https://docs.rs/fjadra/latest/fjadra/quadtree/enum.Visit.html Creates a Visit value that continues traversal if the given condition is true, otherwise skips. ```APIDOC ## Visit::continue_if ### Description Creates a Visit value that continues traversal if the given condition is true, otherwise skips. ### Method pub fn continue_if(condition: bool) -> Self ### Parameters - **condition** (bool) - Required - The condition to evaluate. ### Returns - **Self** - Visit::Continue if condition is true, otherwise Visit::Skip. ``` -------------------------------- ### Link::iterations Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Link.html Sets the number of iterations to run the link force per simulation step. ```APIDOC ## Link::iterations ### Description Sets the number of iterations to run the link force per simulation step. ### Method `pub fn iterations(self, iterations: usize) -> Self` ### Parameters - **iterations** (usize) - Required - The number of iterations. ### Returns - **Self** - The `Link` instance with the iteration count set. ``` -------------------------------- ### SimulationBuilder::with_alpha_min Source: https://docs.rs/fjadra/latest/fjadra/force/struct.SimulationBuilder.html Sets the minimum alpha value for the simulation. ```APIDOC ## SimulationBuilder::with_alpha_min ### Description Sets the minimum alpha value for the simulation. ### Method with_alpha_min ### Signature pub fn with_alpha_min(self, alpha_min: f64) -> Self ### Parameters - **alpha_min** (f64) - Required - The minimum alpha value to set. ### Returns - **Self** - The builder instance with the updated alpha_min. ``` -------------------------------- ### Quad::inner Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quad.html Returns an Entry reference to the inner data of the quad. ```APIDOC ## Quad::inner ### Description Returns an Entry reference to the inner data of the quad. ### Method inner ### Signature pub fn inner(&'a self) -> Entry<'a, T, Q> ### Parameters None ### Returns - **Entry<'a, T, Q>** - An Entry reference to the inner data. ``` -------------------------------- ### SimulationBuilder::with_random Source: https://docs.rs/fjadra/latest/fjadra/force/struct.SimulationBuilder.html Sets the random number generator for the simulation. ```APIDOC ## SimulationBuilder::with_random ### Description Sets the random number generator for the simulation. ### Method with_random ### Signature pub fn with_random(self, random: Lcg) -> Self ### Parameters - **random** (Lcg) - Required - The random number generator to use. ### Returns - **Self** - The builder instance with the updated random generator. ``` -------------------------------- ### Quad::value Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quad.html Returns a reference to the value stored in the quad. ```APIDOC ## Quad::value ### Description Returns a reference to the value stored in the quad. ### Method value ### Signature pub fn value(&self) -> &Q ### Parameters None ### Returns - **&Q** - A reference to the value. ``` -------------------------------- ### PositionX::x Source: https://docs.rs/fjadra/latest/fjadra/force/struct.PositionX.html Sets the target x-coordinate for the position force. Particles will be attracted to this x value. ```APIDOC ## PositionX::x ### Description Sets the target x-coordinate for the position force. Particles will be attracted to this x value. ### Method x ### Signature pub fn x(self, x: f64) -> Self ### Parameters - **x** (f64) - Required - The target x-coordinate. ### Returns - **Self** - The updated PositionX builder. ### Example ```rust let force = PositionX::new().x(100.0); ``` ``` -------------------------------- ### pub fn remove_force(&mut self, name: impl AsRef) -> bool Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Simulation.html Removes a force from the simulation. Returns `true` if the force was removed, `false` otherwise. ```APIDOC ## pub fn remove_force(&mut self, name: impl AsRef) -> bool ### Description Removes a force from the simulation. Returns `true` if the force was removed, `false` otherwise. ### Method remove_force ### Parameters - **name** (impl AsRef) - Required - The name of the force to remove. ### Returns - **bool** - `true` if the force was removed, `false` otherwise. ``` -------------------------------- ### Quadtree::insert Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quadtree.html Inserts a point with coordinates (x, y) and an associated value into the quadtree. ```APIDOC ## Quadtree::insert ### Description Inserts a point with coordinates (x, y) and an associated value into the quadtree. ### Method insert ### Signature pub fn insert(&mut self, x: f64, y: f64, value: T) ### Parameters - **x** (f64) - Required - The x-coordinate of the point. - **y** (f64) - Required - The y-coordinate of the point. - **value** (T) - Required - The value to associate with the point. ### Returns None ``` -------------------------------- ### Link::strength Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Link.html Sets the strength function for the link force, which determines the strength of the link constraint. ```APIDOC ## Link::strength ### Description Sets the strength function for the link force, which determines the strength of the link constraint. ### Method `pub fn strength(self, f: impl Into) -> Self` ### Parameters - **f** (impl Into) - Required - The strength function. ### Returns - **Self** - The `Link` instance with the strength function set. ``` -------------------------------- ### SimulationBuilder::with_alpha_decay Source: https://docs.rs/fjadra/latest/fjadra/force/struct.SimulationBuilder.html Sets the alpha decay rate for the simulation. ```APIDOC ## SimulationBuilder::with_alpha_decay ### Description Sets the alpha decay rate for the simulation. ### Method with_alpha_decay ### Signature pub fn with_alpha_decay(self, alpha_decay: f64) -> Self ### Parameters - **alpha_decay** (f64) - Required - The alpha decay rate to set. ### Returns - **Self** - The builder instance with the updated alpha_decay. ``` -------------------------------- ### Quad::extent Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quad.html Returns the extent of the quad. ```APIDOC ## Quad::extent ### Description Returns the extent of the quad. ### Method extent ### Signature pub fn extent(&self) -> Extent ### Parameters None ### Returns - **Extent** - The extent of the quad. ``` -------------------------------- ### SimulationBuilder::with_alpha_target Source: https://docs.rs/fjadra/latest/fjadra/force/struct.SimulationBuilder.html Sets the target alpha value for the simulation. ```APIDOC ## SimulationBuilder::with_alpha_target ### Description Sets the target alpha value for the simulation. ### Method with_alpha_target ### Signature pub fn with_alpha_target(self, alpha_target: f64) -> Self ### Parameters - **alpha_target** (f64) - Required - The target alpha value to set. ### Returns - **Self** - The builder instance with the updated alpha_target. ``` -------------------------------- ### Center::x Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Center.html Sets the x-coordinate for the center force. This method consumes the builder and returns a modified Center. ```APIDOC ## Center::x ### Description Sets the x-coordinate for the center force. ### Method x ### Signature pub fn x(self, x: f64) -> Self ### Parameters - **x** (f64) - Required - The x-coordinate value. ### Returns - **Self** - The modified Center instance. ``` -------------------------------- ### Visit::stop_if Source: https://docs.rs/fjadra/latest/fjadra/quadtree/enum.Visit.html Creates a Visit value that stops traversal if the given condition is true, otherwise continues. ```APIDOC ## Visit::stop_if ### Description Creates a Visit value that stops traversal if the given condition is true, otherwise continues. ### Method pub fn stop_if(condition: bool) -> Self ### Parameters - **condition** (bool) - Required - The condition to evaluate. ### Returns - **Self** - Visit::Skip if condition is true, otherwise Visit::Continue. ``` -------------------------------- ### Quadtree::extent Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quadtree.html Returns the current extent of the quadtree as a pair of [i64; 2] arrays representing minimum and maximum coordinates. ```APIDOC ## Quadtree::extent ### Description Returns the current extent of the quadtree as a pair of [i64; 2] arrays representing minimum and maximum coordinates. ### Method with_extent ### Signature pub fn extent(&self) -> ([i64; 2], [i64; 2]) ### Parameters None ### Returns ([i64; 2], [i64; 2]) - A tuple containing the minimum and maximum coordinates. ``` -------------------------------- ### Quad::value_mut Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quad.html Returns a mutable reference to the value stored in the quad. ```APIDOC ## Quad::value_mut ### Description Returns a mutable reference to the value stored in the quad. ### Method value_mut ### Signature pub fn value_mut(&mut self) -> &mut Q ### Parameters None ### Returns - **&mut Q** - A mutable reference to the value. ``` -------------------------------- ### PositionY::y Source: https://docs.rs/fjadra/latest/fjadra/force/struct.PositionY.html Sets the target Y-coordinate for the position force. ```APIDOC ## y ### Description Sets the target Y-coordinate for the position force. ### Method y ### Signature pub fn y(self, y: f64) -> Self ### Parameters - **y** (f64) - Required - The target Y-coordinate. ### Returns Self - updated builder. ### Example ```rust let force = PositionY::new().y(100.0); ``` ``` -------------------------------- ### Node::fixed_position Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Node.html Sets the initial position of the particle and prevents it from moving. This method takes x and y coordinates as f64 values and returns the updated Node builder. ```APIDOC ## Node::fixed_position ### Description Sets the initial position of the particle and prevents it from moving. ### Method pub fn fixed_position(self, x: f64, y: f64) -> Self ### Parameters - **x** (f64) - Required - The x-coordinate of the fixed position. - **y** (f64) - Required - The y-coordinate of the fixed position. ### Returns - **Self** - The updated Node builder with the fixed position set. ``` -------------------------------- ### Quadtree::insert_default Source: https://docs.rs/fjadra/latest/fjadra/quadtree/struct.Quadtree.html Inserts a point with coordinates (x, y) using the default value for type T. ```APIDOC ## Quadtree::insert_default ### Description Inserts a point with coordinates (x, y) using the default value for type T. ### Method insert_default ### Signature pub fn insert_default(&mut self, x: f64, y: f64) ### Parameters - **x** (f64) - Required - The x-coordinate of the point. - **y** (f64) - Required - The y-coordinate of the point. ### Returns None ``` -------------------------------- ### Extent Struct Definition Source: https://docs.rs/fjadra/latest/fjadra/extent/struct.Extent.html The definition of the Extent struct using the repr(C) attribute for memory layout compatibility. ```rust #[repr(C)] pub struct Extent { pub x0: f64, pub y0: f64, pub x1: f64, pub y1: f64, } ``` -------------------------------- ### Collide::strength Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Collide.html Sets the strength of the collision force. ```APIDOC ## Collide::strength ### Description Sets the strength of the collision force. ### Method strength ### Signature pub fn strength(self, strength: f64) -> Self ### Parameters - **strength** (f64) - Required - The strength value. ### Returns Self - The Collide instance with the strength set. ### Example ```rust let collide = Collide::new().strength(0.5); ``` ``` -------------------------------- ### Center::strength Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Center.html Sets the strength of the center force. This method consumes the builder and returns a modified Center. ```APIDOC ## Center::strength ### Description Sets the strength of the center force. ### Method strength ### Signature pub fn strength(self, strength: f64) -> Self ### Parameters - **strength** (f64) - Required - The strength value. ### Returns - **Self** - The modified Center instance. ``` -------------------------------- ### Entry Enum Definition Source: https://docs.rs/fjadra/latest/fjadra/quadtree/enum.Entry.html The definition of the Entry enum, which distinguishes between Internal nodes with four children and Leaf nodes containing spatial coordinates and data. ```rust pub enum Entry<'a, T, Q> { Internal { children: [Option<&'a Q>; 4], }, Leaf { x: f64, y: f64, data: &'a T, others: Option>, }, } ``` -------------------------------- ### ManyBody::strength Source: https://docs.rs/fjadra/latest/fjadra/force/struct.ManyBody.html Sets the strength of the ManyBody force using a node function. ```APIDOC ## ManyBody::strength ### Description Sets the strength of the ManyBody force using a node function. ### Method strength ### Signature pub fn strength(self, f: impl Into) -> Self ### Parameters - **f** (impl Into) - Required - The strength function for the force. ### Returns Self - The ManyBody instance with the strength set. ``` -------------------------------- ### PositionX::strength Source: https://docs.rs/fjadra/latest/fjadra/force/struct.PositionX.html Sets the strength of the position force. The strength determines how strongly particles are pulled toward the target x-coordinate. ```APIDOC ## PositionX::strength ### Description Sets the strength of the position force. The strength determines how strongly particles are pulled toward the target x-coordinate. ### Method strength ### Signature pub fn strength(self, strength: f64) -> Self ### Parameters - **strength** (f64) - Required - The strength value. ### Returns - **Self** - The updated PositionX builder. ### Example ```rust let force = PositionX::new().strength(0.5); ``` ``` -------------------------------- ### Collide::radius Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Collide.html Sets the radius function for the collision force. ```APIDOC ## Collide::radius ### Description Sets the radius function for the collision force. The function takes a particle index and returns a radius. ### Method radius ### Signature pub fn radius(self, f: F) -> Self where F: Fn(usize) -> f64 + 'static ### Parameters - **f** (Fn(usize) -> f64) - Required - A closure that takes a particle index and returns the radius. ### Returns Self - The Collide instance with the radius function set. ### Example ```rust let collide = Collide::new().radius(|_| 10.0); ``` ``` -------------------------------- ### Collide::iterations Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Collide.html Sets the number of iterations for the collision force. ```APIDOC ## Collide::iterations ### Description Sets the number of iterations for the collision force. ### Method iterations ### Signature pub fn iterations(self, iterations: usize) -> Self ### Parameters - **iterations** (usize) - Required - The number of iterations. ### Returns Self - The Collide instance with the iterations set. ### Example ```rust let collide = Collide::new().iterations(5); ``` ``` -------------------------------- ### Link::distance Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Link.html Sets the distance function for the link force, which determines the desired distance between linked particles. ```APIDOC ## Link::distance ### Description Sets the distance function for the link force, which determines the desired distance between linked particles. ### Method `pub fn distance(self, f: impl Into) -> Self` ### Parameters - **f** (impl Into) - Required - The distance function. ### Returns - **Self** - The `Link` instance with the distance function set. ``` -------------------------------- ### Center::y Source: https://docs.rs/fjadra/latest/fjadra/force/struct.Center.html Sets the y-coordinate for the center force. This method consumes the builder and returns a modified Center. ```APIDOC ## Center::y ### Description Sets the y-coordinate for the center force. ### Method y ### Signature pub fn y(self, y: f64) -> Self ### Parameters - **y** (f64) - Required - The y-coordinate value. ### Returns - **Self** - The modified Center instance. ``` -------------------------------- ### PositionY::strength Source: https://docs.rs/fjadra/latest/fjadra/force/struct.PositionY.html Sets the strength of the PositionY force. The strength determines how strongly the force acts on particles. ```APIDOC ## strength ### Description Sets the strength of the PositionY force. ### Method strength ### Signature pub fn strength(self, strength: f64) -> Self ### Parameters - **strength** (f64) - Required - The strength value. ### Returns Self ### Example ```rust let force = PositionY::new().strength(0.5); ``` ``` -------------------------------- ### SimulationBuilder::with_velocity_decay Source: https://docs.rs/fjadra/latest/fjadra/force/struct.SimulationBuilder.html Sets the velocity decay factor for the simulation. ```APIDOC ## SimulationBuilder::with_velocity_decay ### Description Sets the velocity decay factor for the simulation. ### Method with_velocity_decay ### Signature pub fn with_velocity_decay(self, velocity_decay: f64) -> Self ### Parameters - **velocity_decay** (f64) - Required - The velocity decay factor to set. ### Returns - **Self** - The builder instance with the updated velocity_decay. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.