PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/unmaintained/graph-theory/reversals/reversals.factor

http://github.com/abeaumont/factor
Unknown | 22 lines | 13 code | 9 blank | 0 comment | 0 complexity | 6b49208a4fe887493db3d53986850166 MD5 | raw file
 1! Copyright (C) 2008 William Schlieper <schlieper@unc.edu>
 2! See http://factorcode.org/license.txt for BSD license.
 3
 4USING: accessors kernel graph-theory ;
 5
 6IN: graph-theory.reversals
 7
 8TUPLE: reversal graph ;
 9
10GENERIC: reverse-graph ( graph -- reversal )
11
12M: graph reverse-graph reversal boa ;
13
14M: reversal reverse-graph graph>> ;
15
16INSTANCE: reversal graph
17
18M: reversal vertices
19    graph>> vertices ;
20
21M: reversal adj?
22    swapd graph>> adj? ;