link_force {particles} | R Documentation |
Attract or repel linked particles
Description
This force works between linked particles and either attracts or repel them from each other depending on the value of the strength and distance parameters. The force is stronger the longer the linked particles are from each other, mimicking the mechanics of a rubber band.
Training parameters
The following parameters defines the training of the force and can be passed
along a call to wield()
-
strength
: The attractive force between the linked particles. The default weighs edges from low-degree particles higher (strength = 1 / (min(degree(from), degree(to)))
). (tidy eval) -
distance
: The desired distance between linked particles. Defaults to30
(tidy eval) -
n_iter
: The number of iteration towards the optimal solution per generation. Higher values leads to faster convergence (measured in number of generations) at the expense of longer computation time per generation. Defaults to1
.
See Also
Other forces:
center_force
,
collision_force
,
field_force
,
manybody_force
,
map_force
,
mean_force
,
random_force
,
reset_force
,
trap_force
,
x_force
,
y_force