manual: Add matrix->matrix-graph and matrix-graph->graph.

This commit is contained in:
Sergiu Ivanov 2022-01-01 23:48:53 +01:00
parent c6f1a156a6
commit 4c34a65f21
1 changed files with 9 additions and 1 deletions

View File

@ -4,6 +4,7 @@
require/typed require/typed/provide
Any Boolean Void Sequenceof Listof List U False
Mutable-HashTable Immutable-HashTable))
(for-label (only-in math/matrix Matrix))
(for-label (only-in graph (matrix-graph? g:matrix-graph?)))
(for-label typed/graph))
@ -106,7 +107,14 @@ The opaque type corresponding to the predicate @racketlink[g:matrix-graph? "matr
@defproc[(undirected-graph [edges (Listof (List Any Any))] [wgts (Listof Any) #f]) Graph]{}
@defproc[(directed-graph [edges (Listof (List Any Any))] [wgts (Listof Any) #f]) Graph]{}
@defproc[(matrix-graph? [g Graph]) Boolean]{}
@defproc[(matrix->matrix-graph [mtx (Matrix Any)]) Matrix-Graph]{}
@defproc[(matrix-graph->graph [g Matrix-Graph]) Graph]{
An explicit conversion between @racket[Matrix-Graph] and @racket[Graph].
This is necessary to use the general functions of the typed interface with
matrix graphs.
}
@section{License}