text:
// Type definitions for D3JS d3-force module 1.2
// Project: https://github.com/d3/d3-force/, https://d3js.org/d3-force
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>
//                 Alex Ford <https://github.com/gustavderdrache>
//                 Boris Yankov <https://github.com/borisyankov>
//                 denisname <https://github.com/denisname>
//                 Nathan Bierema <https://github.com/Methuselah96>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

// Last module patch version validated against: 1.2.1

// -----------------------------------------------------------------------
// Force Simulation
// -----------------------------------------------------------------------

/**
 * The base data structure for the datum of a Simulation Node.
 * The optional properties contained in this data structure are internally assigned
 * by the Simulation upon (re-)initialization.
 *
 * When defining a data type to use for node data, it should be an extension of this interface
 * and respect the already "earmarked" properties used by the simulation.
 *
 * IMPORTANT: Prior to initialization, the following properties are optional: index, x, y, vx, and vy.
 * After initialization they will be defined. The optional properties fx and fy are ONLY defined,
 * if the node's position has been fixed.
 */
export interface SimulationNodeDatum {
    /**
     * Node's zero-based index into nodes array. This property is set during the initialization process of a simulation.
     */
    index?: number;
    /**
     * Node's current x-position
     */
    x?: number;
    /**
     * Node's current y-position
     */
    y?: number;
    /**
     * Node's current x-velocity
     */
    vx?: number;
    /**
     * Node's current y-velocity
     */
    vy?: number;
    /**
     * Node's fixed x-position (if position was fixed)
     */
    fx?: number | null;
    /**
     * Node's fixed y-position (if position was fixed)
     */
    fy?: number | null;
}

/**
 * The base data structure for the datum of a Simulation Link, as used by ForceLink.
 * The optional properties contained in this data structure are internally assigned
 * by when initializing with ForceLink.links(...)
 *
 *
 * IMPORTANT: The source and target properties may be internally mutated in type during the
 * ForceLink initialization process (possibly being changed from a node index in the nodes array,
 * or a node id string to the simulation node object which was mapped in using the current
 * ForceLink.id(...) accessor function.)
 */
export interface SimulationLinkDatum<NodeDatum extends SimulationNodeDatum> {
    /**
     * Link's source node.
     * For convenience, a link's source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id.
     * When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object
     * is replaced by an object reference to the corresponding node with the given identifier.
     * After initialization, the source property represents the source node object.
     */
    source: NodeDatum | string | number;
    /**
     * Link's source link
     * For convenience, a link's source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id.
     * When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object
     * is replaced by an object reference to the corresponding node with the given identifier.
     * After initialization, the target property represents the target node object.
     */
    target: NodeDatum | string | number;
    /**
     * The zero-based index into the links array. Internally generated when calling ForceLink.links(...)
     */
    index?: number;
}

/**
 * A Force Simulation
 *
 * The first generic refers to the type of the datum associated with a node in the simulation.
 * The second generic refers to the type of the datum associated with a link in the simulation, if applicable.
 *
 */
export interface Simulation<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum> | undefined> {
    /**
     * Restart the simulation's internal timer and return the simulation.
     * In conjunction with simulation.alphaTarget or simulation.alpha, this method can be used to "reheat" the simulation during interaction,
     * such as when dragging a node, or to resume the simulation after temporarily pausing it with simulation.stop.
     */
    restart(): this;

    /**
     * Stop the simulation's internal timer, if it is running, and return the simulation. If the timer is already stopped, this method does nothing.
     * This method is useful for running the simulation manually; see simulation.tick.
     */
    stop(): this;

    /**
     * Manually steps the simulation by the specified number of *iterations*, and returns the simulation. If *iterations* is not specified, it defaults to 1 (single step).
     *
     * For each iteration, it increments the current alpha by (alphaTarget - alpha) × alphaDecay; then invokes each registered force, passing the new alpha;
     * then decrements each node's velocity by velocity × velocityDecay; lastly increments each node's position by velocity.
     *
     * This method does not dispatch events; events are only dispatched by the internal timer when the simulation is started automatically upon
     * creation or by calling simulation.restart. The natural number of ticks when the simulation is started is
     * ⌈log(alphaMin) / log(1 - alphaDecay)⌉; by default, this is 300.
     */
    tick(iterations?: number): void;

    /**
     * Returns the simulation's array of nodes as specified to the constructor.
     */
    nodes(): NodeDatum[];
    /**
     * Set the simulation's nodes to the specified array of objects, initialize their positions and velocities if necessary,
     * and then re-initialize any bound forces; Returns the simulation.
     *
     * Each node must be an object. The following properties are assigned by the simulation:
     * - index (the node's zero-based index into nodes)
     * - x (the node's current x-position)
     * - y (the node's current y-position)
     * - vx (the node's current x-velocity)
     * - vy (the node's current y-velocity)
     *
     * The position [x,y] and velocity [vx,vy] may be subsequently modified by forces and by the simulation.
     * If either vx or vy is NaN, the velocity is initialized to [0,0]. If either x or y is NaN, the position is initialized in a phyllotaxis arrangement,
     * so chosen to ensure a deterministic, uniform distribution around the origin.
     *
     * To fix a node in a given position, you may specify two additional properties:
     * - fx (the node's fixed x-position)
     * - fy (the node's fixed y-position)
     *
     * At the end of each tick, after the application of any forces, a node with a defined node.fx has node.x reset to this value and node.vx set to zero;
     * likewise, a node with a defined node.fy has node.y reset to this value and node.vy set to zero.
     * To unfix a node that was previously fixed, set node.fx and node.fy to null, or delete these properties.
     *
     * If the specified array of nodes is modified, such as when nodes are added to or removed from the simulation,
     * this method must be called again with the new (or changed) array to notify the simulation and bound forces of the change;
     * the simulation does not make a defensive copy of the specified array.
     */
    nodes(nodesData: NodeDatum[]): this;

    /**
     * Return the current alpha of the simulation, which defaults to 1.
     */
    alpha(): number;
    /**
     * Set the current alpha to the specified number in the range [0,1] and return this simulation.
     * The default is 1.
     *
     * @param alpha Current alpha of simulation.
     */
    alpha(alpha: number): this;

    /**
     * Return the current minimum alpha value, which defaults to 0.001.
     */
    alphaMin(): number;
    /**
     * Set the minimum alpha to the specified number in the range [0,1] and return this simulation.
     * The default is 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.
     *
     * @param min Minimum alpha of simulation.
     */
    alphaMin(min: number): this;

    /**
     * Return the current alpha decay rate, which defaults to 0.0228… = 1 - pow(0.001, 1 / 300) where 0.001 is the default minimum alpha.
     */
    alphaDecay(): number;
    /**
     * Set the alpha decay rate to the specified number in the range [0,1] and return this simulation.
     * The default is 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 the simulation cools.
     * Higher decay rates cause the simulation to stabilize more quickly, but risk getting stuck in a local minimum;
     * lower values cause the simulation to take longer to run, but typically converge on a better layout.
     * To have the simulation run forever at the current alpha, set the decay rate to zero;
     * alternatively, set a target alpha greater than the minimum alpha.
     *
     * @param decay Alpha decay rate.
     */
    alphaDecay(decay: number): this;

    /**
     * Returns the current target alpha value, which defaults to 0.
     */
    alphaTarget(): number;
    /**
     * Set the current target alpha to the specified number in the range [0,1] and return this simulation.
     * The default is 0.
     *
     * @param target Alpha target value.
     */
    alphaTarget(target: number): this;

