Commit Graph

3 Commits

Author SHA1 Message Date
Johan T. Halseth
25de66d27b
autopilot/interface+choice: add NodeScore type
We create a new type NodeScore which is a tuple (NodeID, score). The
weightedChoice and chooseN algorithms are altered to expect this type.

This is done in order to simplify the types we are using, since we were
only using a subset of the fields in AttachmentDirective.
2019-01-08 10:23:48 +01:00
Johan T. Halseth
902d6edad2
autopilot/choice: add weightedChoice tests 2018-12-19 08:27:35 +01:00
Johan T. Halseth
3d2a39a18c
autopilot/choice_test: add chooseN tests 2018-12-19 08:27:34 +01:00