edu.ksu.cis.bnj.bbn
Class BBNPDF

java.lang.Object
  extended byedu.ksu.cis.bnj.bbn.BBNPDF
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
BBNConstant

public class BBNPDF
extends java.lang.Object
implements java.lang.Cloneable

Conditional Probability Function wrapper

Author:
Roby Joehanes

Field Summary
static int CONSTANT
           
static int GAUSSIAN
           
protected  double mean
           
static int NORMAL
           
static int POISSON
           
protected  int type
           
static java.lang.String[] typeString
           
static int UNIFORM
           
protected  double variance
           
 
Constructor Summary
BBNPDF()
           
BBNPDF(double v)
           
BBNPDF(double newMean, double newVariance)
           
BBNPDF(double v1, double v2, int type)
           
 
Method Summary
 void add(BBNPDF arg)
           
 java.lang.Object clone()
           
 boolean contains(java.lang.Object d)
           
 void divide(BBNPDF arg)
           
 boolean equals(java.lang.Object o)
           
 double evaluate(java.util.Hashtable q)
           
 double generateValue()
          Generate a value out of the continuous value
 double getLowerBound()
          Returns the lowerBound.
 double getMean()
          Returns the mean.
 int getType()
          Returns the type.
 double getUpperBound()
          Returns the upperBound.
 double getValue()
          Returns the value.
 double getVariance()
          Returns the variance.
 int hashCode()
          Same as toString().hashCode()
 void multiply(BBNPDF arg)
           
 void setMean(double mean)
          Sets the mean.
 void setType(int type)
          Sets the type.
 void setValue(double value)
          Sets the value.
 void setVariance(double variance)
          Sets the variance.
 void subtract(BBNPDF arg)
           
 void toConstant(double p)
           
 java.lang.String toString()
          Standard toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CONSTANT

public static final int CONSTANT
See Also:
Constant Field Values

UNIFORM

public static final int UNIFORM
See Also:
Constant Field Values

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

GAUSSIAN

public static final int GAUSSIAN
See Also:
Constant Field Values

POISSON

public static final int POISSON
See Also:
Constant Field Values

typeString

public static final java.lang.String[] typeString

mean

protected double mean

variance

protected double variance

type

protected int type
Constructor Detail

BBNPDF

public BBNPDF()

BBNPDF

public BBNPDF(double v)

BBNPDF

public BBNPDF(double newMean,
              double newVariance)

BBNPDF

public BBNPDF(double v1,
              double v2,
              int type)
Method Detail

getLowerBound

public double getLowerBound()
Returns the lowerBound.

Returns:
double

getUpperBound

public double getUpperBound()
Returns the upperBound.

Returns:
double

contains

public boolean contains(java.lang.Object d)

generateValue

public double generateValue()
Generate a value out of the continuous value

Returns:
double

equals

public boolean equals(java.lang.Object o)

toString

public java.lang.String toString()
Standard toString

See Also:
Object.toString()

hashCode

public int hashCode()
Same as toString().hashCode()

See Also:
Object.hashCode()

clone

public java.lang.Object clone()

getType

public int getType()
Returns the type.

Returns:
int

setType

public void setType(int type)
Sets the type.

Parameters:
type - The type to set

getMean

public double getMean()
Returns the mean.

Returns:
double

getVariance

public double getVariance()
Returns the variance.

Returns:
double

setMean

public void setMean(double mean)
Sets the mean.

Parameters:
mean - The mean to set

setVariance

public void setVariance(double variance)
Sets the variance.

Parameters:
variance - The variance to set

getValue

public double getValue()
Returns the value.

Returns:
double

setValue

public void setValue(double value)
Sets the value.

Parameters:
value - The value to set

evaluate

public double evaluate(java.util.Hashtable q)

toConstant

public void toConstant(double p)

multiply

public void multiply(BBNPDF arg)

divide

public void divide(BBNPDF arg)

add

public void add(BBNPDF arg)

subtract

public void subtract(BBNPDF arg)