code: public int getPGroup(Node n) {
          int i = 0;
          for (Collection<Node> pGrp : cstr.getGroupsOfNodes()) {
              if (pGrp.contains(n)) {
                  break;
              }
              i++;
          }
          return i;
      }
docs: Get the group the node belong to.
  
  @param n the node
  @return the group identifier, {@code -1} if the node does not belong to a group