pick_random_event: Takes a probability distribution of events and returns which...

Description Usage Arguments Value

Description

Takes a probability distribution of events and returns which event happened based on those probabilities

Usage

1

Arguments

distribution

A vector p where pi denotes the relative probability of event i

Value

An index i (to denote that event i took place)


sams25/rcombinator_old documentation built on May 28, 2019, 8:40 a.m.