X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=inline;f=dev%2Fgraph.lisp;h=3af3c47e52e703c9c21c1f2be2a9fea4759a06c9;hb=704d2802c057c57704629dcd228ead6c5d3c4258;hp=ce450a4d65e3509e124af56d3540ccd40ed4b977;hpb=b3ce2ed9442e84ed2c5e634aeef473892cca0a04;p=cl-graph.git diff --git a/dev/graph.lisp b/dev/graph.lisp index ce450a4..3af3c47 100644 --- a/dev/graph.lisp +++ b/dev/graph.lisp @@ -622,7 +622,14 @@ something is putting something on the vertexes plist's (when error-if-not-found? (error 'graph-vertex-not-found-error :vertex value :graph graph)))) -;;; --------------------------------------------------------------------------- +(defmethod find-vertex ((graph basic-graph) (vertex basic-vertex) + &optional (error-if-not-found? t)) + (cond ((eq graph (graph vertex)) + vertex) + (t + (when error-if-not-found? + (error 'graph-vertex-not-found-error + :vertex vertex :graph graph))))) (defmethod find-vertex ((edge basic-edge) (value t) &optional (error-if-not-found? t))