checkIfTree() {
    for (const i in this.parentReference) {
      if (this.parentReference[i].length > 1) {
        this.isTree = false;
        return;
      }
    }

    this.isTree = true;
  }
Check if the current state is for a formal tree or formal forest.

This is the case if every node has at most one parent.

Pre: parentReference init'ed properly for current network