double function ( ) { double loc0 = 0 ; City loc1 , loc2 ; for ( int loc3 = 1 ; loc3 < _tour . size ( ) ; loc3 ++ ) { loc1 = _tour . get ( loc3 - 1 ) ; loc2 = _tour . get ( loc3 ) ; loc0 += _distanceMatrix [ loc1 . id - 1 ] [ loc2 . id - 1 ] ; } return loc0 ; }
calculates the length of the tour concode_field_sep ArrayList<City> _tour concode_elem_sep double[][] _distanceMatrix concode_elem_sep double _length concode_field_sep void mutate concode_elem_sep double length concode_elem_sep void save concode_elem_sep String toString concode_elem_sep int compareTo