solve(nodesArray, edgesArray, ignoreClusters = false) {
    // get distance matrix
    const D_matrix = this.distanceSolver.getDistances(
      this.body,
      nodesArray,
      edgesArray
    ); // distance matrix

    // get the L Matrix
    this._createL_matrix(D_matrix);

    // get the K Matrix
    this._createK_matrix(D_matrix);

    // initial E Matrix
    this._createE_matrix();

    // calculate positions
    const threshold = 0.01;
    const innerThreshold = 1;
    let iterations = 0;
    const maxIterations = Math.max(
      1000,
      Math.min(10 * this.body.nodeIndices.length, 6000)
    );
    const maxInnerIterations = 5;

    let maxEnergy = 1e9;
    let highE_nodeId = 0,
      dE_dx = 0,
      dE_dy = 0,
      delta_m = 0,
      subIterations = 0;

    while (maxEnergy > threshold && iterations < maxIterations) {
      iterations += 1;
      [highE_nodeId, maxEnergy, dE_dx, dE_dy] =
        this._getHighestEnergyNode(ignoreClusters);
      delta_m = maxEnergy;
      subIterations = 0;
      while (delta_m > innerThreshold && subIterations < maxInnerIterations) {
        subIterations += 1;
        this._moveNode(highE_nodeId, dE_dx, dE_dy);
        [delta_m, dE_dx, dE_dy] = this._getEnergy(highE_nodeId);
      }
    }
  }
Position the system
@param {Array.<Node>} nodesArray
@param {Array.<vis.Edge>} edgesArray
@param {boolean} [ignoreClusters]