Common elements for the standard indexed graph, and multigraph implementations.
Common elements for the standard indexed graph, and multigraph implementations.
(add-zero-step os-map index)
Uses the initial object->subject map to add reflexive connections to all nodes
Uses the initial object->subject map to add reflexive connections to all nodes
(check-for-transitive pred)
Tests if a predicate is transitive. Returns a plain version of the predicate, along with a value to indicate if the predicate is transitive. This value is nil for a plain predicate, or else is a keyword to indicate the kind of transitivity.
Tests if a predicate is transitive. Returns a plain version of the predicate, along with a value to indicate if the predicate is transitive. This value is nil for a plain predicate, or else is a keyword to indicate the kind of transitivity.
(count-embedded-index edx)
Adds up the counts of embedded indexes
Adds up the counts of embedded indexes
Lookup an index in the graph for the requested data and count the results.
Lookup an index in the graph for the requested data and count the results.
(create-o->smap {idx :pos :as graph} p)
Produces a map from objects to subjects for existing edges in the graph for a given predicate.
Produces a map from objects to subjects for existing edges in the graph for a given predicate.
(get-transitive-edges* os-map)
Retrieves a mapping of all objects to subjects that can be transitively connected by a predicate that was used to retrieve the os-map. os-map: map of objects to subject for existing edges in the graph for a given predicate.
Retrieves a mapping of all objects to subjects that can be transitively connected by a predicate that was used to retrieve the os-map. os-map: map of objects to subject for existing edges in the graph for a given predicate.
Lookup an index in the graph for the requested data, and returns all data where the required predicate is a transitive relationship. Unspecified predicates extend across the graph. Returns a sequence of unlabelled bindings. Each binding is a vector of binding values.
Lookup an index in the graph for the requested data, and returns all data where the required predicate is a transitive relationship. Unspecified predicates extend across the graph. Returns a sequence of unlabelled bindings. Each binding is a vector of binding values.
(graph-transact graph tx-id assertions retractions generated-data)
Common graph transaction operation
Common graph transaction operation
(lowest-level-fn this)
Returns a function for handling the lowest index level retrieval
Returns a function for handling the lowest index level retrieval
(lowest-level-set-fn this)
Returns a function retrieving a lowest level value as a set
Returns a function retrieving a lowest level value as a set
(lowest-level-sets-fn this)
Returns a function retrieving all lowest level values as sets
Returns a function retrieving all lowest level values as sets
(mid-level-map-fn this)
Returns a function that converts the mid->lowest in a simple map
Returns a function that converts the mid->lowest in a simple map
(plain pred)
Inputs: [pred :- Predicate] Returns: Predicate
Converts a transitive-structured predicate into a plain one
Inputs: [pred :- Predicate] Returns: Predicate Converts a transitive-structured predicate into a plain one
(second-last s)
Returns the second-last character in a string.
Returns the second-last character in a string.
(step-by-predicate resolution)
Function to add an extra step to a current resolution. Steps to the 'left' where it finds a new edge where the object is the subject of an existing edge. A single 'step' may traverse multiple edges, if new edges are added during iteration which contain objects that have yet to be processed. resolution: a map of object nodes to sets of subject nodes that they are connected to by the desired predicate
Function to add an extra step to a current resolution. Steps to the 'left' where it finds a new edge where the object is the subject of an existing edge. A single 'step' may traverse multiple edges, if new edges are added during iteration which contain objects that have yet to be processed. resolution: a map of object nodes to sets of subject nodes that they are connected to by the desired predicate
(subvseq v a b)
A subvec wrapper that drops back to sequences when the seq is not a vector
A subvec wrapper that drops back to sequences when the seq is not a vector
Defines how many elements to keep in the transitive cache
Defines how many elements to keep in the transitive cache
(zero-step tag zero result)
Prepend a zero step value if the tag requests it
Prepend a zero step value if the tag requests it
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close