simulation.alphaMin()

simulation.alphaMin([min]) If min is specified, sets the minimum alpha to the specified number in the range [0,1] and returns this simulation. If min is not specified, returns the current minimum alpha value, which defaults to 0.001. The simulation’s internal timer stops when the current alpha is less than the minimum alpha. The default alpha decay rate of ~0.0228 corresponds to 300 iterations.

simulation.alphaDecay()

simulation.alphaDecay([decay]) If decay is specified, sets the alpha decay rate to the specified number in the range [0,1] and returns this simulation. If decay is not specified, returns the current alpha decay rate, which defaults to 0.0228… = 1 - pow(0.001, 1 / 300) where 0.001 is the default minimum alpha. The alpha decay rate determines how quickly the current alpha interpolates towards the desired target alpha; since the default target alpha is zero, by default this controls how quickly

simulation.alpha()

simulation.alpha([alpha]) 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.

set.values()

set.values() Returns an array of the string values in this set. The order of the returned values is arbitrary. Can be used as a convenient way of computing the unique values for a set of strings. For example: d3.set(["foo", "bar", "foo", "baz"]).values(); // "foo", "bar", "baz"

set.size()

set.size() Returns the number of values in this set.

set.remove()

set.remove(value) If the set contains the specified value string, removes it and returns true. Otherwise, this method does nothing and returns false.

set.has()

set.has(value) Returns true if and only if this set has an entry for the specified value string.

set.empty()

set.empty() Returns true if and only if this set has zero values.

set.each()

set.each(function) Calls the specified function for each value in this set, passing the value as the first two arguments (for symmetry with map.each), followed by the set itself. Returns undefined. The iteration order is arbitrary.

set.clear()

set.clear() Removes all values from this set.