Changeset 27212 in project


Ignore:
Timestamp:
08/06/12 08:48:24 (9 years ago)
Author:
Ivan Raikov
Message:

graph-dfs: added test case for dfs-depth

Location:
release/4/graph-dfs/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/graph-dfs/trunk/graph-dfs.scm

    r24533 r27212  
    105105;; successors of each node
    106106(define (graph-dfs-depth g roots)
     107
    107108  (define n        ((g 'capacity)))
    108109  (define dfsnum   (make-s32vector n -1))
  • release/4/graph-dfs/trunk/graph-dfs.setup

    r24533 r27212  
    1616
    1717  ; Assoc list with properties for your extension:
    18   `((version 1.11)
     18  `((version 1.12)
    1919    ))
    2020
  • release/4/graph-dfs/trunk/tests/run.scm

    r24533 r27212  
    44;; library dependency example.
    55;;
    6 ;; Copyright 2007-2010 Ivan Raikov and the Okinawa Institute of Science and Technology.
     6;; Copyright 2007-2012 Ivan Raikov and the Okinawa Institute of Science and Technology.
    77;;
    88;; This program is free software: you can redistribute it and/or modify
     
    116116                 (edge (11 12 "zag_cpp->zag_o")) (edge (2 9 "boz_h->zig_cpp"))
    117117                 (edge (9 10 "zig_cpp->zig_o")) (edge (2 6 "boz_h->bar_cpp"))
    118                  (edge (6 7 "bar_cpp->bar_o")) (edge (0 1 "dax_h->yow_h")))))))
     118                 (edge (6 7 "bar_cpp->bar_o")) (edge (0 1 "dax_h->yow_h"))))))
     119
     120    (test "DFS depth"
     121     (graph-dfs-depth g  roots)
     122     (s32vector 0 1 0 0 1 2 1 2 3 1 2 1 2 4 5))
     123
     124    )
    119125  ))
    120126
Note: See TracChangeset for help on using the changeset viewer.