Skip to content

Instantly share code, notes, and snippets.

@zntfdr
Created February 13, 2016 02:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save zntfdr/f888bc6febbe24013ca5 to your computer and use it in GitHub Desktop.
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