implement and test Vertex.{ancestor,descendant}