public double weight ( ) { double result = 0 ; Iterator edgeIterator = edgeSet ( ) . iterator ( ) ; while ( edgeIterator . hasNext ( ) ) { result += ( ( Edge ) edgeIterator . next ( ) ) . getWeight ( ) ; } return result ; }
Returns the sum of the weights of all edges in this cycle .