最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How can I create a JGraphT ClosestFirstIterator that uses a custom heap? - Stack Overflow

programmeradmin6浏览0评论

The type of the heapSupplier-parameter in the constructor of .jgrapht.traverse.ClosestFirstIterator makes reference to the package-private class QueueEntry. So how can I ever hope to pass a heap supplier to the constructor?

    public ClosestFirstIterator(
        Graph<V, E> g, V startVertex, double radius,
        Supplier<AddressableHeap<Double, QueueEntry<V, E>>> heapSupplier)

I would like to use a custom heap so as to make the traversal more deterministic, by passing a heap implementation that respects the insertion order for elements with the same key (distance from the start vertex).

Is that a bug or am I missing something?

发布评论

评论列表(0)

  1. 暂无评论