vmin ( u v -- w )
Factor documentation > Factor handbook > The language > Numbers > Vector operations > Vector component- and bit-wise logic
Prev:vmax ( u v -- w )
Next:vsupremum ( seq -- vmax )


Vocabulary
math.vectors

Inputs and outputs
ua sequence of real numbers
va sequence of real numbers
wa sequence of real numbers


Word description
Creates a sequence where each element is the minimum of the corresponding elements from u and v.

Examples
USING: math.vectors prettyprint ; { 1 2 5 } { -7 6 3 } vmin .
{ -7 2 3 }


Definition
IN: math.vectors

GENERIC: vmin ( u v -- w )


Methods
USING: generic math.vectors sequences.cords ;

M: cord vmin
[ vmin ] [ M\ cord vmin (call-next-method) ] cord-2map ;
inline


USING: kernel math.order math.vectors sequences ;

M: object vmin [ min ] 2map ; inline


USING: generic kernel math.vectors math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private ;

M: simd-128 vmin
dup simd-rep
[ (simd-vmin) ] [ M\ simd-128 vmin (call-next-method) ]
vv->v-op ; inline