public static < E > void dotProductInPlace ( Counter < E > target , Counter < E > term ) { for ( E key : target . keySet ( ) ) { target . setCount ( key , target . getCount ( key ) * term . getCount ( key ) ) ; } }
Multiplies every count in target by the corresponding value in the term Counter .