ham-fisted.protocols

->collection

(->collection item)

->init-val-fn

(->init-val-fn item)

Returns the initial values for a parallel reduction. This function takes no arguments and returns the initial accumulator.

->iterable

(->iterable item)

->merge-fn

(->merge-fn item)

Returns the merge function for a parallel reduction. This function takes two accumulators and returns a or modified accumulator.

->rfn

(->rfn item)

Returns the reduction function for a parallel reduction. This function takes two arguments, the accumulator and a value from the collection and returns a new or modified accumulator.

add-fn

(add-fn l)

BitSet

protocol

Protocol for efficiently dealing with bitsets

bitset?

(bitset? item)

BulkSetOps

protocol

cardinality

(cardinality item)

Some sets don't work with clojure's count function.

contained-datatype

(contained-datatype o)

Datatype of contained datatype - may be nil if not a container

ContainedDatatype

protocol

contains-fn

(contains-fn item)

Return an efficient function for deciding if this set contains a single item.

contains-range?

(contains-range? item sidx eidx)

convertible-to-collection?

(convertible-to-collection? item)

convertible-to-iterable?

(convertible-to-iterable? item)

count

(count m)

Counted

protocol

Datatype

protocol

datatype

(datatype o)

Returns the datatype :int8, :int16, etc -- if known -- else the type can be assumed to be an object type. The return value may not be a keyword but it must be comparable with identical?

difference

(difference l r)

Finalize

protocol

Generic protocol for things that finalize results of reductions. Defaults to deref of instance of IDeref or identity.

finalize

(finalize this val)

intersection

(intersection l r)

intersects-range?

(intersects-range? item sidx eidx)

max-set-value

(max-set-value item)

min-set-value

(min-set-value item)

PAdd

protocol

Define a function to mutably add items to a collection. This function must return the collection -- it must be useable in a reduce as the rf.

ParallelReducer

protocol

Parallel reducers are simple a single object that you can pass into preduce as opposed to 3 separate functions.

ParallelReduction

protocol

Protocol to define a parallel reduction in a collection-specific pathway. Specializations are in impl as that is where the parallelization routines are found.

preduce

(preduce coll init-val-fn rfn merge-fn options)

Container-specific parallelized reduction. Reductions must respect the pool passed in via the options.

reduce-intersection

(reduce-intersection l data)

reduce-union

(reduce-union l data)

Reducer

protocol

Reducer is the basic reduction abstraction as a single object.

reducible?

(reducible? coll)

Reduction

protocol

Faster check than satisfies? to see if something is reducible

returned-datatype

(returned-datatype o)

ReturnedDatatype

protocol

serialize->bytes

(serialize->bytes o)

SerializeObjBytes

protocol

set?

(set? l)

SetOps

protocol

Simple protocol for set operations to make them uniformly extensible to new objects.

simplified-contained-datatype

(simplified-contained-datatype o)

Exactly :int64 :float64 :object or nil

simplified-datatype

(simplified-datatype o)

Returns exactly :int64, :float64, or :object

simplified-returned-datatype

(simplified-returned-datatype o)

ToCollection

protocol

ToIterable

protocol

union

(union l r)

wrap-array

(wrap-array ary)

wrap-array-growable

(wrap-array-growable ary ptr)

WrapArray

protocol

xor

(xor l r)