Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.metacosm.framework.random
Class GaussianDistributionLaw  view GaussianDistributionLaw download GaussianDistributionLaw.java

java.lang.Object
  extended byorg.metacosm.framework.random.GaussianDistributionLaw
All Implemented Interfaces:
DistributionLaw, org.metacosm.framework.persistence.Persistent, java.io.Serializable

public class GaussianDistributionLaw
extends java.lang.Object
implements DistributionLaw

Gaussian distribution law with specified mean and standard deviation Standard is normal law with mean 0.0 and standard deviation 1.0.


Field Summary
private  double deviation
           
private  double mean
           
private  java.lang.Class type
           
 
Constructor Summary
GaussianDistributionLaw(java.lang.Class type)
           
GaussianDistributionLaw(java.lang.Class type, double mean, double deviation)
           
 
Method Summary
 void load(java.io.InputStream is)
          Loads from the stream.
 java.lang.Object nextValue()
           
 void save(java.io.OutputStream os)
          Saves on the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

private java.lang.Class type

mean

private double mean

deviation

private double deviation
Constructor Detail

GaussianDistributionLaw

public GaussianDistributionLaw(java.lang.Class type)
                        throws java.lang.IllegalArgumentException

GaussianDistributionLaw

public GaussianDistributionLaw(java.lang.Class type,
                               double mean,
                               double deviation)
                        throws java.lang.IllegalArgumentException
Method Detail

nextValue

public java.lang.Object nextValue()
Specified by:
nextValue in interface DistributionLaw

save

public void save(java.io.OutputStream os)
          throws java.io.IOException
Description copied from interface: org.metacosm.framework.persistence.Persistent
Saves on the stream.

Specified by:
save in interface org.metacosm.framework.persistence.Persistent

load

public void load(java.io.InputStream is)
          throws java.io.IOException
Description copied from interface: org.metacosm.framework.persistence.Persistent
Loads from the stream.

Specified by:
load in interface org.metacosm.framework.persistence.Persistent