public double sum() {
        double sum = 0;
        TIntDoubleIterator iter = edges.iterator();
        while (iter.hasNext()) {
            iter.advance();
            sum += iter.value();
        }
        return sum;
    }
public double sum ( ) { double sum = 0 ; TIntDoubleIterator iter = edges . iterator ( ) ; while ( iter . hasNext ( ) ) { iter . advance ( ) ; sum += iter . value ( ) ; } return sum ; }
Returns the sum of the weights of the edges contained in this set.