computes the average rating in this centroid . concode_field_sep double average concode_elem_sep int startingUid concode_elem_sep OpenIntIntHashMap count concode_elem_sep OpenIntDoubleHashMap sum concode_field_sep OpenIntIntHashMap cloneCount concode_elem_sep void printRatings concode_elem_sep OpenIntDoubleHashMap cloneSum concode_elem_sep void removePoint concode_elem_sep double distanceWithDefault concode_elem_sep double getAverage concode_elem_sep void addPoint concode_elem_sep double getRating
void function ( ) { IntArrayList loc0 = sum . loc0 ( ) ; double loc1 = 0.0 ; if ( loc0 . size ( ) == 0 ) { average = 0.0 ; } else { for ( int loc2 = 0 ; loc2 < loc0 . size ( ) ; loc2 ++ ) { if ( count . get ( loc0 . get ( loc2 ) ) != 0 ) loc1 += ( sum . get ( loc0 . get ( loc2 ) ) / count . get ( loc0 . get ( loc2 ) ) ) ; } average = loc1 / loc0 . size ( ) ; } }