Probabilistic Router
class ProbabilisticRouter(picker: RElementIfc<QObjectReceiverIfc>, knownDestinations: List<QObjectReceiverIfc>) : Router(source)
Routes each arriving QObject to a receiver chosen at random by picker. The knownDestinations make the random choice introspectable for the network graph (the picker alone does not expose its elements). Supply a picker — such as an ksl.modeling.elements.REmpiricalList — over the same destinations.
Parameters
picker
the random element provider that selects the next receiver
known Destinations
the receivers the picker chooses among, for graph introspection
Functions
Link copied to clipboard
The possible destinations this router may select, for graph introspection.
Link copied to clipboard
Selects the receiver for the supplied qObject. Implementations must return a non-null receiver; supply a default/fallback to guarantee this.