API for clojure.data.int-map
-
Full namespace name:
clojure.data.int-map
Overview
An adaptation of Okasaki and Gill's "Fast Mergeable Integer Maps`",
which can be found at http://ittc.ku.edu/~andygill/papers/IntMap98.pdf
Types
PersistentIntMap
type
Fields:
[root epoch meta]
Protocols:
clojure.core.protocols/CollReduce, clojure.core.protocols/IKVReduce, clojure.core.reducers/CollFold
Interfaces:
clojure.data.int_map.IRadix, clojure.data.int_map.IRange, clojure.lang.Associative, clojure.lang.Counted, clojure.lang.IEditableCollection, clojure.lang.IFn, clojure.lang.IHashEq, clojure.lang.ILookup, clojure.lang.IObj, clojure.lang.IPersistentCollection, clojure.lang.IPersistentMap, clojure.lang.MapEquivalence, clojure.lang.Reversible, clojure.lang.Seqable, java.util.Map
PersistentIntSet
type
Fields:
[int-set epoch meta]
Protocols:
Interfaces:
clojure.data.int_map.IRange, clojure.lang.IEditableCollection, clojure.lang.IFn, clojure.lang.IHashEq, clojure.lang.IObj, clojure.lang.IPersistentSet, clojure.lang.Reversible, clojure.lang.Seqable, java.util.Set
TransientIntMap
type
Fields:
[root epoch meta]
Protocols:
Interfaces:
clojure.data.int_map.IRadix, clojure.lang.Associative, clojure.lang.Counted, clojure.lang.IFn, clojure.lang.ILookup, clojure.lang.IObj, clojure.lang.ITransientMap, clojure.lang.MapEquivalence, clojure.lang.Seqable
TransientIntSet
type
Fields:
[int-set epoch meta]
Protocols:
Interfaces:
clojure.lang.IFn, clojure.lang.IObj, clojure.lang.ITransientSet
Public Variables and Functions
->PersistentIntMap
function
Usage: (->PersistentIntMap root epoch meta)
Positional factory function for class clojure.data.int_map.PersistentIntMap.
Source
->PersistentIntSet
function
Usage: (->PersistentIntSet int-set epoch meta)
Positional factory function for class clojure.data.int_map.PersistentIntSet.
Source
->TransientIntMap
function
Usage: (->TransientIntMap root epoch meta)
Positional factory function for class clojure.data.int_map.TransientIntMap.
Source
->TransientIntSet
function
Usage: (->TransientIntSet int-set epoch meta)
Positional factory function for class clojure.data.int_map.TransientIntSet.
Source
dense-int-set
function
Usage: (dense-int-set)
(dense-int-set s)
Given a collection, creates an immutable set which can only store integral values.
This should be used only if elements are densely clustered (each element has multiple
elements within +/- 1000).
Source
difference
function
Usage: (difference a b)
Returns the difference between two bitsets.
Source
int-map
function
Usage: (int-map)
(int-map a b)
(int-map a b & rest)
Given alternating keys and values, creates an integer map that can only
have integers as keys.
Source
int-set
function
Usage: (int-set)
(int-set s)
Given a collection, creates an immutable set which can only store integral values.
This should be used unless elements are densely clustered (each element has multiple
elements within +/- 1000).
Source
intersection
function
Usage: (intersection a b)
Returns the intersection of two bitsets.
Source
merge
function
Usage: (merge)
(merge a b)
(merge a b & rest)
Merges together two int-maps, giving precedence to values from the right-most map.
Source
merge-with
function
Usage: (merge-with f)
(merge-with f a b)
(merge-with f a b & rest)
Merges together two int-maps, using `f` to resolve value conflicts.
Source
range
function
Usage: (range x min max)
Returns a map or set representing all elements within [min, max], inclusive.
Source
union
function
Usage: (union a b)
Returns the union of two bitsets.
Source
update
function
Usage: (update m k f)
(update m k f & args)
Updates the value associated with the given key. If no such key exists, `f` is invoked
with `nil`.
Source
update!
function
Usage: (update! m k f)
(update! m k f & args)
A transient variant of `update`.
Source