Skip to content

Commit 8de6bd0

Browse files
committed
Rename function parameters of method edgeExists.
1 parent fd306fb commit 8de6bd0

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

lib/src/graph/directed_graph.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ class DirectedGraph<T extends Object> extends DirectedGraphBase<T> {
7272
Set<T> edges(T vertex) => _edges[vertex] ?? <T>{};
7373

7474
@override
75-
bool edgeExists(T vertexOut, T vertexIn) {
76-
if (_edges.containsKey(vertexOut) &&
77-
_edges[vertexOut]!.contains(vertexIn)) {
75+
bool edgeExists(T vertex, T connectedVertex) {
76+
if (_edges.containsKey(vertex) &&
77+
_edges[vertex]!.contains(connectedVertex)) {
7878
return true;
7979
}
8080
return false;

lib/src/graph/directed_graph_base.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ abstract class DirectedGraphBase<T extends Object> extends Iterable<T> {
133133
Set<T> edges(T vertex);
134134

135135
/// Returns `true` if there is an edge pointing from
136-
/// [source] to [target]. Returns `False` otherwise.
137-
bool edgeExists(T source, T target);
136+
/// [vertex] to [connectedVertex]. Returns `false` otherwise.
137+
bool edgeExists(T vertex, T connectedVertex);
138138

139-
/// Returns `true` if `vertex` is a graph vertex.
139+
/// Returns `true` if [vertex] is a graph vertex.
140140
/// Returns `false` otherwise.
141141
bool vertexExists(T vertex);
142142

lib/src/graph/weighted_directed_graph.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ class WeightedDirectedGraph<T extends Object, W extends Comparable>
127127
}
128128

129129
@override
130-
bool edgeExists(T vertexOut, T vertexIn) {
131-
if (_edges.containsKey(vertexOut) &&
132-
_edges[vertexOut]!.containsKey(vertexIn)) {
130+
bool edgeExists(T vertex, T connectedVertex) {
131+
if (_edges.containsKey(vertex) &&
132+
_edges[vertex]!.containsKey(connectedVertex)) {
133133
return true;
134134
}
135135
return false;

0 commit comments

Comments
 (0)