v? ( mask true false -- result )
Factor handbook » The language » Numbers » Vector operations » Vector component- and bit-wise logic

Prev:vnot ( v -- w )
Next:vif ( mask true-quot: ( -- vector ) false-quot: ( -- vector ) -- result )


Vocabulary
math.vectors

Inputs and outputs
maska sequence of booleans
truea sequence of numbers
falsea sequence of numbers
resulta sequence of numbers


Word description
Creates a new sequence by selecting elements from the true and false sequences based on whether the corresponding bits of the mask sequence are set or not.

Notes
See Componentwise logic with SIMD vectors for notes on dealing with vector boolean inputs and results when using SIMD types.

See also
v<, v<=, v=, v>, v>=, vunordered?, vand, vor, vxor, vnot, vany?, vall?, vnone?

Definition

GENERIC: v? ( mask true false -- result )


Methods