@@ -32,33 +32,26 @@ Constructor for QgsGraphEdge.
32
32
QVariant cost( int strategyIndex ) const;
33
33
%Docstring
34
34
Returns edge cost calculated using specified strategy
35
- :param strategyIndex: strategy index
36
35
37
- :rtype: QVariant
36
+ :param strategyIndex: strategy index
38
37
%End
39
38
40
39
QVector< QVariant > strategies() const;
41
40
%Docstring
42
41
Returns array of available strategies
43
-
44
- :rtype: list of QVariant
45
42
%End
46
43
47
44
int toVertex() const;
48
45
%Docstring
49
46
Returns the index of the vertex at the end of this edge.
50
47
51
- :rtype: int
52
-
53
48
.. seealso:: :py:func:`fromVertex()`
54
49
%End
55
50
56
51
int fromVertex() const;
57
52
%Docstring
58
53
Returns the index of the vertex at the start of this edge.
59
54
60
- :rtype: int
61
-
62
55
.. seealso:: :py:func:`toVertex()`
63
56
%End
64
57
@@ -95,25 +88,19 @@ This constructor initializes QgsGraphVertex object and associates a vertex with
95
88
%Docstring
96
89
Returns the incoming edge ids, i.e. edges which end at this node.
97
90
98
- :rtype: QgsGraphEdgeIds
99
-
100
91
.. seealso:: :py:func:`outgoingEdges()`
101
92
%End
102
93
103
94
QgsGraphEdgeIds outgoingEdges() const;
104
95
%Docstring
105
96
Returns outgoing edge ids, i.e. edges which start at this node.
106
97
107
- :rtype: QgsGraphEdgeIds
108
-
109
98
.. seealso:: :py:func:`incomingEdges()`
110
99
%End
111
100
112
101
QgsPointXY point() const;
113
102
%Docstring
114
103
Returns point associated with graph vertex.
115
-
116
- :rtype: QgsPointXY
117
104
%End
118
105
119
106
};
@@ -141,53 +128,39 @@ Constructor for QgsGraph.
141
128
int addVertex( const QgsPointXY &pt );
142
129
%Docstring
143
130
Add a vertex to the graph
144
-
145
- :rtype: int
146
131
%End
147
132
148
133
int addEdge( int fromVertexIdx, int toVertexIdx, const QVector< QVariant > &strategies );
149
134
%Docstring
150
135
Add an edge to the graph, going from the ``fromVertexIdx``
151
136
to ``toVertexIdx``.
152
-
153
- :rtype: int
154
137
%End
155
138
156
139
int vertexCount() const;
157
140
%Docstring
158
141
Returns number of graph vertices
159
-
160
- :rtype: int
161
142
%End
162
143
163
144
const QgsGraphVertex &vertex( int idx ) const;
164
145
%Docstring
165
146
Returns vertex at given index
166
-
167
- :rtype: QgsGraphVertex
168
147
%End
169
148
170
149
int edgeCount() const;
171
150
%Docstring
172
151
Returns number of graph edges
173
-
174
- :rtype: int
175
152
%End
176
153
177
154
const QgsGraphEdge &edge( int idx ) const;
178
155
%Docstring
179
156
Returns edge at given index
180
-
181
- :rtype: QgsGraphEdge
182
157
%End
183
158
184
159
int findVertex( const QgsPointXY &pt ) const;
185
160
%Docstring
186
161
Find vertex by associated point
187
162
188
163
:return: vertex index
189
- :rtype: int
190
-
191
164
%End
192
165
193
166
};
0 commit comments