ca.nengo.math.impl
Class PoissonPDF

java.lang.Object
  extended by ca.nengo.math.impl.AbstractFunction
      extended by ca.nengo.math.impl.PoissonPDF
All Implemented Interfaces:
Function, PDF, java.io.Serializable, java.lang.Cloneable

public class PoissonPDF
extends AbstractFunction
implements PDF

A Poisson distribution.

Author:
Bryan Tripp
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ca.nengo.math.impl.AbstractFunction
DIMENSION_PROPERTY
 
Constructor Summary
PoissonPDF(float rate)
           
 
Method Summary
 PDF clone()
           
 float map(float[] from)
           
 float[] sample()
           
 
Methods inherited from class ca.nengo.math.impl.AbstractFunction
getDimension, multiMap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ca.nengo.math.Function
getDimension, multiMap
 

Constructor Detail

PoissonPDF

public PoissonPDF(float rate)
Parameters:
rate - The mean & variance of the distribution
Method Detail

map

public float map(float[] from)
Specified by:
map in interface Function
Specified by:
map in class AbstractFunction
Parameters:
from - Must have same length as getDimension()
Returns:
result of function operation on arg
See Also:
AbstractFunction.map(float[])

sample

public float[] sample()
Specified by:
sample in interface PDF
Returns:
A random sample from this density
See Also:
PDF.sample()

clone

public PDF clone()
          throws java.lang.CloneNotSupportedException
Specified by:
clone in interface Function
Specified by:
clone in interface PDF
Overrides:
clone in class AbstractFunction
Throws:
java.lang.CloneNotSupportedException
See Also:
Object.clone()