Back

mapped-by (clj)

(source)

function

(mapped-by f g)
Returns a Graph or a DiGraph which has as nodeset (set (map f (nodes g)). An edge [uu, vv] is an edge in the resulting graph iff g has an edge [u, v] such that [uu, vv] = [(f u), (f v)].

Examples