JuliaFloat32VectorFunctions2ΒΆ
jarray32.spad line 162 [edit on github]
This package provides operations which all take as arguments JuliaFloat32Vector and functions from JuliaFloat32
to JuliaFloat32
. The operations all iterate over their vector argument and either return a value of type JuliaFloat32Vector or a JuliaFloat32
.
- map: (JuliaFloat32 -> JuliaFloat32, JuliaFloat32Vector) -> JuliaFloat32Vector
map(f, v)
applies the functionf
to every element of the vectorv
producing a new vector containing the values.
- map: (JuliaFloat32 -> Union(JuliaFloat32, failed), JuliaFloat32Vector) -> Union(JuliaFloat32Vector, failed)
map(f, v)
applies the functionf
to every element of the vectorv
producing a new vector containing the values or"failed"
.
- reduce: ((JuliaFloat32, JuliaFloat32) -> JuliaFloat32, JuliaFloat32Vector, JuliaFloat32) -> JuliaFloat32
reduce(func, vec, ident)
combines the elements invec
using the binary functionfunc
. Argument ident is returned ifvec
is empty.
- scan: ((JuliaFloat32, JuliaFloat32) -> JuliaFloat32, JuliaFloat32Vector, JuliaFloat32) -> JuliaFloat32Vector
scan(func, vec, ident)
creates a new vector whose elements are the result of applying reduce to the binary functionfunc
, increasing initial subsequences of the vectorvec
, and the element ident.