Action:

Returns a list of all the kinds on a vertex or edge.


Filename:

kern/kern_scm/graph_scm.cxx


Syntax:

(graph:kinds? ingraph item1 [item2])


Arg Types:

ingraph

graph


item1

string  entity


item2

entity


Returns:

boolean


Description:

Given a graph and a vertex or edge, returns a list containing all kinds on that vertex or edge. A graph can have any number of
kind types assigned to edges of the graph.
kind is an integer for the type and can take a Boolean value. If not specified, it is assumed to be
#f. The assignment of
kind and its value is done on a per edge basis.



ingraph specifies a graph.



item1 could be either a string or an entity. When it is a string, it is tested to see whether it represents the name of an edge in the graph or a vertex in the graph.



item2 is only used when
item1 is an entity representing a vertex, in which case
item2 must also be an entity representing a vertex.


Example:

; graph:kinds?


; Create some simple graphs.


(define g (graph "ab bc cd ce"))


;; g


(graph:setkind g 3 #t "ab")


;; #[graph "ab bc cd ce"]


(graph:setkind g 3 #t "bc")


;; #[graph "ab bc cd ce"]


(graph:kinds? g "ab")


;; (#f #f #f #t)


(graph:kinds? g "bc")


;; (#f #f #f #t)


(graph:kinds? g "cd")


;; ()
