private function sumEdges(array $edges)
    {
        $sum = 0;
        foreach ($edges as $edge) {
            $sum += $edge->getWeight();
        }

        return $sum;
    }
private function sumEdges(array $edges)
    {
        $sum = 0;
        foreach ($edges as $edge) {
            $sum += $edge->getWeight();
        }

        return $sum;
    }
private function sumEdges ( array $ edges ) { $ sum = 0 ; foreach ( $ edges as $ edge ) { $ sum += $ edge -> getWeight ( ) ; } return $ sum ; }
get sum of weight of given edges

no need to optimize this further, as it's only evaluated if branchAndBound is disabled and
there's no valid reason why anybody would want to do so.

@param  Edge[] $edges
@return float
get sum of weight of given edges