Liking cljdoc? Tell your friends :D

sparse-array.core


*safe-sparse-operations*clj

Whether spase array operations should be conducted safely, with careful checking of data conventions and exceptions thrown if expectations are not met. Normally false.

Whether spase array operations should be conducted safely, with careful
checking of data conventions and exceptions thrown if expectations are not
met. Normally `false`.
sourceraw docstring

arityclj

(arity x)

Return the arity of the sparse array x.

Return the arity of the sparse array `x`.
sourceraw docstring

child-arityclj

(child-arity x)

Return the largest arity among the arities of the next dimension layer of the sparse array x.

Return the largest arity among the arities of the next dimension layer of
the sparse array `x`.
sourceraw docstring

dense-array?clj

(dense-array? x)
(dense-array? x d)

Basically, any vector can be considered as a dense array of one dimension. If we're seeking a dense array of more than one dimension, the number of dimensions should be specified as d.

Basically, any vector can be considered as a dense array of one dimension.
If we're seeking a dense array of more than one dimension, the number of
dimensions should be specified as `d`.
sourceraw docstring

dense-dimensionsclj

(dense-dimensions x)

How many usable dimensions (represented as vectors) does the dense array x have?

How many usable dimensions (represented as vectors) does the dense array
`x` have?
sourceraw docstring

dense-to-sparseclj

(dense-to-sparse x)
(dense-to-sparse x axes)

Return a sparse array representing the content of the dense array x, assuming these axes if specified. NOTE THAT if insufficient values of axes are specified, the resulting sparse array will be malformed.

Return a sparse array representing the content of the dense array `x`,
assuming these `axes` if specified. *NOTE THAT* if insufficient
values of `axes` are specified, the resulting sparse array will
be malformed.
sourceraw docstring

getclj

(get array & coordinates)

Return the value in this sparse array at these coordinates.

Return the value in this sparse `array` at these `coordinates`.
sourceraw docstring

make-sparse-arrayclj

(make-sparse-array & dimensions)

Make a sparse array with these dimensions. Every member of dimensions must be a keyword; otherwise, nil will be returned.

Make a sparse array with these `dimensions`. Every member of `dimensions`
must be a keyword; otherwise, `nil` will be returned.
sourceraw docstring

merge-sparse-arraysclj

(merge-sparse-arrays a1 a2)

Return a sparse array taking values from sparse arrays a1 and a2, but preferring values from a2 where there is a conflict. a1 and a2 must have the same dimensions in the same order, or nil will be returned.

Return a sparse array taking values from sparse arrays `a1` and `a2`,
but preferring values from `a2` where there is a conflict. `a1` and `a2`
must have the **same** dimensions in the **same** order, or `nil` will
be returned.
sourceraw docstring

putclj

(put array value & coordinates)

Return a sparse array like this array but with this value at these coordinates. Returns nil if any coordinate is invalid.

Return a sparse array like this `array` but with this `value` at these
`coordinates`. Returns `nil` if any coordinate is invalid.
sourceraw docstring

sparse-array?clj

(sparse-array? x)
(sparse-array? x & axes)

true if x is a sparse array conforming to the conventions established by this library, else false.

`true` if `x` is a sparse array conforming to the conventions established
by this library, else `false`.
sourceraw docstring

sparse-to-denseclj

(sparse-to-dense x)
(sparse-to-dense x arity)

Return a dense array representing the content of the sparse array x.

NOTE THAT this has the potential to consume very large amounts of memory.

Return a dense array representing the content of the sparse array `x`.

**NOTE THAT** this has the potential to consume very large amounts of memory.
sourceraw docstring

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

× close