class_docstr: Assign coordinates to the nodes using force-directed algorithm.
  
  This is a force-directed graph layout algorithm called
  `ForceAtlas2`.
  
  Timothee Poisot's `nxfa2` is the original implementation of this
  algorithm.
  
  .. _ForceAtlas2:
     http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0098679&type=printable
  .. _nxfa2:
     https://github.com/tpoisot/nxfa2
class_docstr_tok: ["Assign","coordinates","to","the","nodes","using","force-directed","algorithm",".","This","is","a","force-directed","graph","layout","algorithm","called","`","ForceAtlas2","`",".","Timothee","Poisot","'s","`","nxfa2","`","is","the","original","implementation","of","this","algorithm",".","..","_ForceAtlas2",":","http",":","\/\/journals.plos.org\/plosone\/article\/file","?","id=10.1371\/journal.pone.0098679","&","type=printable","..","_nxfa2",":","https",":","\/\/github.com\/tpoisot\/nxfa2"]
code: def __call__(self, nodes, edges, **params):
      p = param.ParamOverrides(self, params)
  
      np.random.seed(p.seed)
  
      # Convert graph into sparse adjacency matrix and array of points
      points = _extract_points_from_nodes(nodes, p, dtype="f")
      matrix = _convert_graph_to_sparse_matrix(
          nodes, edges, p, dtype="f"
      )
  
      if p.k is None:
          p.k = np.sqrt(1.0 / len(points))
  
      # the initial "temperature" is about .1 of domain area (=1x1)
      # this is the largest step allowed in the dynamics.
      temperature = 0.1
  
      # simple cooling scheme.
      # linearly step down by dt on each iteration so last iteration is size dt.
      cooling(matrix, points, temperature, p)
  
      # Return the nodes with updated positions
      return _merge_points_with_nodes(nodes, points, p)
  
file_path: datashader/datashader/layout.py
imports: from __future__ import annotations
  import numpy
  import param
  import scipy.sparse
label_desc: Use image node_id 1 for calling the forceatlas2_layout obj's underlying member method code with example usage: obj.__call__(nodes, edges) and returns: _merge_points_with_nodes