JuliaFloat64VectorFunctions2ΒΆ
jarray64.spad line 235 [edit on github]
This package provides operations which all take as arguments JuliaFloat64Vector and functions from JuliaFloat64
to JuliaFloat64
. The operations all iterate over their vector argument and either return a value of type JuliaFloat64Vector or a JuliaFloat64
.
- map: (JuliaFloat64 -> JuliaFloat64, JuliaFloat64Vector) -> JuliaFloat64Vector
map(f, v)
applies the functionf
to every element of the vectorv
producing a new vector containing the values.
- map: (JuliaFloat64 -> Union(JuliaFloat64, failed), JuliaFloat64Vector) -> Union(JuliaFloat64Vector, failed)
map(f, v)
applies the functionf
to every element of the vectorv
producing a new vector containing the values or"failed"
.
- reduce: ((JuliaFloat64, JuliaFloat64) -> JuliaFloat64, JuliaFloat64Vector, JuliaFloat64) -> JuliaFloat64
reduce(func, vec, ident)
combines the elements invec
using the binary functionfunc
. Argument ident is returned ifvec
is empty.
- scan: ((JuliaFloat64, JuliaFloat64) -> JuliaFloat64, JuliaFloat64Vector, JuliaFloat64) -> JuliaFloat64Vector
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.