From 1920c4e590bc186e5b51a2f57a3ffe826c40bbdb Mon Sep 17 00:00:00 2001 From: jpowell11 Date: Wed, 13 Mar 2024 18:30:18 -0500 Subject: [PATCH 1/2] Added clarification to the get_shortest_path() documentation --- src/_igraph/graphobject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/_igraph/graphobject.c b/src/_igraph/graphobject.c index c79b4b479..b10be661f 100644 --- a/src/_igraph/graphobject.c +++ b/src/_igraph/graphobject.c @@ -15122,6 +15122,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { METH_VARARGS | METH_KEYWORDS, "get_shortest_path(v, to, weights=None, mode=\"out\", output=\"vpath\", algorithm=\"auto\")\n--\n\n" "Calculates the shortest path from a source vertex to a target vertex in a graph.\n\n" + "This function only returns a single shortest path, to find all shortest paths consider using L{get_shortest_paths()}.\n\n" "@param v: the source vertex of the path\n" "@param to: the target vertex of the path\n" "@param weights: edge weights in a list or the name of an edge attribute\n" @@ -15139,7 +15140,8 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { " algorithm automatically based on whether the graph has negative weights\n" " or not. C{\"dijkstra\"} uses Dijkstra's algorithm. C{\"bellman_ford\"}\n" " uses the Bellman-Ford algorithm. Ignored for unweighted graphs.\n" - "@return: see the documentation of the C{output} parameter.\n"}, + "@return: see the documentation of the C{output} parameter.\n" + "@see: L{get_shortest_paths()}\n"}, /* interface to igraph_get_shortest_paths */ {"get_shortest_paths", (PyCFunction) igraphmodule_Graph_get_shortest_paths, From b556e98fe983b5f4a4dd4c86b07ea7d0b73030ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Nepusz?= Date: Thu, 14 Mar 2024 17:03:48 +0100 Subject: [PATCH 2/2] doc: word wrapping in improved get_shortest_path() docs for the console --- src/_igraph/graphobject.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_igraph/graphobject.c b/src/_igraph/graphobject.c index b10be661f..44b617cf4 100644 --- a/src/_igraph/graphobject.c +++ b/src/_igraph/graphobject.c @@ -15122,7 +15122,8 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { METH_VARARGS | METH_KEYWORDS, "get_shortest_path(v, to, weights=None, mode=\"out\", output=\"vpath\", algorithm=\"auto\")\n--\n\n" "Calculates the shortest path from a source vertex to a target vertex in a graph.\n\n" - "This function only returns a single shortest path, to find all shortest paths consider using L{get_shortest_paths()}.\n\n" + "This function only returns a single shortest path. Consider using L{get_shortest_paths()}\n" + "to find all shortest paths between a source and one or more target vertices.\n\n" "@param v: the source vertex of the path\n" "@param to: the target vertex of the path\n" "@param weights: edge weights in a list or the name of an edge attribute\n"