protected double maxDistance ( DoubleDBIDList elems ) { double max = 0 ; for ( DoubleDBIDListIter it = elems . iter ( ) ; it . valid ( ) ; it . advance ( ) ) { final double v = it . doubleValue ( ) ; max = max > v ? max : v ; } return max ; }
Find maximum in a list via scanning .