Skip to content

Instantly share code, notes, and snippets.

@zntfdr
Created February 13, 2016 02:35
Show Gist options
  • Save zntfdr/f888bc6febbe24013ca5 to your computer and use it in GitHub Desktop.
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