    /**
     * Return the current target alpha value, which defaults to 0.4.
     */
    velocityDecay(): number;
    /**
     * Set the velocity decay factor to the specified number in the range [0,1] and return this simulation.
     * The default is 0.4.
     *
     * The decay factor is akin to atmospheric friction; after the application of any forces during a tick,
     * each node's velocity is multiplied by 1 - decay. As with lowering the alpha decay rate,
     * less velocity decay may converge on a better solution, but risks numerical instabilities and oscillation.
     *
     * @param decay Velocity Decay.
     */
    velocityDecay(decay: number): this;

    /**
     * Return the force with the specified name, or undefined if there is no such force.
     * (By default, new simulations have no forces.)
     *
     * Given that it is in general not known, what type of force has been registered under
     * a specified name, use the generic to cast the result to the appropriate type, if known.
     *
     * @param name Name of the registered force.
     */
    force<F extends Force<NodeDatum, LinkDatum>>(name: string): F| undefined;
    /**
     * Remove a previously registered force.
     *
     * @param name Name of the registered force.
     * @param force Use null to remove force.
     */
    force(name: string, force: null): this;
    /**
     * Assign the force for the specified name and return this simulation.
     * (By default, new simulations have no forces.)
     *
     * @param name Name to register the force under.
     * @param force A force to use with the simulation.
     */
    force(name: string, force: Force<NodeDatum, LinkDatum>): this;

    /**
     * Return the node closest to the position [x,y] with the given search radius.
     * If radius is not specified, it defaults to infinity.
     * If there is no node within the search area, returns undefined.
     *
     * @param x x-coordinate
     * @param y y-coordinate
     * @param radius Optional search radius. Defaults to infinity.
     */
    find(x: number, y: number, radius?: number): NodeDatum | undefined;

    /**
     * Return the first currently-assigned listener matching the specified typenames, if any.
     *
     * @param typenames The typenames is a string containing one or more typename separated by whitespace. Each typename is a type,
     * optionally followed by a period (.) and a name, such as "tick.foo" and "tick.bar"; the name allows multiple listeners to be registered for the same type.
     * The type must be one of the following: "tick" (after each tick of the simulation's internal timer) or
     * "end" (after the simulation's timer stops when alpha < alphaMin).
     */
    on(typenames: 'tick' | 'end' | string): ((this: Simulation<NodeDatum, LinkDatum>) => void) | undefined;
    /**
     * Remove the current event listeners for the specified typenames, if any, return the simulation.
     *
     * @param typenames The typenames is a string containing one or more typename separated by whitespace. Each typename is a type,
     * optionally followed by a period (.) and a name, such as "tick.foo" and "tick.bar"; the name allows multiple listeners to be registered for the same type.
     * The type must be one of the following: "tick" (after each tick of the simulation's internal timer) or
     * "end" (after the simulation's timer stops when alpha < alphaMin).
     * @param listener Use null to remove the listener.
     */
    on(typenames: 'tick' | 'end' | string, listener: null): this;
    /**
     * Set the event listener for the specified typenames and return this simulation.
     * If an event listener was already registered for the same type and name,
     * the existing listener is removed before the new listener is added.
     * When a specified event is dispatched, each listener will be invoked with the this context as the simulation.
     *
     * The type must be one of the following:
     * - tick [after each tick of the simulation's internal timer]
     * - end [after the simulation's timer stops when alpha < alphaMin]
     *
     * Note that tick events are not dispatched when simulation.tick is called manually;
     * events are only dispatched by the internal timer and are intended for interactive rendering of the simulation.
     * To affect the simulation, register forces instead of modifying nodes' positions or velocities inside a tick event listener.
     *
     * @param typenames The typenames is a string containing one or more typename separated by whitespace. Each typename is a type,
     * optionally followed by a period (.) and a name, such as "tick.foo" and "tick.bar"; the name allows multiple listeners to be registered for the same type.
     * The type must be one of the following: "tick" (after each tick of the simulation's internal timer) or
     * "end" (after the simulation's timer stops when alpha < alphaMin).
     * @param listener An event listener function which is invoked with the this context of the simulation.
     */
    on(typenames: 'tick' | 'end' | string, listener: (this: this) => void): this;
}

/**
 * Create a new simulation with the specified array of nodes and no forces.
 * If nodes is not specified, it defaults to the empty array.
 * The simulator starts automatically; use simulation.on to listen for tick events as the simulation runs.
 * If you wish to run the simulation manually instead, call simulation.stop, and then call simulation.tick as desired.
 *
 * Use this signature, when creating a simulation WITHOUT link force(s).
 *
 * The generic refers to the type of the data for a node.
 *
 * @param nodesData Optional array of nodes data, defaults to empty array.
 */
export function forceSimulation<NodeDatum extends SimulationNodeDatum>(nodesData?: NodeDatum[]): Simulation<NodeDatum, undefined>;
/**
 * Create a new simulation with the specified array of nodes and no forces.
 * If nodes is not specified, it defaults to the empty array.
 * The simulator starts automatically; use simulation.on to listen for tick events as the simulation runs.
 * If you wish to run the simulation manually instead, call simulation.stop, and then call simulation.tick as desired.
 *
 * Use this signature, when creating a simulation WITH link force(s).
 *
 * The first generic refers to the type of data for a node.
 * The second generic refers to the type of data for a link.
 *
 * @param nodesData Optional array of nodes data, defaults to empty array.
 */
export function forceSimulation<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum>>(nodesData?: NodeDatum[]): Simulation<NodeDatum, LinkDatum>;

// ----------------------------------------------------------------------
// Forces
// ----------------------------------------------------------------------

/**
 * A force is simply a function that modifies nodes' positions or velocities; in this context, a force can apply a classical physical force such as electrical charge or gravity,
 * or it can resolve a geometric constraint, such as keeping nodes within a bounding box or keeping linked nodes a fixed distance apart.
 *
 * Forces typically read the node's current position [x,y] and then add to (or subtract from) the node's velocity [vx,vy].
 * However, forces may also "peek ahead" to the anticipated next position of the node, [x + vx,y + vy]; this is necessary for resolving geometric constraints through iterative relaxation.
 * Forces may also modify the position directly, which is sometimes useful to avoid adding energy to the simulation, such as when recentering the simulation in the viewport.
 *
 * Forces may optionally implement force.initialize to receive the simulation's array of nodes.
 */
export interface Force<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum> | undefined> {
    /**
     * Apply this force, optionally observing the specified alpha.
     * Typically, the force is applied to the array of nodes previously passed to force.initialize,
     * however, some forces may apply to a subset of nodes, or behave differently.
     * For example, d3.forceLink applies to the source and target of each link.
     */
    (alpha: number): void;
    /**
     * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force
     * and when the simulation's nodes change via simulation.nodes.
     *
     * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
     */
    initialize?(nodes: NodeDatum[]): void;
}

// Centering ------------------------------------------------------------

/**
 * The centering force translates nodes uniformly so that the mean position of all nodes
 * (the center of mass if all nodes have equal weight) is at the given position [x,y].
 * This force modifies the positions of nodes on each application; it does not modify velocities,
 * as doing so would typically cause the nodes to overshoot and oscillate around the desired center.
 * This force helps keeps nodes in the center of the viewport, and unlike the positioning force,
 * it does not distort their relative positions.
 *
 * The generic refers to the type of data for a node.
 */
