Graph mapping. Map a graph to another one.
Signature for the source graph.
Signature for the destination graph.
Provide a mapping function from a mapping of vertices.
map f g applies f to each vertex of g and so builds a new graph based on g
map f g
f
g
filter_map f g applies f to each vertex of g and so builds a new graph based on g; if None is returned by f the vertex is omitted in the new graph.
filter_map f g
None
Provide a mapping function from a mapping of edges.
map f g applies f to each edge of g and so builds a new graph based on g
filter_map f g applies f to each edge of g and so builds a new graph based on g; if None is returned by f the edge is omitted in the new graph.