org.mrd.jelly.random
Class Beta

java.lang.Object
  |
  +--org.apache.commons.jelly.TagSupport
        |
        +--org.mrd.jelly.random.DistributionTagBase
              |
              +--org.mrd.jelly.random.Beta
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class Beta
extends DistributionTagBase

This is a random number generation class that produces pseudo-random doubles acording to a configured Beta Distribution. The Distribution is supported by the cern.jet.random.Beta Distribution Class. The distribution can be configured by two strategies 1.) Alpha and Beta parameters can be provided for the distribution. 2.) The mean and standard devation can be provided to configure the distribution. With this strategy alpha and beta are estimated through the equations: alpha = mean{[mean(1-mean)/s^2] - 1} beta = (1-mean) mean{[mean(1-mean)/s^2] - 1}


Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
Beta()
           
 
Method Summary
 void doStartTag(org.apache.commons.jelly.XMLOutput xMLOutput)
          Used by Ant to check if the appropriate attributes have been filled out.
 double getAlpha()
          Getter for property alpha.
 double getBeta()
          Getter for property beta.
 double getMean()
          Getter for property mean.
 double getStd()
          Getter for property std.
 boolean isLimitVariance()
          Getter for property limitVariance.
 void setAlpha(double alpha)
          If used Beta is configured by alpha and beta is also required.
 void setBeta(double beta)
          If used Beta is configured by beta and alpha is also required.
 void setLimitVariance(boolean limitVariance)
          Available when Beta is configured by Mean and Std.
 void setMean(double mean)
          If used Beta is configured byMean and std is also required.
 void setStd(double std)
          If used Beta is configured byMean and mean is also required.
 
Methods inherited from class org.mrd.jelly.random.DistributionTagBase
doBody, doEndTag, doTag, getEngine, getRandomElement, getVar, setEngine, setVar
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Beta

public Beta()
Method Detail

doStartTag

public void doStartTag(org.apache.commons.jelly.XMLOutput xMLOutput)
                throws org.apache.commons.jelly.MissingAttributeException,
                       org.apache.commons.jelly.JellyTagException
Used by Ant to check if the appropriate attributes have been filled out.

Overrides:
doStartTag in class DistributionTagBase
Throws:
BuildException - if attribute is not correctly filled in.
org.apache.commons.jelly.MissingAttributeException
org.apache.commons.jelly.JellyTagException

getMean

public double getMean()
Getter for property mean.

Returns:
Value of property mean.

setMean

public void setMean(double mean)
If used Beta is configured byMean and std is also required. Otherwise, alpha and beta are required.

Parameters:
mean - New value of property mean.

getStd

public double getStd()
Getter for property std.

Returns:
Value of property std.

setStd

public void setStd(double std)
If used Beta is configured byMean and mean is also required. Otherwise, alpha and beta are required.

Parameters:
std - New value of property std.

getAlpha

public double getAlpha()
Getter for property alpha.

Returns:
Value of property alpha.

setAlpha

public void setAlpha(double alpha)
If used Beta is configured by alpha and beta is also required. Otherwise, mean and std are required.

Parameters:
alpha - New value of property alpha.

getBeta

public double getBeta()
Getter for property beta.

Returns:
Value of property beta.

setBeta

public void setBeta(double beta)
If used Beta is configured by beta and alpha is also required. Otherwise, mean and std are required.

Parameters:
beta - New value of property beta.

isLimitVariance

public boolean isLimitVariance()
Getter for property limitVariance.

Returns:
Value of property limitVariance.

setLimitVariance

public void setLimitVariance(boolean limitVariance)
Available when Beta is configured by Mean and Std. Limits the variance acording to the behavior defined in the LimitedBeta Class. Optional.

Parameters:
limitVariance - New value of property limitVariance.


Copyright © 2000-2003 Mark Robert Diggory. All Rights Reserved.