export interface ForceCenter<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
    /**
     * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force
     * and when the simulation's nodes change via simulation.nodes.
     *
     * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
     */
    initialize(nodes: NodeDatum[]): void;

    /**
     * Return the current x-coordinate of the centering position, which defaults to zero.
     */
    x(): number;
    /**
     * Set the x-coordinate of the centering position.
     *
     * @param x x-coordinate.
     */
    x(x: number): this;

    /**
     * Return the current y-coordinate of the centering position, which defaults to zero.
     */
    y(): number;
    /**
     * Set the y-coordinate of the centering position.
     *
     * @param y y-coordinate.
     */
    y(y: number): this;
}

/**
 * Create a new centering force with the specified x- and y- coordinates.
 * If x and y are not specified, they default to [0,0].
 *
 * The centering force translates nodes uniformly so that the mean position of all nodes
 * (the center of mass if all nodes have equal weight) is at the given position [x,y].
 * This force modifies the positions of nodes on each application; it does not modify velocities,
 * as doing so would typically cause the nodes to overshoot and oscillate around the desired center.
 * This force helps keeps nodes in the center of the viewport, and unlike the positioning force,
 * it does not distort their relative positions.
 *
 * The generic refers to the type of data for a node.
 *
 * @param x An optional x-coordinate for the centering position, defaults to 0.
 * @param y An optional y-coordinate for the centering position, defaults to 0.
 */
export function forceCenter<NodeDatum extends SimulationNodeDatum>(x?: number, y?: number): ForceCenter<NodeDatum>;

// Collision ------------------------------------------------------------

/**
 * The collision force treats nodes as circles with a given radius, rather than points, and prevents nodes from overlapping.
 * More formally, two nodes a and b are separated so that the distance between a and b is at least radius(a) + radius(b).
 * To reduce jitter, this is by default a "soft" constraint with a configurable strength and iteration count.
 *
 * The generic refers to the type of data for a node.
 */
export interface ForceCollide<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
    /**
     * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force
     * and when the simulation's nodes change via simulation.nodes.
     *
     * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
     */
    initialize(nodes: NodeDatum[]): void;

    /**
     * Returns the current radius accessor function.
     */
    radius(): (node: NodeDatum, i: number, nodes: NodeDatum[]) => number;
    /**
     * Set the radius used in collision detection to a constant number for each node.
     *
     * The constant is internally wrapped into a radius accessor function.
     *
     * The radius accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the radius of each node is only recomputed
     * when the force is initialized or when this method is called with a new radius, and not on every application of the force.
     *
     * @param radius A constant radius for each node.
     */
    radius(radius: number): this;
    /**
     * Set the radius accessor function determining the radius for each node in collision detection.
     *
     * The radius accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the radius of each node is only recomputed
     * when the force is initialized or when this method is called with a new radius, and not on every application of the force.
     *
     * @param radius A radius accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The function returns a radius.
     */
    radius(radius: (node: NodeDatum, i: number, nodes: NodeDatum[]) => number): this;

    /**
     * Return the current strength, which defaults to 0.7.
     */
    strength(): number;
    /**
     * Set the force strength to the specified number in the range [0,1] and return this force.
     * The default strength is 0.7.
     *
     * Overlapping nodes are resolved through iterative relaxation.
     * For each node, the other nodes that are anticipated to overlap at the next tick (using the anticipated positions [x + vx,y + vy]) are determined;
     * the node's velocity is then modified to push the node out of each overlapping node.
     * The change in velocity is dampened by the force's strength such that the resolution of simultaneous overlaps can be blended together to find a stable solution.
     *
     * @param strength Strength.
     */
    strength(strength: number): this;

    /**
     * Return the current iteration count which defaults to 1.
     */
    iterations(): number;
    /**
     * Sets the number of iterations per application to the specified number and return this force.
     *
     * Increasing the number of iterations greatly increases the rigidity of the constraint and avoids partial overlap of nodes,
     * but also increases the runtime cost to evaluate the force.
     *
     * @param iterations Number of iterations.
     */
    iterations(iterations: number): this;
}

/**
 * Creates a new circle collision force with the default radius one for all nodes.
 *
 * The collision force treats nodes as circles with a given radius, rather than points, and prevents nodes from overlapping.
 * More formally, two nodes a and b are separated so that the distance between a and b is at least radius(a) + radius(b).
 * To reduce jitter, this is by default a "soft" constraint with a configurable strength and iteration count.
 *
 * The generic refers to the type of data for a node.
 */
export function forceCollide<NodeDatum extends SimulationNodeDatum>(): ForceCollide<NodeDatum>;
/**
 * Create a new circle collision force with the specified constant radius for all nodes.
 *
 * The collision force treats nodes as circles with a given radius, rather than points, and prevents nodes from overlapping.
 * More formally, two nodes a and b are separated so that the distance between a and b is at least radius(a) + radius(b).
 * To reduce jitter, this is by default a "soft" constraint with a configurable strength and iteration count.
 *
 * The generic refers to the type of data for a node.
 *
 * @param radius A constant radius for each node.
 */
export function forceCollide<NodeDatum extends SimulationNodeDatum>(radius: number): ForceCollide<NodeDatum>;
/**
 * Creates a new circle collision force with the specified radius accessor function.
 *
 * The collision force treats nodes as circles with a given radius, rather than points, and prevents nodes from overlapping.
 * More formally, two nodes a and b are separated so that the distance between a and b is at least radius(a) + radius(b).
 * To reduce jitter, this is by default a "soft" constraint with a configurable strength and iteration count.
 *
 * The radius accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
 * The resulting number is then stored internally, such that the radius of each node is only recomputed
 * when the force is initialized or when this method is called with a new radius, and not on every application of the force.
 *
 * @param radius A radius accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
 * The function returns a radius.
 */
export function forceCollide<NodeDatum extends SimulationNodeDatum>(radius: (node: NodeDatum, i: number, nodes: NodeDatum[]) => number): ForceCollide<NodeDatum>;

// Link ----------------------------------------------------------------

/**
 * The link force pushes linked nodes together or apart according to the desired link distance.
 * The strength of the force is proportional to the difference between the linked nodes' distance and the target distance, similar to a spring force.
 *
 * The first generic refers to the type of data for a node.
 * The second generic refers to the type of data for a link.
 */
export interface ForceLink<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum>> extends Force<NodeDatum, LinkDatum> {
    /**
     * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force
     * and when the simulation's nodes change via simulation.nodes.
     *
     * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
     */
    initialize(nodes: NodeDatum[]): void;

    /**
     * Return the current array of links, which defaults to the empty array.
     *
     */
    links(): LinkDatum[];
    /**
     * Set the array of links associated with this force, recompute the distance and strength parameters for each link, and return this force.
     *
     * Each link is an object with the following properties:
     * * source - the link's source node; see simulation.nodes
     * * target - the link's target node; see simulation.nodes
     * * index - the zero-based index into links, assigned by this method
     *
     * For convenience, a link's source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id.
     * When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object
     * is replaced by an object reference to the corresponding node with the given identifier.
     * If the specified array of links is modified, such as when links are added to or removed from the simulation,
     * this method must be called again with the new (or changed) array to notify the force of the change;
     * the force does not make a defensive copy of the specified array.
     *
     * @param links An array of link data.
     */
    links(links: LinkDatum[]): this;

