Liking cljdoc? Tell your friends :D

igraph.core

Abstractions over a graph object, intended to sit alongside the other basic clojure data structures such as maps and sequences.

Abstractions over a graph object, intended to sit alongside the 
other basic clojure data structures such as maps and sequences.
raw docstring

IGraphcljprotocol

An abstraction for S-P-O graphs

An abstraction for S-P-O graphs

subjectsclj

(subjects g)

Returns (<s>...) for <g> Where <s> is a subject in one or more triples in <g> <g> is a graph.

Returns (<s>...) for <g>
Where 
<s> is a subject in one or more triples in <g>
<g> is a graph.

queryclj

(query g q)

Returns #{<binding> ...} for query <q> applied to <g> Where <g> is a graph <query> is a query in a format suitable for querying <g> <binding> := {<var> <value>, ...} <var> is a variable specified in <q> <value> is a value found in <g> bounded to <var> per <q>

Returns #{<binding> ...} for query <q> applied to <g>
Where
<g> is a graph
<query> is a query in a format suitable for querying <g>
<binding> := {<var> <value>, ...}
<var> is a variable specified in <q>
<value> is a value found in <g> bounded to <var> per <q>

subtractclj

(subtract g to-subtract)

Returns <g> with <to-subtract> removed from its contents. Throws an exception if (read-only? <g>) Where <g> is a graph <to-subtract> is in some format interpretable as a set of triples.

Returns <g> with <to-subtract> removed from its contents.
Throws an exception if (read-only? <g>)
Where
<g> is a graph
<to-subtract> is in some format interpretable as a set of triples.

addclj

(add g to-add)

Returns <g>, with <to-add> added to its contents. Throws an exception if (read-only? <g>) Where <g> is a graph <to-add> is in some format interpretable as a set of triples.

Returns <g>, with <to-add> added to its contents.
Throws an exception if (read-only? <g>)
Where
<g> is a graph
<to-add> is in some format interpretable as a set of triples.

get-oclj

(get-o g s p)

Returns {<o> ...} for <s> and <p> in <g>, or nil. Where <g> is a graph <s> is subject of some triples in <g>

<p> is predicate of some triples in <g> <o> appears in triple [<s> <p> <o>] in <g>

Returns {<o> ...} for <s> and <p> in <g>, or nil.
Where
<g> is a graph
<s> is subject of some triples in <g>
<p> is predicate of some triples in <g>
<o> appears in triple [<s> <p> <o>] in <g>

askclj

(ask g s p o)

Returns truthy value iff [<s> <p> <o>] appears in <g> Where <g> is a graph <s> is subject of some triples in <g>

<p> is predicate of some triples in <g> <o> appears in triple [<s> <p> <o>] in <g>

Returns truthy value iff [<s> <p> <o>] appears in <g>
Where
<g> is a graph
<s> is subject of some triples in <g>
<p> is predicate of some triples in <g>
<o> appears in triple [<s> <p> <o>] in <g>

get-p-oclj

(get-p-o g s)

Returns {<p> #{<o> ...}} associated with <s> in <g>, or nil. Where <g> is a graph <s> is subject

<p> and <o> are in triples := [<s> <p> <o>] in <g>

Returns {<p> #{<o> ...}} associated with <s> in <g>, or nil.
Where
<g> is a graph
<s> is subject 
<p> and <o> are in triples := [<s> <p> <o>] in <g>

normal-formclj

(normal-form g)

Returns {<s> {<p> #{<o>...}...}...} Where <s> is the subject of a triple := [<s> <p> <o>] in <g>

<p> is predicate of same <o> is the object of same

Returns {<s> {<p> #{<o>...}...}...}
Where 
<s> is the subject of a triple := [<s> <p> <o>] in <g>
<p> is predicate of same
<o> is the object of same

read-only?clj

(read-only? g)

Returns true if the membership of <g> is static and add/subtract functions will throw an exception. This may hold for example when <g> is a public endpoint for which write permission is denied

Returns true if the membership of <g> is static 
and add/subtract functions will throw an exception. This 
may hold for example when <g> is a public endpoint for which write 
permission is denied

invokeclj

(invoke g)
(invoke g s)
(invoke g s p)
(invoke g s p o)

Applies <g> as a function to the rest of its arguments, representing triples [<s> <p> <o>] in <g> respectively. (g) -> {<s> {<p> #{<o>...}...}...} ;; = (normal-form <g>) (g s) -> {<p> #{<o>...}, ...} ;; = (get-p-o <g>) (g s p) -> #{<o> ...} ;; = (get-o <g>) (g s p o) -> <o> iff [<s> <p> <o>] is in <g> ;; = (ask <g> <s> <p> <o>)

Applies <g> as a function to the rest of its arguments, representing 
   triples [<s> <p> <o>] in <g> respectively.
(g) -> {<s> {<p> #{<o>...}...}...} ;; = (normal-form <g>)
(g s) -> {<p> #{<o>...}, ...} ;; = (get-p-o <g>)
(g s p) -> #{<o> ...} ;; = (get-o <g>)
(g s p o) -> <o> iff [<s> <p> <o>] is in <g> ;; = (ask <g> <s> <p> <o>)
sourceraw docstring

ISetcljprotocol

Basic set operations between graphs.

Basic set operations between graphs.

differenceclj

(difference g1 g2)

Returns an IGraph whose normal form contains all statements in g1 not present in g2.

Returns an IGraph whose normal form contains all statements in g1 not present in g2.

intersectionclj

(intersection g1 g2)

Returns an IGraph whose normal form contains all and only statements shared by both g1 and g2

Returns an IGraph whose normal form contains all and only statements shared by both g1 and g2

unionclj

(union g1 g2)

Returns an IGraph whose normal form contains all triples from g1 and g2

Returns an IGraph whose normal form contains all triples from g1 and g2
sourceraw docstring

normal-form?clj

(normal-form? m)
source

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

× close