Liking cljdoc? Tell your friends :D

provisdom.math.vector


compute-collclj

(compute-coll size index->any)

Function index->any takes an index.

Function `index->any` takes an `index`.
sourceraw docstring

compute-vectorclj

(compute-vector size index->number)

Function index->number takes an index and returns a number.

Function `index->number` takes an `index` and returns a number.
sourceraw docstring

concat-by-indexclj

(concat-by-index coll1 coll2 i)

Returns a lazy sequence constructed by concatenating two collections, coll1 and coll2 with coll2 beginning at index i. Preference goes to coll2 and empty spaces are filled with nil.

Returns a lazy sequence constructed by concatenating two collections, `coll1`
and `coll2` with `coll2` beginning at index `i`. Preference goes to `coll2`
and empty spaces are filled with nil.
sourceraw docstring

cross-productclj

(cross-product v1 v2)

Given two linearly independent 3D vectors v1 and v2, the cross product, v1 × v2, is a vector that is perpendicular to both v1 and v2. For 2D vectors, the cross product has an analog result, which is a number. Only defined for 2D and 3D vectors.

Given two linearly independent 3D vectors `v1` and `v2`, the cross product,
`v1` × `v2`, is a vector that is perpendicular to both `v1` and `v2`. For 2D
vectors, the cross product has an analog result, which is a number. Only
defined for 2D and 3D vectors.
sourceraw docstring

dot-productclj

(dot-product v1 v2)

The dot product is the sum of the products of the corresponding entries of two vectors. Geometrically, the dot product is the product of the Euclidean magnitudes of the two vectors and the cosine of the angle between them. Also called [[inner-product]].

The dot product is the sum of the products of the corresponding entries of
two vectors. Geometrically, the dot product is the product of the Euclidean
magnitudes of the two vectors and the cosine of the angle between them. Also
called [[inner-product]].
sourceraw docstring

filter-kvclj

(filter-kv index+number->bool v)

Returns a vector of the items in v for which function index+number->bool returns true. index+number->bool must be free of side-effects.

Returns a vector of the items in `v` for which function `index+number->bool`
returns true. `index+number->bool` must be free of side-effects.
sourceraw docstring

indexes-ofclj

(indexes-of number v)

Returns a vector of the indexes in v that contain 'number'.

Returns a vector of the indexes in `v` that contain 'number'.
sourceraw docstring

insertvclj

(insertv v index number)

Returns a vector with the new number inserted into index.

Returns a vector with the new `number` inserted into `index`.
sourceraw docstring

kahan-sumclj

(kahan-sum numbers)

Kahan Summation algorithm -- for greater floating-point summation accuracy, as fast alternative to bigDecimal.

Kahan Summation algorithm -- for greater floating-point summation accuracy,
as fast alternative to bigDecimal.
sourceraw docstring

mdlclj

source

open-probs?clj

(open-probs? x sum-accu)

Returns true if a vector of open probs that sums to one within sum-accu.

Returns true if a vector of open probs that sums to one within `sum-accu`.
sourceraw docstring

probs?clj

(probs? x sum-accu)

Returns true if a vector of probs that sums to one within sum-accu.

Returns true if a vector of probs that sums to one within `sum-accu`.
sourceraw docstring

projectionclj

(projection v1 v2)

Returns vector of v1 projected onto v2.

Returns vector of `v1` projected onto `v2`.
sourceraw docstring

removevclj

(removev v index)

Returns a vector with the value in the index removed.

Returns a vector with the value in the index removed.
sourceraw docstring

replace-nanclj

(replace-nan replacement-number numbers)

Takes a collection of numbers and returns the collection with any NaN replaced with replacement-number. Note that clojure.core/replace doesn't work with NaN.

Takes a collection of `numbers` and returns the collection with any NaN
replaced with `replacement-number`. Note that clojure.core/replace doesn't
work with NaN.
sourceraw docstring

rnd-vector!clj

(rnd-vector! size)

Returns vector v of size with random doubles.

Returns vector `v` of `size` with random doubles.
sourceraw docstring

roughly-probs?clj

(roughly-probs? x accu sum-accu)

Returns true if a vector of roughly probs within accu that sums to one within sum-accu.

Returns true if a vector of roughly probs within `accu` that sums to one
within `sum-accu`.
sourceraw docstring

round-roughly-vector-probclj

(round-roughly-vector-prob v accu)

Rounds any probs that are roughly probs.

Rounds any probs that are roughly probs.
sourceraw docstring

some-kvclj

(some-kv index+number->bool v)

Returns the first logical true value of function index+number->bool for any number in v, else nil.

Returns the first logical true value of function `index+number->bool` for any
number in `v`, else nil.
sourceraw docstring

sparse->vectorclj

(sparse->vector sparse v)

Builds a vector using a sparse representation and an existing vector v (often a zero-vector). sparse is a collection of tuples of [index number]. Later values will override prior overlapping values.

Builds a vector using a sparse representation and an existing vector `v`
(often a zero-vector). `sparse` is a collection of tuples of `[index number]`.
Later values will override prior overlapping values.
sourceraw docstring

to-vectorclj

(to-vector x)

Creates a vector representing the flattened numbers of x if possible. Otherwise, returns nil.

Creates a vector representing the flattened numbers of `x` if possible.
Otherwise, returns nil.
sourceraw docstring

vector-open-prob?clj

(vector-open-prob? x)

Returns true if a vector of open probs only.

Returns true if a vector of open probs only.
sourceraw docstring

vector-prob?clj

(vector-prob? x)

Returns true if a vector of probs only.

Returns true if a vector of probs only.
sourceraw docstring

vector-roughly-prob?clj

(vector-roughly-prob? x accu)

Returns true if a vector of roughly probs only.

Returns true if a vector of roughly probs only.
sourceraw docstring

vector?clj

(vector? x)

Returns true if a vector (i.e., numbers only).

Returns true if a vector (i.e., numbers only).
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close