code: private List<List<Cycle>> groupByLength(final RelevantCycles relevant) {
          LinkedList<List<Cycle>> cyclesByLength = new LinkedList<List<Cycle>>();
          for (int[] path : relevant.paths()) {
              if (cyclesByLength.isEmpty() || path.length > cyclesByLength.getLast().get(0).path().length) {
                  cyclesByLength.add(new ArrayList<Cycle>());
              }
              cyclesByLength.getLast().add(new MyCycle(path));
          }
          return cyclesByLength;
      }
docs: Reconstruct all relevant cycles and group then by length.
  
  @param relevant precomputed relevant cycles
  @return all relevant cycles groped by weight