Skip to content

Commit ce4996e

Browse files
making it a non-breaking change
1 parent 90fe758 commit ce4996e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/SwiftGraph/Graph.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ extension Graph {
3939
public var edgeCount: Int {
4040
return edges.joined().count
4141
}
42+
43+
@available(*, deprecated, renamed: "addEdge", message: "Use the addEdge method without the additional directed parameter instead, as the Edge contains already the information about direction. A double specification can only result in inconsistencies and errors.")
44+
func addEdge(_ e: E, directed: Bool = false){
45+
addEdge(e)
46+
}
4247

4348
/// Returns a list of all the edges, undirected edges are only appended once.
4449
public func edgeList() -> [E] {

0 commit comments

Comments
 (0)