diff --git a/Sources/ForceSimulation/forces/CenterForce.swift b/Sources/ForceSimulation/forces/CenterForce.swift index 4353d68..7356669 100644 --- a/Sources/ForceSimulation/forces/CenterForce.swift +++ b/Sources/ForceSimulation/forces/CenterForce.swift @@ -9,7 +9,7 @@ import NDTree /// A force that drives nodes towards the center. /// Center force is relatively fast, the complexity is `O(n)`, /// where `n` is the number of nodes. -/// See [Collide Force - D3](https://d3js.org/d3-force/collide) +/// See [Collide Force - D3](https://d3js.org/d3-force/collide). final public class CenterForce: ForceLike where NodeID: Hashable, V: VectorLike, V.Scalar == Double { public var center: V @@ -40,6 +40,9 @@ where NodeID: Hashable, V: VectorLike, V.Scalar == Double { extension Simulation { /// Create a center force that drives nodes towards the center. + /// Center force is relatively fast, the complexity is `O(n)`, + /// where `n` is the number of nodes. + /// See [Collide Force - D3](https://d3js.org/d3-force/collide). /// - Parameters: /// - center: The center of the force. /// - strength: The strength of the force. diff --git a/Sources/ForceSimulation/forces/CollideForce.swift b/Sources/ForceSimulation/forces/CollideForce.swift index acf429f..4a88281 100644 --- a/Sources/ForceSimulation/forces/CollideForce.swift +++ b/Sources/ForceSimulation/forces/CollideForce.swift @@ -43,7 +43,7 @@ struct MaxRadiusTreeDelegate: NDTreeDelegate where NodeID: Hashable, /// A force that prevents nodes from overlapping. /// This is a very expensive force, the complexity is `O(n log(n))`, /// where `n` is the number of nodes. -/// See [Collide Force - D3](https://d3js.org/d3-force/collide) +/// See [Collide Force - D3](https://d3js.org/d3-force/collide). public final class CollideForce: ForceLike where NodeID: Hashable, V: VectorLike, V.Scalar == Double { @@ -184,7 +184,7 @@ extension Simulation { /// Create a collide force that prevents nodes from overlapping. /// This is a very expensive force, the complexity is `O(n log(n))`, /// where `n` is the number of nodes. - /// See [Collide Force - D3](https://d3js.org/d3-force/collide) + /// See [Collide Force - D3](https://d3js.org/d3-force/collide). /// - Parameters: /// - radius: The radius of the force. /// - strength: The strength of the force. diff --git a/Sources/ForceSimulation/forces/LinkForce.swift b/Sources/ForceSimulation/forces/LinkForce.swift index 70ad1d4..92f2b28 100644 --- a/Sources/ForceSimulation/forces/LinkForce.swift +++ b/Sources/ForceSimulation/forces/LinkForce.swift @@ -13,7 +13,7 @@ enum LinkForceError: Error { /// A force that represents links between nodes. /// The complexity is `O(e)`, where `e` is the number of links. -/// See [Link Force - D3](https://d3js.org/d3-force/link) +/// See [Link Force - D3](https://d3js.org/d3-force/link). final public class LinkForce: ForceLike where NodeID: Hashable, V: VectorLike, V.Scalar == Double { @@ -224,7 +224,7 @@ extension Simulation { /// Create a link force that represents links between nodes. It works like /// there is a spring between each pair of nodes. /// The complexity is `O(e)`, where `e` is the number of links. - /// See [Link Force - D3](https://d3js.org/d3-force/link) + /// See [Link Force - D3](https://d3js.org/d3-force/link). /// - Parameters: /// - links: The links between nodes. /// - stiffness: The stiffness of the spring (or links). diff --git a/Sources/ForceSimulation/forces/ManyBodyForce.swift b/Sources/ForceSimulation/forces/ManyBodyForce.swift index 2af5365..381d830 100644 --- a/Sources/ForceSimulation/forces/ManyBodyForce.swift +++ b/Sources/ForceSimulation/forces/ManyBodyForce.swift @@ -77,7 +77,7 @@ struct MassQuadtreeDelegate: NDTreeDelegate where NodeID: Hashable, V /// A force that simulate the many-body force. /// This is a very expensive force, the complexity is `O(n log(n))`, /// where `n` is the number of nodes. The complexity might degrade to `O(n^2)` if the nodes are too close to each other. -/// See [Manybody Force - D3](https://d3js.org/d3-force/many-body) +/// See [Manybody Force - D3](https://d3js.org/d3-force/many-body). final public class ManyBodyForce: ForceLike where NodeID: Hashable, V: VectorLike, V.Scalar == Double { @@ -312,7 +312,7 @@ extension Simulation { /// This is a very expensive force, the complexity is `O(n log(n))`, /// where `n` is the number of nodes. The complexity might degrade to `O(n^2)` if the nodes are too close to each other. /// The force mimics the gravity force or electrostatic force. - /// See [Manybody Force - D3](https://d3js.org/d3-force/many-body) + /// See [Manybody Force - D3](https://d3js.org/d3-force/many-body). /// - Parameters: /// - strength: The strength of the force. When the strength is positive, the nodes are attracted to each other like gravity force, otherwise, the nodes are repelled like electrostatic force. /// - nodeMass: The mass of the nodes. The mass is used to calculate the force. The default value is 1.0.