(Kmer source, BloomFilterDeBruijnGraph graph, int depth)
| 6678 | } |
| 6679 | |
| 6680 | public static boolean hasDepthRight(Kmer source, BloomFilterDeBruijnGraph graph, int depth) { |
| 6681 | int k = graph.getK(); |
| 6682 | int numHash = graph.getMaxNumHash(); |
| 6683 | |
| 6684 | ArrayDeque<ArrayDeque<Kmer>> frontier = new ArrayDeque<>(); |
| 6685 | ArrayDeque<Kmer> alts = source.getSuccessors(k, numHash, graph); |
| 6686 | frontier.add(alts); |
| 6687 | |
| 6688 | while (!frontier.isEmpty()) { |
| 6689 | alts = frontier.peekLast(); |
| 6690 | if (alts.isEmpty()) { |
| 6691 | frontier.removeLast(); |
| 6692 | } |
| 6693 | else { |
| 6694 | frontier.add(alts.pop().getSuccessors(k, numHash, graph)); |
| 6695 | } |
| 6696 | |
| 6697 | if (frontier.size() >= depth) { |
| 6698 | return true; |
| 6699 | } |
| 6700 | } |
| 6701 | |
| 6702 | return false; |
| 6703 | } |
| 6704 | |
| 6705 | public static boolean hasDepthLeft(Kmer source, BloomFilterDeBruijnGraph graph, int depth) { |
| 6706 | int k = graph.getK(); |
no test coverage detected