|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjecthydroScalingAPI.util.probability.BinaryDistribution
public class BinaryDistribution
An implementation of DiscreteDistribution
using a binary distribution P(a) = p and P(b)= 1-p
| Constructor Summary | |
|---|---|
BinaryDistribution(int n0,
int n1,
double p0)
Creates a new instance of BinaryDistribution |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
Tests for the class |
int |
sample()
Returns a random value that follows a binary distribution |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BinaryDistribution(int n0,
int n1,
double p0)
n0 - The first possible outcomen1 - The second possible outcomep0 - The probability to return the first possible outcome| Method Detail |
|---|
public int sample()
sample in interface DiscreteDistributionpublic static void main(java.lang.String[] args)
args - the command line arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
CUENCAS was initially developed by Ricardo Mantilla at the University of Colorado under the supervision of Dr. Vijay K. Gupta. We wish to recognize the support from the National Science Fundation.