/** * The first time we see a vertex, make up a new heap node for it. * * @param vertex a vertex which has just been encountered. * @param edge the edge via which the vertex was encountered. * * @return the new heap node. */ private FibonacciHeapNode<QueueEntry<V, E>> createSeenData(V vertex, E edge) { QueueEntry<V, E> entry = new QueueEntry<>(); entry.vertex = vertex; entry.spanningTreeEdge = edge; return new FibonacciHeapNode<>(entry); }