Skip to content

Commit b50dc6f

Browse files
committed
doc: add @ivar fields for Vertex and Edge, refs igraph#813
1 parent 4f6964a commit b50dc6f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/_igraph/edgeobject.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,15 @@ PyDoc_STRVAR(
724724
" >>> e[\"weight\"] = 2 #doctest: +SKIP\n"
725725
" >>> print(e[\"weight\"]) #doctest: +SKIP\n"
726726
" 2\n"
727+
"\n"
728+
"@ivar source: Source vertex index of this edge\n"
729+
"@ivar source_vertex: Source vertex of this edge\n"
730+
"@ivar target: Target vertex index of this edge\n"
731+
"@ivar target_vertex: Target vertex of this edge\n"
732+
"@ivar tuple: Source and target vertex index of this edge as a tuple\n"
733+
"@ivar vertex_tuple: Source and target vertex of this edge as a tuple\n"
734+
"@ivar index: Index of this edge\n"
735+
"@ivar graph: The graph the edge belongs to\t"
727736
);
728737

729738
int igraphmodule_Edge_register_type() {

src/_igraph/vertexobject.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,9 @@ PyDoc_STRVAR(
875875
" >>> v[\"color\"] = \"red\" #doctest: +SKIP\n"
876876
" >>> print(v[\"color\"]) #doctest: +SKIP\n"
877877
" red\n"
878+
"\n"
879+
"@ivar index: Index of the vertex\n"
880+
"@ivar graph: The graph the vertex belongs to\t"
878881
);
879882

880883
int igraphmodule_Vertex_register_type() {

0 commit comments

Comments
 (0)