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