Datatypes for search configurations
Datatypes for search configurations
(add! config-set config)
Add a configuration to a config-set. Returns self. You do not need to preserve the return value.
Add a configuration to a config-set. Returns self. You do not need to preserve the return value.
(array-processes history)
A process tracker backed by a sorted array, closing over the given history. History operations must have :index elements identifying their position in the history, and integer :process fields.
A process tracker backed by a sorted array, closing over the given history. History operations must have :index elements identifying their position in the history, and integer :process fields.
(array-processes-assoc a i process op)
Given an array like [process-id op-id process-id op-id ...], an index where the process/op pair belong, a process id, and an op id, upserts the process id and op id into a copy of the array, maintaining sorted order.
Given an array like [process-id op-id process-id op-id ...], an index where the process/op pair belong, a process id, and an op id, upserts the process id and op id into a copy of the array, maintaining sorted order.
(array-processes-dissoc a i)
Like array-processes-assoc, but deletes the elements at i and i+1, returning a copy of the array without them.
Like array-processes-assoc, but deletes the elements at i and i+1, returning a copy of the array without them.
(array-processes-search a process)
Given a process ID and an int array like [process-id op-id process-id op-id ....], finds the array index of this process ID. (inc idx) will give the index of the corresponding process ID. If the process is not present, returns (dec (- insertion-point)), where insertion point is where the process index would be, after insertion into the array.
Given a process ID and an int array like [process-id op-id process-id op-id ....], finds the array index of this process ID. (inc idx) will give the index of the corresponding process ID. If the process is *not* present, returns (dec (- insertion-point)), where insertion point is where the process index *would* be, after insertion into the array.
(call ps op)
Adds an operation being called with the calling state.
Adds an operation being called with the calling state.
(calling? ps p)
Is this process currently calling an operation?
Is this process currently calling an operation?
(calls ps)
A reducible of called but unlinearized operations.
A reducible of called but unlinearized operations.
(calls-count ps)
How many calls are outstanding?
How many calls are outstanding?
(config model history)
An initial configuration around a given model and history.
An initial configuration around a given model and history.
(config->map config)
Turns a config into a nice map showing the state of the world at that point.
Turns a config into a nice map showing the state of the world at that point.
(estimated-cost config)
Roughly how expensive do we think a config is going to be to JIT-linearize? We'll estimate based on the cardinality of the pending set.
Roughly how expensive do we think a config is going to be to JIT-linearize? We'll estimate based on the cardinality of the pending set.
(gammaish n)
Nemes approximation to the gamma function
Nemes approximation to the gamma function
(idle? ps p)
Is this process doing nothing?
Is this process doing nothing?
(linearize ps op)
Changes the given operation from calling to returning.
Changes the given operation from calling to returning.
(map-processes)
A Processes tracker based on Clojure maps.
A Processes tracker based on Clojure maps.
(memoized-map-processes)
A Processes tracker based on Clojure maps, with memoized hashcode for faster hashing and equality.
A Processes tracker based on Clojure maps, with memoized hashcode for faster hashing and equality.
(return ps op)
Removes an operation from the returned set.
Removes an operation from the returned set.
(returning? ps p)
Is this process returning an operation?
Is this process returning an operation?
(set-config-set)
(set-config-set coll)
An empty set-backed config set, or one backed by a collection.
An empty set-backed config set, or one backed by a collection.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close