Liking cljdoc? Tell your friends :D

sicmutils.util.vector-set

Contains an implementation and API for an 'ordered set' data structure backed by a persistent vector.

Contains an implementation and API for an 'ordered set' data structure backed
by a persistent vector.
raw docstring

conjclj/s

(conj vset x)

Returns a vector-set generated by inserting x into the appropriate position in the sorted, distinct vector-set vset. The invariant is that if vset is sorted and contains distinct elements, the return value will contain x and also be sorted.

Attempting to insert an element x already contained in vset throws an exception.

Returns a vector-set generated by inserting `x` into the appropriate position
in the sorted, distinct vector-set `vset`. The invariant is that if `vset` is
sorted and contains distinct elements, the return value will contain `x` and
also be sorted.

Attempting to insert an element `x` already contained in `vset` throws an
exception.
sourceraw docstring

contains?clj/s

(contains? vset x)

Return true if the element x is present in the supplied vector vset, false otherwise.

Return true if the element `x` is present in the supplied vector `vset`, false
otherwise.
sourceraw docstring

differenceclj/s

(difference x y)

Returns a vector-set that contains all elements present in vector-set x and NOT in vector-set y.

x and y must be vector sets, ie, sorted and containing only distinct entries.

Returns a vector-set that contains all elements present in vector-set `x` and
NOT in vector-set `y`.

`x` and `y` must be vector sets, ie, sorted and containing only distinct
entries.
sourceraw docstring

disjclj/s

(disj vset x)

Returns a vector-set generated by dropping x from the supplied vector-set vset. If x is not present in vset, acts as identity.

Returns a vector-set generated by dropping `x` from the supplied vector-set
`vset`. If `x` is not present in `vset`, acts as identity.
sourceraw docstring

empty-setclj/s

source

intersectionclj/s

(intersection x y)

Returns a vector-set that contains all elements present in BOTH vector-sets x and y.

x and y must be vector sets, ie, sorted and containing only distinct entries.

Returns a vector-set that contains all elements present in BOTH vector-sets `x`
and `y`.

`x` and `y` must be vector sets, ie, sorted and containing only distinct
entries.
sourceraw docstring

makeclj/s

(make xs)

Returns a new vector-set, ie, a vector with the distinct elements of the supplied sequence xs stored in sorted order.

Returns a new `vector-set`, ie, a vector with the distinct elements of the
supplied sequence `xs` stored in sorted order.
sourceraw docstring

symmetric-differenceclj/s

(symmetric-difference x y)

Returns a vector-set that contains all elements present in vector-set x and vector-set y, but not in both.

x and y must be vector sets, ie, sorted and containing only distinct entries.

Returns a vector-set that contains all elements present in vector-set `x` and
vector-set `y`, but not in both.

`x` and `y` must be vector sets, ie, sorted and containing only distinct
entries.
sourceraw docstring

unionclj/s

(union x y)

Returns a vector-set containing all elements present in either sequence x and y.

Returns a vector-set containing all elements present in either sequence `x` and
`y`.
sourceraw docstring

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

× close