question: public static < K > Map < K , Double > normalize ( Map < K , Double > map ) { Double maxValue = 0.0 ; for ( Double v : map . values ( ) ) { if ( v > maxValue ) maxValue = v ; } for ( Map . Entry < K , Double > e : map . entrySet ( ) ) { map . put ( e . getKey ( ) , map . get ( e . getKey ( ) ) / maxValue ) ; } return map ; }
target:  normalizes the values of a map via value/maxValue