protected function addEdgesSorted(Edges $edges, SplPriorityQueue $sortedEdges)
    {
        // For all edges
        foreach ($edges as $edge) {
            /* @var $edge Edge */
            // ignore loops (a->a)
            if (!$edge->isLoop()) {
                // Add edges with negative weight because of order in stl
                $sortedEdges->insert($edge, -$edge->getWeight());
            }
        }
    }
protected function addEdgesSorted(Edges $edges, SplPriorityQueue $sortedEdges)
    {
        // For all edges
        foreach ($edges as $edge) {
            /* @var $edge Edge */
            // ignore loops (a->a)
            if (!$edge->isLoop()) {
                // Add edges with negative weight because of order in stl
                $sortedEdges->insert($edge, -$edge->getWeight());
            }
        }
    }
protected function addEdgesSorted ( Edges $ edges , SplPriorityQueue $ sortedEdges ) { // For all edges foreach ( $ edges as $ edge ) { /* @var $edge Edge */ // ignore loops (a->a) if ( ! $ edge -> isLoop ( ) ) { // Add edges with negative weight because of order in stl $ sortedEdges -> insert ( $ edge , - $ edge -> getWeight ( ) ) ; } } }
helper method to add a set of Edges to the given set of sorted edges

@param Edges            $edges
@param SplPriorityQueue $sortedEdges
helper method to add a set of Edges to the given set of sorted edges