-(in-package cl-graph)
+(in-package #:cl-graph)
;;; ---------------------------------------------------------------------------
;;; API
;;; ---------------------------------------------------------------------------
-(defgeneric make-graph (graph-type &key)
+(defgeneric make-graph (graph-type &key &allow-other-keys)
(:documentation "Create a new graph of type `graph-type'. Graph type can be
a symbol naming a sub-class of basic-graph or a list. If it is a list of symbols naming
different classes. If graph-type is a list, then a class which has all of the listed
(defgeneric add-edge-between-vertexes (graph value-or-vertex-1 value-or-vertex-2
&rest args &key if-duplicate-do
- edge-type)
+ edge-type &allow-other-keys)
(:documentation "Adds an edge between two vertexes and returns it.
If force-new? is true,
the edge is added even if one already exists.
;;; ---------------------------------------------------------------------------
-(defgeneric add-vertex (graph value-or-vertex &key if-duplicate-do)
+(defgeneric add-vertex (graph value-or-vertex &key if-duplicate-do &allow-other-keys)
(:documentation "Adds a vertex to a graph. If called with a vertex, then this vertex is added. If called with a value, then a new vertex is created to hold the value. If-duplicate-do can be one of :ignore, :force, :replace, :replace-value or a function. The default is :ignore."))
;;; ---------------------------------------------------------------------------
;;; ---------------------------------------------------------------------------
-(defgeneric generate-Gnm (generator graph n m &key)
+(defgeneric generate-gnm (generator graph n m &key)
(:documentation "Generate a 'classic' random graph G(n, m) with n vertexes and m edges."))
;;; ---------------------------------------------------------------------------
-(defgeneric generate-Gnp (generator graph n p &key)
+(defgeneric generate-gnp (generator graph n p &key)
(:documentation "Generate the Erd\"os-R\'enyi random graph G\(n, p\). I.e., a graph with n vertexes where
each possible edge appears with probability p. This implementation is from Efficient Generation
of Large Random Networks \(see batagelj-generation-2005 in doab\)."))