manual: Add the functions from Generic Graph Interface.

This commit is contained in:
Sergiu Ivanov 2022-01-01 16:42:43 +01:00
parent a8345b1920
commit 5bb17b4c28
1 changed files with 23 additions and 1 deletions

View File

@ -1,6 +1,9 @@
#lang scribble/manual
@(require (for-label (only-in typed/racket require/typed require/typed/provide))
@(require (for-label (only-in typed/racket
require/typed require/typed/provide
Any Boolean Void Sequenceof Listof List U False
Mutable-HashTable Immutable-HashTable))
(for-label (only-in graph (graph? g:graph?)))
(for-label typed/graph))
@ -65,6 +68,25 @@ The opaque type corresponding to the predicate @racketlink[g:graph? "graph?"].
@subsection{Generic Graph Interface}
@defproc[(has-vertex? [g Graph] [v Any]) Boolean]{}
@defproc[(has-edge? [g Graph] [u Any] [v Any]) Boolean]{}
@defproc[(vertex=? [g Graph] [u Any] [v Any]) Boolean]{}
@defproc[(add-vertex! [g Graph] [v Any]) Void]{}
@defproc[(remove-vertex! [g Graph] [v Any]) Void]{}
@defproc[(rename-vertex! [g Graph] [old Any] [new Any]) Void]{}
@defproc[(add-edge! [g Graph] [u Any] [v Any] [weight Any 'default-value]) Void]{}
@defproc[(add-directed-edge! [g Graph] [u Any] [v Any] [weight Any 'default-value]) Void]{}
@defproc[(remove-edge! [g Graph] [u Any] [v Any]) Void]{}
@defproc[(remove-directed-edge! [g Graph] [u Any] [v Any]) Void]{}
@defproc[(get-vertices [g Graph]) (Listof Any)]{}
@defproc[(in-vertices [g Graph]) (Sequenceof Any)]{}
@defproc[(get-neighbors [g Graph] [v Any]) (Listof Any)]{}
@defproc[(in-neighbors [g Graph] [v Any]) (Sequenceof Any)]{}
@defproc[(get-edges [g Graph]) (U (Listof (List Any Any)) (Listof (List Any Any Any)))]{}
@defproc[(in-edges [g Graph]) (Sequenceof (U (List Any Any) (List Any Any Any)))]{}
@defproc[(edge-weight [g Graph] [u Any] [v Any] [#:default default Any +inf.0]) Any]{}
@defproc[(transpose [g Graph]) Graph]{}
@defproc[(graph-copy [g Graph]) Graph]{}
@defproc[(graph-union! [g Graph] [other Graph]) Void]{}
@section{License}