edu.ksu.cis.bnj.bbn
Class BBNContinuousValue

java.lang.Object
  extended byedu.ksu.cis.bnj.bbn.BBNContinuousValue
All Implemented Interfaces:
BBNValue, java.lang.Cloneable

public class BBNContinuousValue
extends java.lang.Object
implements BBNValue, java.lang.Cloneable

Author:
Roby Joehanes

Field Summary
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
BBNContinuousValue()
           
BBNContinuousValue(double newMean, double newVariance)
           
BBNContinuousValue(double newLowerBound, double newUpperBound, int type)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean contains(java.lang.Object d)
           
 boolean equals(java.lang.Object o)
           
 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 getVariance()
          Returns the variance.
 int hashCode()
          Same as toString().hashCode()
 void setMean(double mean)
          Sets the mean.
 void setType(int type)
          Sets the type.
 void setVariance(double variance)
          Sets the variance.
 java.lang.String toString()
          Standard toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNIFORM

public static final int UNIFORM
See Also:
Constant Field Values

GAUSSIAN

public static final int GAUSSIAN
See Also:
Constant Field Values

NORMAL

public static final int NORMAL
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

BBNContinuousValue

public BBNContinuousValue()

BBNContinuousValue

public BBNContinuousValue(double newMean,
                          double newVariance)

BBNContinuousValue

public BBNContinuousValue(double newLowerBound,
                          double newUpperBound,
                          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)
Specified by:
contains in interface BBNValue

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()
Specified by:
clone in interface BBNValue

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