Show More
@@ -9,10 +9,11 b' import heapq' | |||
|
9 | 9 | |
|
10 | 10 | def ancestor(a, b, pfunc): |
|
11 | 11 | """ |
|
12 |
return |
|
|
13 | is no such ancestor. | |
|
12 | return a minimal-distance ancestor of nodes a and b, or None if there is no | |
|
13 | such ancestor. Note that there can be several ancestors with the same | |
|
14 | (minimal) distance, and the one returned is arbitrary. | |
|
14 | 15 | |
|
15 | pfunc must return a list of parent vertices | |
|
16 | pfunc must return a list of parent vertices for a given vertex | |
|
16 | 17 | """ |
|
17 | 18 | |
|
18 | 19 | if a == b: |
General Comments 0
You need to be logged in to leave comments.
Login now