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

http://github.com/abeaumont/factor · Factor · 22 lines · 11 code · 9 blank · 2 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. USING: accessors kernel graph-theory ;
  4. IN: graph-theory.reversals
  5. TUPLE: reversal graph ;
  6. GENERIC: reverse-graph ( graph -- reversal )
  7. M: graph reverse-graph reversal boa ;
  8. M: reversal reverse-graph graph>> ;
  9. INSTANCE: reversal graph
  10. M: reversal vertices
  11. graph>> vertices ;
  12. M: reversal adj?
  13. swapd graph>> adj? ;