addToOrdering(node, level) {
    if (this.distributionOrdering[level] === undefined) {
      this.distributionOrdering[level] = [];
    }

    let isPresent = false;
    const curLevel = this.distributionOrdering[level];
    for (const n in curLevel) {
      //if (curLevel[n].id === node.id) {
      if (curLevel[n] === node) {
        isPresent = true;
        break;
      }
    }

    if (!isPresent) {
      this.distributionOrdering[level].push(node);
      this.distributionIndex[node.id] =
        this.distributionOrdering[level].length - 1;
    }
  }
Add a node to the ordering per level
@param {Node} node
@param {number} level