docs(README.md): Add definition for alpha (#139)
* docs(README.md): Add definition for `alpha` - Alpha didn't have a meaningful definition and assumed people already knew what it was. - Also added link to Simulation-Restart to reference the idea presented there of "reheating" the simulation fix: https://github.com/d3/d3-force/pull/139#issuecomment-655488430 Co-authored-by: Philippe Rivière <fil@rezo.net>
This commit is contained in:
parent
194dba9ed9
commit
051f8d3976
|
|
@ -85,6 +85,8 @@ If the specified array of *nodes* is modified, such as when nodes are added to o
|
|||
|
||||
<a name="simulation_alpha" href="#simulation_alpha">#</a> <i>simulation</i>.<b>alpha</b>([<i>alpha</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L98 "Source")
|
||||
|
||||
*alpha* is roughly analogous to temperature in [simulated annealing](https://en.wikipedia.org/wiki/Simulated_annealing#Overview). It decreases over time as the simulation “cools down”. When *alpha* reaches *alphaMin*, the simulation stops; see [*simulation*.restart](#simulation_restart).
|
||||
|
||||
If *alpha* is specified, sets the current alpha to the specified number in the range [0,1] and returns this simulation. If *alpha* is not specified, returns the current alpha value, which defaults to 1.
|
||||
|
||||
<a name="simulation_alphaMin" href="#simulation_alphaMin">#</a> <i>simulation</i>.<b>alphaMin</b>([<i>min</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L102 "Source")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user