add-vertex ( vertex edges graph -- )

Factor handbook » The language » Collections » Directed graph utilities

Factor handbook » The language » Collections » Directed graph utilities

Next: | remove-vertex ( vertex edges graph -- ) |

Vocabulary

graphs

Inputs

Outputs

None

Word description

Adds a vertex to a directed graph, with edges as the outward edges from the vertex.

Side effects

Modifies graph

Definition

graphs

Inputs

vertex | an object |

edges | a sequence |

graph | an assoc mapping vertices to hash-set of edges |

Outputs

None

Word description

Adds a vertex to a directed graph, with edges as the outward edges from the vertex.

Side effects

Modifies graph

Definition