code: public double centerOfGravity(final Map<HypergraphNode<T>, Integer> nodeOrdering) {
      int cog = 0;
      for (final HypergraphNode<T> node : this.nodes) {
        final Integer level = nodeOrdering.get(node);
        if (level == null)
          throw new IllegalStateException("Could not find node " + node + " in the node ordering.");
        cog += level;
      }
      return (double) cog / this.nodes.size();
    }
docs: Computes the center of gravity for this edge (see Aloul, Markov, and Sakallah).
  @param nodeOrdering the node ordering for which the COG is computed
  @return the center of gravity for this edge