hydroScalingAPI.util.probability
Class ScaleDependentSequenceDistribution

java.lang.Object
  extended by hydroScalingAPI.util.probability.ScaleDependentSequenceDistribution
All Implemented Interfaces:
ScaleDependentDiscreteDistribution

public class ScaleDependentSequenceDistribution
extends java.lang.Object
implements ScaleDependentDiscreteDistribution

An implementation of DiscreteDistribution using a binary distribution P(a) = p and P(b)= 1-p

Author:
Ricardo Mantilla

Constructor Summary
ScaleDependentSequenceDistribution(int[] seq)
          Creates a new instance of BinaryDistribution
 
Method Summary
static void main(java.lang.String[] args)
          Tests for the class
 int sample(int scale)
          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

ScaleDependentSequenceDistribution

public ScaleDependentSequenceDistribution(int[] seq)
Creates a new instance of BinaryDistribution

Parameters:
n0 - The first possible outcome
n1 - The second possible outcome
p0 - The probability to return the first possible outcome
Method Detail

sample

public int sample(int scale)
Returns a random value that follows a binary distribution

Specified by:
sample in interface ScaleDependentDiscreteDistribution
Returns:
A random value

main

public static void main(java.lang.String[] args)
Tests for the class

Parameters:
args - the command line arguments


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.