Skip to content

Instantly share code, notes, and snippets.

@klgraham
Last active March 25, 2016 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klgraham/25f4c313268ec2535791 to your computer and use it in GitHub Desktop.
Save klgraham/25f4c313268ec2535791 to your computer and use it in GitHub Desktop.
protocol Stochastic {
// the type of value stored in the distribution
associatedtype ValueType
// Sample a single value from the distribution
func get() -> ValueType
// Sample n values from the distribution
func sample(n: Int) -> [ValueType]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment