protected Set<Deque<CollatzEdge>> makeCollatzPaths(int start, CollatzOp[]... paths) {
		Set<Deque<CollatzEdge>> result = new HashSet<>();
		for (CollatzOp[] path : paths) {
			int cur = start;
			Deque<CollatzEdge> p = new LinkedList<>();
			for (CollatzOp op : path) {
				int next = 0;
				switch (op) {
					case INV_DIV2:
						next = cur * 2;
						break;
					case INV_MUL3_ADD1:
						next = (cur - 1) / 3;
						break;
					case SQR:
						next = cur * cur;
				}
				p.add(new CollatzEdge(cur, op, next));
				cur = next;
			}
			result.add(p);
		}
		return result;
	}
A silly infinite graph based loosely on the Collatz conjecture
Ghidra/Framework/Graph/src/test/java/ghidra/graph/DijkstraShortestPathsAlgorithmTest.java