Exemplo n.º 1
0
  @Override
  public int getFlow() {
    int totalSum = 0;

    for (int v = 0; v < numVertices; v++) {
      EdgeInfo ei = info[sourceIndex][v];
      if (ei != null) {
        totalSum += ei.getFlow();
      }
    }

    return totalSum;
  }