(defgeneric edges (graph)

(:documentation "Returns the set of all edges in GRAPH."))

+(defmethod empty? ((collection graph))

+ (empty? (nodes collection)))

(defgeneric connected? (graph)

(:documentation "Returns T if there is a path from any node in GRAPH

to any other node. Returns NIL otherwise."))

(defgeneric add-edge (graph node1 node2 &rest options &key

+(defgeneric add-edges (graph source targets &rest options &key

+ (:method ((graph graph)

+ &rest options &key &allow-other-keys)

+ (declare (ignore source targets options))

+ (:method ((graph graph)

+ &rest options &key &allow-other-keys)

+ graph source (car targets)

(defgeneric find-edges (graph &rest options &key source target

(:documentation "Returns the set of all edges in GRAPH that

(defgeneric graph-cross-product (graph1 graph2))

+(defgeneric depth-first-search (graph source target &optional

+ (:documentation "Returns a path (if there is one) from SOURCE to

+ TARGET in GRAPH and NIL of there is none. The path is found via

+(defgeneric breadth-first-search (graph source target &optional

+ (:documentation "Returns a path (if there is one) from SOURCE to

+ TARGET in GRAPH and NIL of there is none. The path is found via

+ breadth first search."))

(defgeneric normal-spanning-tree (graph root &optional predicate)

(:documentation "Returns a normal spanning tree of GRAPH with root