On this page:
graph-named?
graph-empty?
graph-has-duplicates?
graph-count
graph-order
graph->distinct-graph

8.2 Graph Predicates & Properties🔗ℹ

predicate

(graph-named? val)  boolean?

  val : graph?
Return #t if graph was created as a named graph.

predicate

(graph-empty? val)  boolean?

  val : graph?
Return #t if this graph contains no statements.

predicate

(graph-has-duplicates? val)  boolean?

  val : graph?
Returns #t if the graph has duplicate statements.

procedure

(graph-count graph)  exact-positive-integer?

  graph : graph?
Returns the number of statements in the graph, this does not take into account whether there are duplicate statements.

procedure

(graph-order graph)  exact-positive-integer?

  graph : graph?
Returns the order of the graph, or the number of vertices. For RDF a vertex is defined as any resource? or blank-node? in the graph.

procedure

(graph->distinct-graph graph)  graph?

  graph : graph?
Returns a new graph where the list of statements in the source graph have been removed. The name of the source is also preserved in the new copy.