n*v ( n v -- w )
Factor documentation > Factor handbook > The language > Numbers > Vector operations > Vector arithmetic
Prev:v*n ( u n -- w )
Next:v/n ( u n -- w )


Vocabulary
math.vectors

Inputs and outputs
na number
va sequence of numbers
wa sequence of numbers


Word description
Multiplies each element of v by n.

Definition
IN: math.vectors

GENERIC: n*v ( n v -- w )


Methods
USING: kernel math.vectors sequences.cords ;

M: cord n*v [ n*v ] with cord-map ; inline


USING: kernel math math.vectors sequences ;

M: object n*v [ * ] with map ; inline


USING: kernel math.vectors math.vectors.simd ;

M: simd-128 n*v [ simd-with ] keep v* ; inline