    /**
     * Return the current node id accessor, which defaults to the numeric node.index.
     */
    id(): (node: NodeDatum, i: number, nodesData: NodeDatum[]) => (string | number);
    /**
     * Set the node id accessor to the specified function and return this force.
     *
     * The default id accessor allows each link's source and target to be specified as a zero-based index
     * into the nodes array.
     *
     * The id accessor is invoked for each node whenever the force is initialized,
     * as when the nodes or links change, being passed the node, the zero-based index of the node in the node array, and the node array.
     *
     * @param id A node id accessor function which is invoked for each node in the simulation,
     * being passed the node, the zero-based index of the node in the node array, and the node array. It returns a string to represent the node id which can be used
     * for matching link source and link target strings during the ForceLink initialization.
     */
    id(id: (node: NodeDatum, i: number, nodesData: NodeDatum[]) => string): this;

    /**
     * Return the current distance accessor, which defaults to implying a default distance of 30.
     */
    distance(): (link: LinkDatum, i: number, links: LinkDatum[]) => number;
    /**
     * Set the distance accessor to use the specified constant number for all links,
     * re-evaluates the distance accessor for each link, and returns this force.
     *
     * The constant is internally wrapped into a distance accessor function.
     *
     * The distance accessor is invoked for each link, being passed the link, its zero-based index and the complete array of links.
     * The resulting number is then stored internally, such that the distance of each link is only recomputed when the force is initialized or
     * when this method is called with a new distance, and not on every application of the force.
     *
     * @param distance The constant distance to be used for all links.
     */
    distance(distance: number): this;
    /**
     * Set the distance accessor to use the specified function,
     * re-evaluates the distance accessor for each link, and returns this force.
     *
     * The distance accessor is invoked for each link, being passed the link, its zero-based index and the complete array of links.
     * The resulting number is then stored internally, such that the distance of each link is only recomputed when the force is initialized or
     * when this method is called with a new distance, and not on every application of the force.
     *
     * @param distance A distance accessor function which is invoked for each link being passed the link,
     * its zero-based index and the complete array of links. It returns the distance.
     */
    distance(distance: (link: LinkDatum, i: number, links: LinkDatum[]) => number): this;

    /**
     * Return the current strength accessor.
     * For details regarding the default behavior see: {@link https://github.com/d3/d3-force#link_strength}
     */
    strength(): (link: LinkDatum, i: number, links: LinkDatum[]) => number;
    /**
     * Set the strength accessor to use the specified constant number for all links,
     * re-evaluates the strength accessor for each link, and returns this force.
     *
     * The constant is internally wrapped into a strength accessor function.
     *
     * The strength accessor is invoked for each link, being passed the link, its zero-based index and the complete array of links.
     * The resulting number is then stored internally, such that the strength of each link is only recomputed
     * when the force is initialized or when this method is called with a new strength, and not on every application of the force.
     *
     * @param strength The constant strength to be used for all links.
     */
    strength(strength: number): this;
    /**
     * Set the strength accessor to use the specified function,
     * re-evaluates the strength accessor for each link, and returns this force.
     *
     * The strength accessor is invoked for each link, being passed the link, its zero-based index and the complete array of links.
     * The resulting number is then stored internally, such that the strength of each link is only recomputed
     * when the force is initialized or when this method is called with a new strength, and not on every application of the force.
     *
     * @param strength A distance accessor function which is invoked for each link being passed the link,
     * its zero-based index and the complete array of links. It returns the strength.
     */
    strength(strength: (link: LinkDatum, i: number, links: LinkDatum[]) => number): this;

    /**
     * Return the current iteration count which defaults to 1.
     */
    iterations(): number;
    /**
     * Sets the number of iterations per application to the specified number and return this force.
     *
     * Increasing the number of iterations greatly increases the rigidity of the constraint and is useful for complex structures such as lattices,
     * but also increases the runtime cost to evaluate the force.
     *
     * @param iterations Number of iterations.
     */
    iterations(iterations: number): this;
}

/**
 * Creates a new link force with the defaulting links to an empty array.
 *
 * The link force pushes linked nodes together or apart according to the desired link distance.
 * The strength of the force is proportional to the difference between the linked nodes' distance and the target distance, similar to a spring force.
 *
 * The first generic refers to the type of data for a node.
 * The second generic refers to the type of data for a link.
 */
export function forceLink<NodeDatum extends SimulationNodeDatum, LinksDatum extends SimulationLinkDatum<NodeDatum>>(): ForceLink<NodeDatum, LinksDatum>;
/**
 * Creates a new link force with the specified links array.
 *
 * The link force pushes linked nodes together or apart according to the desired link distance.
 * The strength of the force is proportional to the difference between the linked nodes' distance and the target distance, similar to a spring force.
 *
 * The first generic refers to the type of data for a node.
 * The second generic refers to the type of data for a link.
 *
 * @param links An array of link data.
 */
export function forceLink<NodeDatum extends SimulationNodeDatum, LinksDatum extends SimulationLinkDatum<NodeDatum>>(links: LinksDatum[]): ForceLink<NodeDatum, LinksDatum>;

// Many Body ----------------------------------------------------------------

/**
 * The many-body (or n-body) force applies mutually amongst all nodes. It can be used to simulate gravity (attraction) if the strength is positive,
 * or electrostatic charge (repulsion) if the strength is negative. This implementation uses quadtrees and the Barnes–Hut approximation to greatly
 * improve performance; the accuracy can be customized using the theta parameter.
 *
 * Unlike links, which only affect two linked nodes, the charge force is global: every node affects every other node, even if they are on disconnected subgraphs.
 *
 * The generic refers to the type of data for a node.
 */
export interface ForceManyBody<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
    /**
     * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force
     * and when the simulation's nodes change via simulation.nodes.
     *
     * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
     */
    initialize(nodes: NodeDatum[]): void;

    /**
     * Return the current strength accessor.
     *
     * For details regarding the default behavior see: {@link https://github.com/d3/d3-force#manyBody_strength}
     */
    strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
    /**
     * Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and
     * returns this force.
     *
     * A positive value causes nodes to attract each other, similar to gravity, while a negative value causes nodes to repel each other,
     * similar to electrostatic charge.
     *
     * The default represents a constant value of -30.
     *
     * The constant is internally wrapped into a strength accessor function.
     *
     * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or
     * when this method is called with a new strength, and not on every application of the force.
     *
     * @param strength The constant strength to be used for all nodes.
     */
    strength(strength: number): this;
    /**
     * Set the strength accessor to the specified function, re-evaluates the strength accessor for each node, and
     * returns this force.
     *
     * A positive value causes nodes to attract each other, similar to gravity, while a negative value causes nodes to repel each other,
     * similar to electrostatic charge.
     *
     * The default represents a constant value of -30.
     *
     * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or
     * when this method is called with a new strength, and not on every application of the force.
     *
     * @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The function returns the strength.
     */
    strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;

    /**
     * Return the current value of the Barnes–Hut approximation criterion , which defaults to 0.9
     */
    theta(): number;
    /**
     * Set the Barnes–Hut approximation criterion to the specified number and returns this force.
     *
     * To accelerate computation, this force implements the Barnes–Hut approximation which takes O(n log n) per application
     * where n is the number of nodes. For each application, a quadtree stores the current node positions;
     * then for each node, the combined force of all other nodes on the given node is computed.
     * For a cluster of nodes that is far away, the charge force can be approximated by treating the cluster as a single, larger node.
     * The theta parameter determines the accuracy of the approximation:
     * if the ratio w / l of the width w of the quadtree cell to the distance l from the node to the cell's center of mass is less than theta,
     * all nodes in the given cell are treated as a single node rather than individually.
     *
     * The default value is 0.9.
     *
     * @param theta Value for the theta parameter.
     */
    theta(theta: number): this;

    /**
     * Returns the current minimum distance over which this force is considered, which defaults to 1.
     */
    distanceMin(): number;
    /**
     * Sets the minimum distance between nodes over which this force is considered.
     *
     * A minimum distance establishes an upper bound on the strength of the force between two nearby nodes, avoiding instability.
     * In particular, it avoids an infinitely-strong force if two nodes are exactly coincident; in this case, the direction of the force is random.
     *
     * The default value is 1.
     *
     * @param distance The minimum distance between nodes over which this force is considered.
     */
    distanceMin(distance: number): this;

    /**
     * Returns the current maximum distance over which this force is considered, which defaults to infinity.
     */
    distanceMax(): number;
    /**
     * Sets the maximum distance between nodes over which this force is considered.
     *
     * Specifying a finite maximum distance improves performance and produces a more localized layout.
     *
     * The default value is infinity.
     *
     * @param distance The maximum distance between nodes over which this force is considered.
     */
    distanceMax(distance: number): this;
}

