You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8cd5f28
Browse filesBrowse the repository at this point in the historyBrowse files
Class docstring for Graph (so the construction table has a precis), Edge's
cost and data are documented attributes, the precis of edges, Vertex.edges and
edgeto say what they return, cross references that did not resolve, and
typos. The only change to code is the text of an internal error message.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This is read-only. It is set by the ``edge_class`` argument of the
473
-
graph constructor, see :meth:`__init__`, and is :class:`Edge` if not
484
+
graph constructor, see :class:`Graph`, and is :class:`Edge` if not
474
485
given.
475
486
476
487
.. runblock:: pycon
@@ -865,7 +876,7 @@ def add_vertex(
865
876
>>> g['v2']
866
877
867
878
If the graph was constructed with a required ``dim`` (see
868
-
:meth:`Graph.__init__`), every embedded vertex must have a
879
+
:class:`Graph`), every embedded vertex must have a
869
880
coordinate of exactly that length -- adding one of the wrong length
870
881
raises ``ValueError``:
871
882
@@ -1079,7 +1090,7 @@ def add_edge(
1079
1090
>>> e = g.add_edge(MyEdge(v1, v2, data="a road"))
1080
1091
>>> print(type(e).__name__, e.data)
1081
1092
1082
-
.. note:: Vertices have coordinates and the edge ``cost`` defaults to the distance between them, but if the vertices have no coordinates the edge cost must be set explicitly, otherwise it will be ``None`` and path planning will fail with a ``ValueError``. See :meth:`_require_cost` for details.
1093
+
.. note:: Vertices have coordinates and the edge ``cost`` defaults to the distance between them, but if the vertices have no coordinates the edge cost must be set explicitly, otherwise it will be ``None`` and path planning will fail with a ``ValueError``.
1083
1094
1084
1095
.. note:: To supply an edge that does not yet have vertices use
1085
1096
``g.add_edge(v1, v2, edge=e)`` or ``e.connect(v1, v2)``.
0 commit comments