-
Notifications
You must be signed in to change notification settings - Fork 80
removal of potentially harmful parameter. #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
90fe758
ce4996e
941dea6
ad7a2eb
43cca35
49dcb08
970a0b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -39,6 +39,11 @@ extension Graph { | |||||
public var edgeCount: Int { | ||||||
return edges.joined().count | ||||||
} | ||||||
|
||||||
@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.") | ||||||
func addEdge(_ e: E, directed: Bool = false){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually, you found an outdated version. I removed the default value (false) in the latest version. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without the default value there is a more clear distinction between the one-parameter version and the 2-parameter. And there is no confusion that you use the one-parameter version when you leave out the default parameter - and not using the default value There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. formatting updated. |
||||||
addEdge(e) | ||||||
} | ||||||
|
||||||
/// Returns a list of all the edges, undirected edges are only appended once. | ||||||
public func edgeList() -> [E] { | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.