/**
 * Creates a new many-body force with the default parameters.
 *
 * The many-body (or n-body) force applies mutually amongst all nodes. It can be used to simulate gravity (attraction) if the strength is positive,
 * or electrostatic charge (repulsion) if the strength is negative. This implementation uses quadtrees and the Barnes–Hut approximation to greatly
 * improve performance; the accuracy can be customized using the theta parameter.
 *
 * Unlike links, which only affect two linked nodes, the charge force is global: every node affects every other node, even if they are on disconnected subgraphs.
 *
 * The generic refers to the type of data for a node.
 */
export function forceManyBody<NodeDatum extends SimulationNodeDatum>(): ForceManyBody<NodeDatum>;

// Positioning ----------------------------------------------------------------

/**
 * The x-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
 * The strength of the force is proportional to the one-dimensional distance between the node's position and the target position.
 * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
 *
 * The generic refers to the type of data for a node.
 */
export interface ForceX<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
    /**
     * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force
     * and when the simulation's nodes change via simulation.nodes.
     *
     * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
     */
    initialize(nodes: NodeDatum[]): void;

    /**
     *  Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1.
     */
    strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
    /**
     * Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and returns this force.
     *
     * The strength determines how much to increment the node's x-velocity: (x - node.x) × strength.
     *
     * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current x-position to the target x-position with each application.
     * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints.
     *
     * A value outside the range [0,1] is not recommended.
     *
     * The constant is internally wrapped into a strength accessor function.
     *
     * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or
     * when this method is called with a new strength, and not on every application of the force.
     *
     * @param strength Constant value of strength to be used for all nodes.
     */
    strength(strength: number): this;
    /**
     * Set the strength accessor to the specified function, re-evaluates the strength accessor for each node, and returns this force.
     *
     * The strength determines how much to increment the node's x-velocity: (x - node.x) × strength.
     *
     * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current x-position to the target x-position with each application.
     * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints.
     *
     * A value outside the range [0,1] is not recommended.
     *
     * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or
     * when this method is called with a new strength, and not on every application of the force.
     *
     * @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The function returns the strength.
     */
    strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;

    /**
     * Return the current x-accessor, which defaults to a function returning 0 for all nodes.
     */
    x(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
    /**
     * Set the x-coordinate accessor to the specified number, re-evaluates the x-accessor for each node,
     * and returns this force.
     *
     * The constant is internally wrapped into an x-coordinate accessor function.
     *
     * The x-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the target x-coordinate of each node is only recomputed when the force is initialized or
     * when this method is called with a new x, and not on every application of the force.
     *
     * @param x Constant x-coordinate to be used for all nodes.
     */
    x(x: number): this;
    /**
     * Set the x-coordinate accessor to the specified function, re-evaluates the x-accessor for each node,
     * and returns this force.
     *
     * The x-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the target x-coordinate of each node is only recomputed when the force is initialized or
     * when this method is called with a new x, and not on every application of the force.
     *
     * @param x A x-coordinate accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The function returns the x-coordinate.
     */
    x(x: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;
}

/**
 * Create a new positioning force along the x-axis towards the given position x which is defaulted to a constant 0 for all nodes.
 *
 * The x-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
 * The strength of the force is proportional to the one-dimensional distance between the node's position and the target position.
 * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
 *
 * The generic refers to the type of data for a node.
 */
export function forceX<NodeDatum extends SimulationNodeDatum>(): ForceX<NodeDatum>;
/**
 * Create a new positioning force along the x-axis towards the given position x which is constant for all nodes.
 *
 * The x-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
 * The strength of the force is proportional to the one-dimensional distance between the node's position and the target position.
 * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
 *
 * The generic refers to the type of data for a node.
 *
 * @param x Constant x-coordinate to be used for all nodes.
 */
export function forceX<NodeDatum extends SimulationNodeDatum>(x: number): ForceX<NodeDatum>;
/**
 * Create a new positioning force along the x-axis towards the position x given by evaluating the specified x-coordinate accessor
 * for each node.
 *
 * The x-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
 * The strength of the force is proportional to the one-dimensional distance between the node's position and the target position.
 * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
 *
 * The generic refers to the type of data for a node.
 *
 * @param x A x-coordinate accessor function which is invoked for each node in the simulation, being passed the node and its zero-based index.
 * The function returns the x-coordinate.
 */
export function forceX<NodeDatum extends SimulationNodeDatum>(x: (d: NodeDatum, i: number, data: NodeDatum[]) => number): ForceX<NodeDatum>;

/**
 * The y-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
 * The strength of the force is proportional to the one-dimensional distance between the node's position and the target position.
 * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
 *
 * The generic refers to the type of data for a node.
 */
export interface ForceY<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
    /**
     * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force
     * and when the simulation's nodes change via simulation.nodes.
     *
     * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
     */
    initialize(nodes: NodeDatum[]): void;

    /**
     *  Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1.
     */
    strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
    /**
     * Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and returns this force.
     *
     * The strength determines how much to increment the node's y-velocity: (y - node.y) × strength.
     *
     * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current y-position to the target y-position with each application.
     * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints.
     *
     * A value outside the range [0,1] is not recommended.
     *
     * The constant is internally wrapped into a strength accessor function.
     *
     * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or
     * when this method is called with a new strength, and not on every application of the force.
     *
     * @param strength Constant value of strength to be used for all nodes.
     */
    strength(strength: number): this;
    /**
     * Set the strength accessor to the specified function, re-evaluates the strength accessor for each node, and returns this force.
     *
     * The strength determines how much to increment the node's y-velocity: (y - node.y) × strength.
     *
     * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current y-position to the target y-position with each application.
     * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints.
     *
     * A value outside the range [0,1] is not recommended.
     *
     * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or
     * when this method is called with a new strength, and not on every application of the force.
     *
     * @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The function returns the strength.
     */
    strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;

    /**
     * Return the current y-accessor, which defaults to a function returning 0 for all nodes.
     */
    y(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
    /**
     * Set the y-coordinate accessor to the specified number, re-evaluates the y-accessor for each node,
     * and returns this force.
     *
     * The constant is internally wrapped into a y-coordinate accessor function.
     *
     * The y-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the target y-coordinate of each node is only recomputed when the force is initialized or
     * when this method is called with a new y, and not on every application of the force.
     *
     * @param y Constant y-coordinate to be used for all nodes.
     */
    y(y: number): this;
    /**
     * Set the y-coordinate accessor to the specified function, re-evaluates the y-accessor for each node,
     * and returns this force.
     *
     * The y-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the target y-coordinate of each node is only recomputed when the force is initialized or
     * when this method is called with a new y, and not on every application of the force.
     *
     * @param y A y-coordinate accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The function returns the y-coordinate.
     */
    y(y: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;
}

/**
 * Create a new positioning force along the y-axis towards the given position y which is defaulted to a constant 0 for all nodes.
 *
 * The y-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
 * The strength of the force is proportional to the one-dimensional distance between the node's position and the target position.
 * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
 *
 * The generic refers to the type of data for a node.
 */
export function forceY<NodeDatum extends SimulationNodeDatum>(): ForceY<NodeDatum>;
/**
 * Create a new positioning force along the y-axis towards the given position y which is constant for all nodes.
 *
 * The y-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
 * The strength of the force is proportional to the one-dimensional distance between the node's position and the target position.
 * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
 *
 * The generic refers to the type of data for a node.
 *
 * @param y Constant y-coordinate to be used for all nodes.
 */
export function forceY<NodeDatum extends SimulationNodeDatum>(y: number): ForceY<NodeDatum>;
/**
 * Create a new positioning force along the y-axis towards the position y given by evaluating the specified y-coordinate accessor
 * for each node.
 *
 * The y-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
 * The strength of the force is proportional to the one-dimensional distance between the node's position and the target position.
 * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
 *
 * The generic refers to the type of data for a node.
 *
 * @param y A y-coordinate accessor function which is invoked for each node in the simulation, being passed the node and its zero-based index.
 * The function returns the y-coordinate.
 */
export function forceY<NodeDatum extends SimulationNodeDatum>(y: (d: NodeDatum, i: number, data: NodeDatum[]) => number): ForceY<NodeDatum>;

/**
 * The radial force is similar to the x- and y-positioning forces, except it pushes nodes towards the closest point on a given circle.
 * The circle is of the specified radius centered at ⟨x,y⟩. If x and y are not specified, they default to ⟨0,0⟩.
 * The strength of the force is proportional to the one-dimensional distance between the node's position and the target position.
 * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
 *
 * The generic refers to the type of data for a node.
 */
export interface ForceRadial<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
    /**
     * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force
     * and when the simulation's nodes change via simulation.nodes.
     *
     * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
     */
    initialize(nodes: NodeDatum[]): void;

    /**
     *  Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1.
     */
    strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
    /**
     * Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and returns this force.
     *
     * The strength determines how much to increment the node's x-velocity: (x - node.x) × strength.
     *
     * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current x-position to the target x-position with each application.
     * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints.
     *
     * A value outside the range [0,1] is not recommended.
     *
     * The constant is internally wrapped into a strength accessor function.
     *
     * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or
     * when this method is called with a new strength, and not on every application of the force.
     *
     * @param strength Constant value of strength to be used for all nodes.
     */
    strength(strength: number): this;
    /**
     * Set the strength accessor to the specified function, re-evaluates the strength accessor for each node, and returns this force.
     *
     * The strength determines how much to increment the node's x-velocity: (x - node.x) × strength.
     *
     * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current x-position to the target x-position with each application.
     * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints.
     *
     * A value outside the range [0,1] is not recommended.
     *
     * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or
     * when this method is called with a new strength, and not on every application of the force.
     *
     * @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The function returns the strength.
     */
    strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;

    /**
     * Return the current radius accessor for the circle.
     */
    radius(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
    /**
     * Set the radius accessor for the circle to the specified number, re-evaluates the radius accessor for each node,
     * and returns this force.
     *
     * The constant is internally wrapped into a radius accessor function.
     *
     * The radius accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that radius of the circle for each node is only recomputed when the force is initialized or
     * when this method is called with a new radius, and not on every application of the force.
     *
     * @param radius Constant radius of the circle to be used for all nodes.
     */
    radius(radius: number): this;
    /**
     * Set the radius accessor for the circle to the specified function, re-evaluates the radius accessor for each node,
     * and returns this force.
     *
     * The radius accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that radius of the circle for each node is only recomputed when the force is initialized or
     * when this method is called with a new radius, and not on every application of the force.
     *
     * @param radius A radius accessor function for the circle which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The function returns the radius of the circle.
     */
    radius(radius: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;

    /**
     * Return the current x-accessor for the circle center, which defaults to a function returning 0 for all nodes.
     */
    x(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
    /**
     * Set the x-coordinate accessor for the circle center to the specified number, re-evaluates the x-accessor for each node,
     * and returns this force.
     *
     * The constant is internally wrapped into an x-coordinate accessor function.
     *
     * The x-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the x-coordinate of the circle center for each node is only recomputed when the force is initialized or
     * when this method is called with a new x, and not on every application of the force.
     *
     * @param x Constant x-coordinate of the circle center to be used for all nodes.
     */
    x(x: number): this;
    /**
     * Set the x-coordinate accessor to the specified function, re-evaluates the x-accessor for each node,
     * and returns this force.
     *
     * The x-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the x-coordinate of the circle center for each node is only recomputed when the force is initialized or
     * when this method is called with a new x, and not on every application of the force.
     *
     * @param x A x-coordinate accessor function for the circle center which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The function returns the x-coordinate of the circle center.
     */
    x(x: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;

    /**
     * Return the current y-accessor for the circle center, which defaults to a function returning 0 for all nodes.
     */
    y(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
    /**
     * Set the y-coordinate accessor for the circle center to the specified number, re-evaluates the y-accessor for each node,
     * and returns this force.
     *
     * The constant is internally wrapped into an y-coordinate accessor function.
     *
     * The y-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the y-coordinate of the circle center for each node is only recomputed when the force is initialized or
     * when this method is called with a new y, and not on every application of the force.
     *
     * @param y Constant y-coordinate of the circle center to be used for all nodes.
     */
    y(y: number): this;
    /**
     * Set the y-coordinate accessor to the specified function, re-evaluates the y-accessor for each node,
     * and returns this force.
     *
     * The y-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The resulting number is then stored internally, such that the y-coordinate of the circle center for each node is only recomputed when the force is initialized or
     * when this method is called with a new y, and not on every application of the force.
     *
     * @param y A y-coordinate accessor function for the circle center which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
     * The function returns the y-coordinate of the circle center.
     */
    y(y: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;
}

/**
 * Create a new radial positioning force towards a circle of the specified radius centered at ⟨x,y⟩.
 * If x and y are not specified, they default to ⟨0,0⟩.
 *
 * The strength of the force is proportional to the one-dimensional distance between the node's position and the target position.
 * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
 *
 * The generic refers to the type of data for a node.
 */
export function forceRadial<NodeDatum extends SimulationNodeDatum>(radius: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number),
    x?: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number), y?: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): ForceRadial<NodeDatum>;

redpajama_set_name: RedPajamaGithub


Fujifilm launches "instax SQUARE SQ6 Taylor Swift Edition", designed by instax global partner Taylor Swift.
The "instax SQUARE SQ6 Taylor Swift Edition" features a gold-colored newspaper pattern on a black base for a stylish body with a design similar to Taylor Swift's latest record-breaking album reputation. The metallic ring around the lens goes well with the gold design pattern, giving a luxurious finish. A faithful reproduction of Taylor Swift's autograph is printed on the back of the body. It also includes Taylor Swift original camera strap and film case. Original Taylor Swift Edition film, featuring a print of Taylor Swift's autograph on a black frame, will be released alongside the camera on October 20, 2018.
The "instax SQUARE SQ6 Taylor Swift Edition and "instax SQUARE Film Taylor Swift Edition" are currently on display as part of the instax Experience Booth located at each stop of the critically acclaimed "Taylor Swift reputation Stadium Tour," which has broken multiple records to date and will culminate in Japan at the Tokyo Dome November 20 and 21. The tour opened at University of Phoenix stadium in Glendale Arizona, where the stadium announced TS set the all time concert attendance record. Management at MetLife stadium in East Rutherford NJ and at Gillette stadium in Foxborough Mass, both publicly stated that TS was the first female artist to ever play three consecutive nights at their stadiums. Also first female artist to play two consecutive dates at Croke Park in Ireland. More facts and records to follow. Details regarding this product will be announced via a special web site.
Taylor Swift's critically-adored new album, reputation, was the biggest selling album of 2017 and #1 in over 111 countries on iTunes' sales charts upon release. With almost 1.3 million albums sold in a seven-day period, Taylor is the only artist in history to have four consecutive albums sell over one million copies in their week of release (2010's Speak Now, 2012's RED, 2014's 1989 and 2017's reputation).
Taylor's chart-topping first single, "Look What You Made Me Do," broke multiple records within hours of its release. With over 10 million streams, it was the most-streamed song in a one-day period, the lyric video for "Look What You Made Me Do" broke the standing record with over 19 million views, while the music video shattered the original most viewed video (28 million) record with 43.2 million views in only 24 hours. Her current single, "Delicate" is already #1 on Hot AC.
Taylor is a ten-time GRAMMY winner, a singer, songwriter, musician and producer. She is the youngest person in history to win the music industry's highest honor, The GRAMMY Award for Album of the year and she is the first female solo artist to win this prestigious award twice. Rolling Stone listed Taylor as one of the 100 Greatest Songwriters of All Time. Time magazine featured Taylor on their prestigious 2017 Person of the Year cover, named her one of the 100 Most Influential People in the world and was one of only eight candidates for the 2014 Person of the Year. A Brit and Emmy award winner, Taylor is Billboard's youngest-ever Woman of the Year and the only artist to have been awarded this honor twice.
TAYLOR SWIFT reputation STADIUM TOUR begins May 8, 2018 in Glendale, Arizona. As a global sponsor of the tour, FUJIFILM Corporation will be conveying the appeal of its instax cameras to audiences around the world through instax experience booths and digital promotion activities at concert venues. Fujifilm will also be presenting sponsor of the tour's recently confirmed Japan leg, set to take place in Tokyo on November 20 and 21 officially titled TAYLOR SWIFT reputation STADIUM TOUR in Japan presented by FUJIFILM instax, with special guest Charli XCX.
You are here:Home> News> 2018 News> Fujifilm launches "instax SQUARE SQ6 Taylor Swift Edition", designed by instax global partner Taylor Swift.


text:
Home Scores Bracket Rankings Standings Stats Women's Final Four History Video
Atlanta Tipoff Club | March 22, 2019
2019 Women's Naismith Trophy finalists announced
March is here to bring the madness in women's basketball
ATLANTA — Ahead of the NCAA Tournament tip off, the Atlanta Tipoff Club has announced the four finalists competing for the 2019 Citizen Naismith Trophy, recognizing the most outstanding women's college basketball player. The finalists for the Women's Player of the Year include Asia Durr (Louisville), Megan Gustafson (Iowa), Sabrina Ionescu (Oregon) and Arike Ogunbowale (Notre Dame).
2019 TOURNAMENT: Bracket, schedule, scores
Durr, Gustafson and Ionescu seek to become the first women's or men's player from their schools to win a Citizen Naismith Trophy. Third-year player Ionescu looks to be the first junior to take home the trophy since Breanna Stewart won for UConn in 2015. Gustafson would become the first from the Big Ten to win the Women's Citizen Naismith Trophy. In search of only the fourth women's trophy win for the Atlantic Coast Conference (ACC), Durr and Ogunbowale would be the first to earn the honor since Duke's Lindsey Harding in 2007. Ogunbowale would also become the second player from Notre Dame to win the Citizen Naismith Trophy for Women's Player of the Year, joining the 2001 winner, Ruth Riley.
"Each of the four finalists has the talent and commitment it takes to win the 2019 Women's Citizen Naismith Trophy," said Eric Oberman, executive director of the Atlanta Tipoff Club. "As the tournament begins, we look forward to watching these players lead their teams toward a championship, while they compete for the individual Women's Player of the Year honor."
BRACKET TIME: Interactive bracket | Print your bracket
Beginning today, March 22, fans will have a chance to vote for their favorite finalist through April 3, by visiting naismithfanvote.com to cast their ballot. The fan vote will account for five percent of the overall vote. The 2019 Citizen Naismith Trophy for Women's Player of the Year will be announced on April 6, 2019, and the winner will be honored at her school on a later date.
"These players have shown the dedication and drive worthy of the Women's Citizen Naismith Trophy," said Eric Horowitz, managing director U.S. and travel retail, Citizen Watch Company of America, Inc. "We are excited to watch them play and compete in the tournament and for the top honor."
About the finalists:
Asia Durr, Louisville
• Named ACC Player of the Year for the second year in a row, Durr led the Cardinals to a share of their first regular-season ACC championship and a 29-3 record.
• The senior guard led the league in scoring, averaging 21.3 ppg and 3.5 rpg.
• With an 82.6 free throw percentage, she also came in fifth in 3-pointers (34.7).
• Durr's team tips off today in the NCAA Tournament as the No. 1 seed in the Albany Region.
#VoteAsia for #MeyersAward! #NiteNite 😴
🗳 https://t.co/7y0hI8mUvA pic.twitter.com/Ec9VOOgKCn
— Louisville WBB (@UofLWBB) March 20, 2019
Megan Gustafson, Iowa
• Gustafson led Division I in scoring and field goal percentage the last two seasons, averaging 28.0 ppg with a 69.6 field goal percentage.
• The senior center-forward is Iowa's career leader in scoring (2,700) and rebounding (1,403) and will finish in the top five in blocked shots (228).
• In the Big Ten Championship, she scored 45 points to give the Hawkeyes their first league tournament title since 2001.
• With a 26-6 record, Gustafson's team is set to play in the NCAA Tournament today as the No. 2 seed in the Greensboro Region.
Big Ten Player of the Year ☑
Now let's take this thing to the national stage... https://t.co/VDERa01EfV#VoteGustafson #Hawkeyes #FightForIowa pic.twitter.com/jk2dEqutgY
— Iowa Women's BBall (@IowaWBB) March 6, 2019
Sabrina Ionescu, Oregon
• Ionescu was named Pacific-12 Conference (Pac-12) Player of the Year for a second consecutive season.
• Having led the Ducks to a 29-4 record and a Pac-12 regular-season title, she is third in the country in
assists, averaging 8.1 apg, 19.6 ppg and 7.5 rpg.
• The junior guard produced seven triple-doubles this season, totaling 17 in her career and setting an
NCAA record for both women's and men's players.
• Ionescu's team will play today as the No. 2 seed in the Portland Region of the NCAA Tournament.
The @JoanNiesen article on @sabrina_i20 is in the newest issue of Sports Illustrated. #GoDucks https://t.co/82KRuaZBeY pic.twitter.com/JAGo3ZfaIX
— Oregon Women's Basketball (@OregonWBB) March 11, 2019
Arike Ogunbowale, Notre Dame
• This season, Ogunbowale became the Fighting Irish's all-time leading scorer (2,471).
• The junior guard had a 44.6 field goal percentage, averaging 21.0 ppg and 4.9 rpg.
• She led the Irish to its sixth ACC regular-season title and fifth ACC Tournament championship and played
a role in the team's 2018 NCAA Championship win.
• Heading into the NCAA Tournament with a 30-3 record, Ogunbowale's team is seeded No. 1 in the
Chicago Region.
For the ✌nd straight year, @Arike_O is a Top 🖐 finalist for the @AnnMeyers Award.#GoIrish ☘ pic.twitter.com/MGjV1HlrmY
— Notre Dame WBB (@ndwbb) March 12, 2019
The Citizen Naismith Trophy, originally sculpted in 1982 by Atlanta's Marty C. Dawe, quickly became one of the most prestigious individual national basketball honors. The winner will be awarded with the Citizen Naismith Trophy, produced and provided by Herff-Jones, the leading provider of graduation and educational products and services, including class rings and jewelry. A replica trophy will be donated by Herff-Jones to the player's college.
The four finalists were chosen by the Atlanta Tipoff Club's national voting academy, comprised of leading journalists from around the country, current and former head coaches, former award winners and conference commissioners, all of whom base their selections on outstanding on-court performances during the 2018-19 college basketball season. The vote was tabulated and certified by Aprio, a premier, CPA-led business advisory firm.
For more information, visit www.naismithtrophy.com.
No. 4 NC State goes on epic fourth-quarter run, beats No. 3 Louisville women's basketball, 68-59
No. 4 NC State women's basketball came back from a 14-point deficit in the fourth quarter to take down No. 3 Louisville.
Lusia Harris-Stewart, Delta State women's basketball record holder and revolutionary, dies
The Delta State University athletics family mourns the death of Lusia Harris, who passed away on Tuesday, Jan. 18.
South Carolina's Aliyah Boston leads this week's women's basketball starting five
Last week presented a number of standout performances, here are five of the best through games played Monday, January 17.
Women's tournament expands to 68 teams
2022 selection show: Date, tournament schedule
Latest rankings
15 players to watch out for this season
DI Women's Basketball News
Ankle breakers and buzzer-beaters highlight this week's top-10 plays
11 women's basketball teams that could shake up March Madness
11 women's basketball dark-horse teams that could shake up March Madness
UCF is women's basketball Team of the Week after two big wins against Houston and South Florida
Pat Summitt's first title with the Lady Vols: 1987 vs. Louisiana Tech
Women's college basketball: Oregon's surge continues after upsetting No. 9 UConn
Women's basketball rankings: LSU and Iowa State enter latest Power 10
Michigan downs Maryland, Indiana & Stanford survive in a loaded Sunday of women's hoops
Autumn Johnson awards women's basketball midseason superlatives
Follow NCAA Women's Basketball
Best performances in NCAA women's basketball tournament history

redpajama_set_name: RedPajamaCommonCrawl


The Media & Entertainment Services Alliance, in cooperation with DEG: The Digital Entertainment Group, plans to hold a half-day technology summit for leading Blu-ray Disc developers to discuss recent advancements in the creation, production, and distribution of Blu-ray titles.
The Blu-Tech Summit will take place Dec. 7, 2011 at the Universal Hilton in Los Angeles.
"MESA is excited to bring together the Blu-ray community for this essential event to discuss the technology and production efficiencies that continue to drive the format's development," says Guy Finley, MESA's executive director.
Members of the conference's advisory board include: Seth Hallen, Testronic Labs; Matt Kennedy, 1K Studios/Cinram; Orly Kroh-Trifman, Panasonic Hollywood Laboratory; Darren Lepke, RCDb; Bob Michaels, Deluxe Digital Studios; Paulette Pantoja, BluFocus; Charles Potter, Sony DADC; Amy Jo Smith, DEG: The Digital Entertainment Group; Bhanu Srikanth, Jargon Technologies; Geoffrey Tully, THX; and Duncan Wain, Zoo Digital.
Conference sessions will include an exploration of what studios' new cloud-based UltraViolet platform means for Blu-ray developers, along with a look at how Blu-ray producers can leverage the rise of "second screen" devices such as tablets. Other topics will include the optimization of facility workflows for 2D-to-3D video conversion and 4K resolution, and advancements in Blu-ray replication and packaging processes.
For more information, visit www.blutechsummit.com.


SaturnFans.com Forums - View Single Post - S-Series Automatic Transaxle "Reverse Slam Cure-All"
Thread: S-Series Automatic Transaxle "Reverse Slam Cure-All"
I am not an experienced Saturn mechanic, so when the home remedy with the transmission fluid additive did not work with my 1993 SW2 I paid someone to replace the valve body. The problem came back intermittantly. The transmission shop got some strange codes and suggested that there might be a computer problem. I shopped around to find the cheapest rebuilt unit. It turned out I had to remove the computer from the car to get the number from it. No one would sell me a replacement without the original part number. Removal takes a few minutes because of the awkward location under the dashboard. I bought the replacement computer and drove around until the transmission problem came back. I popped in the replacement and the problem went away. I still have the car as an extra vehicle. My next purchase was a Toyota.
Rate the quality of this post and help docheitner reputation points. Click the reputation button near the bottom left corner of this message box. Thank you!


The most common questions I'm asked from prospective and admitted students are always about the cost of USC and how students pay for it. Rightfully so – USC is definitely a financial investment! However I do think it's worth it – the caliber of the professors and quality of education you get here makes your USC degree truly valuable. I'm going to briefly share about some of the options you have in order to finance your OT education at USC. This post will focus on student loans.
Most students do take our loans in order to pay for a majority of their tuition, fees, & living costs while in the program. Federal loans are the most common, and typically have lower interest rates than private loans. As a graduate student, you are typically eligible for the Direct Unsubsidized Loan (also referred to as Direct Stafford Loan) and the Direct PLUS Loans. To be eligible for the Direct Unsubsidized Loan, you just need to be enrolled half-time and don't necessarily need to demonstrate financial need. Most students will qualify for this loan, and you will be eligible to receive this loan for the duration of the program each semester. Graduate students are eligible for up to $20,500 per academic year, with the current interest rate set at 5.31%. Also, you will not need to start paying back this loan until after you graduate. The other loan that most students use to supplement is the Direct PLUS Loan. This is also a federal loan, and you must be enrolled at least half-time with no adverse credit history. With this loan, the maximum you can borrow is the full cost of USC minus any other financial aid you receive. The current interest rate for this loan is 6.31%. Like the Direct Unsubsidized Loan, you do not need to make any payments until after you graduate.
If the thought of taking out these loans is daunting (which it is for most), keep in mind that there currently is a Public Service Loan Forgiveness Program that you may be eligible to enroll in after graduation. This is a federal program that will forgive the remaining balance on your Direct Loans after you have made 120 qualifying monthly payments (~approx. 10 years) while working full-time for a qualifying employer. Qualifying employers for this program include government organizations, non-profit organizations that are tax-exempt under Section 501(c)(3) or provide a qualifying public service. This is definitely something to consider and take advantage of, if it is still in place when you graduate.
I hope this brief summary of some of your loan options was helpful! Stay tuned for more posts about other financial aid options.