void multiply_constant ( double x ) { for ( Map . Entry < Integer , Double > entry : entrySet ( ) ) { entry . setValue ( entry . getValue ( ) * x ) ; } }
Multiply each value of avector by a constant value .