Skip to content

Commit

Permalink
doc: GraphVertex and GraphEdge can be erased by calling free()
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Xrayez committed Feb 20, 2022
1 parent 7e7e329 commit 19a78e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/Graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,15 @@
<argument index="0" name="edge" type="GraphEdge" />
<description>
Removes an edge from the graph. If the graph is simple, you could find an edge with [method find_edge] first, and then remove it.
Alternatively, you can also remove the edge by calling [method Object.free] on it.
</description>
</method>
<method name="remove_vertex">
<return type="void" />
<argument index="0" name="vertex" type="GraphVertex" />
<description>
Removes the specified vertex from the graph. All edges that are connected to the vertex will be automatically deleted.
Alternatively, you can also remove the vertex by calling [method Object.free] on it.
</description>
</method>
<method name="set_iterator_bfs">
Expand Down
1 change: 1 addition & 0 deletions doc/GraphEdge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</brief_description>
<description>
An edge connects two [GraphVertex] vertices together. The edge's direction is determined by whether it was added via [method Graph.add_edge] or [method Graph.add_directed_edge]. If the edge is directed, then [member a] and [member b] must be interpreted as endpoints of an arrow pointing [i]from[/i] a vertex [i]to[/i] another.
You can call [method Object.free] to remove this edge from the [Graph] it belongs to.
</description>
<tutorials>
</tutorials>
Expand Down
1 change: 1 addition & 0 deletions doc/GraphVertex.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
print(e.a, " ", e.b)
[/codeblock]
If you need to traverse the graph without producing duplicates, you may also consider using graph's default [member Graph.iterator].
You can call [method Object.free] to remove this vertex from the [Graph] it belongs to.
</description>
<tutorials>
</tutorials>
Expand Down

0 comments on commit 19a78e4

Please sign in to comment.