Created
February 13, 2016 02:35
-
-
Save zntfdr/f888bc6febbe24013ca5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Connection { | |
let to: Node | |
let weight: Int | |
init(to toNode: Node, weight: Int) { | |
assert(weight >= 0, "connection weight has to be equal or greater than zero") | |
self.to = toNode | |
self.weight = weight | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment