|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectunbbayes.prs.hybridbn.CNNormalDistribution
public class CNNormalDistribution
This class represents the continuous node normal distribution.
| Nested Class Summary | |
|---|---|
protected class |
CNNormalDistribution.NormalDistributionFunction
Follows SumOf(k[i] * CPND[i]) + N(mean, variance), for all continuous node (i). |
| Field Summary | |
|---|---|
protected ContinuousNode |
cNode
|
protected List<Node> |
continuousParentList
|
protected List<Node> |
discreteParentList
|
protected int[] |
factors
|
protected CNNormalDistribution.NormalDistributionFunction[] |
ndfList
|
| Constructor Summary | |
|---|---|
CNNormalDistribution(ContinuousNode cNode)
|
|
| Method Summary | |
|---|---|
protected void |
calculateFactors()
Calculate the factors necessary to transform the linear coordinate into a multidimensional one (which is the the state for each possible discrete parent node). |
int |
functionSize()
Returns the number of normal distribution functions. |
double |
getConstantAt(int constantIndex,
int index)
|
double |
getConstantAt(int constantIndex,
int[] multidimensionalCoord)
|
int |
getConstantListSize()
|
List<Node> |
getContinuousParentList()
|
List<Node> |
getDiscreteParentList()
|
int |
getLinearCoord(int[] multidimensionalCoord)
Get the linear coordinate from the multidimensional one. |
double |
getMean(int index)
|
double |
getMean(int[] multidimensionalCoord)
|
int[] |
getMultidimensionalCoord(int linearCoord)
Get the multidimensional coordinate from the linear one. |
double |
getVariance(int index)
|
double |
getVariance(int[] multidimensionalCoord)
|
void |
refreshParents()
Must be called when there is some change in the parents. |
void |
setConstantAt(int constantIndex,
double value,
int index)
Set the constant that multiplies the continuous parent node at index to the given value for the given combination of discrete parent node's states, which is the multidimensional coordinate. |
void |
setConstantAt(int constantIndex,
double value,
int[] multidimensionalCoord)
Set the constant that multiplies the continuous parent node at index to the given value for the given combination of discrete parent node's states, which is the multidimensional coordinate. |
void |
setMean(double mean,
int index)
Set the normal distribution mean for the given combination of discrete parent node's states, which is represented by the given index. |
void |
setMean(double mean,
int[] multidimensionalCoord)
Set the normal distribution mean for the given combination of discrete parent node's states, which is the multidimensional coordinate. |
void |
setVariance(double variance,
int index)
Set the normal distribution variance for the given combination of discrete parent node's states, which is represented by the given index. |
void |
setVariance(double variance,
int[] multidimensionalCoord)
Set the normal distribution variance for the given combination of discrete parent node's states, which is the multidimensional coordinate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ContinuousNode cNode
protected CNNormalDistribution.NormalDistributionFunction[] ndfList
protected List<Node> discreteParentList
protected List<Node> continuousParentList
protected int[] factors
| Constructor Detail |
|---|
public CNNormalDistribution(ContinuousNode cNode)
| Method Detail |
|---|
public List<Node> getDiscreteParentList()
public List<Node> getContinuousParentList()
public void refreshParents()
public void setConstantAt(int constantIndex,
double value,
int[] multidimensionalCoord)
constantIndex - The continuous parent node index.value - The new value for the constant.multidimensionalCoord - The multidimensional coordinate which is the
state associated with each possible discrete parent node.
public void setConstantAt(int constantIndex,
double value,
int index)
constantIndex - The continuous parent node index.value - The new value for the constant.index - The index which is the state associated with each possible
discrete parent node.
public double getConstantAt(int constantIndex,
int[] multidimensionalCoord)
public double getConstantAt(int constantIndex,
int index)
public int getConstantListSize()
public void setMean(double mean,
int[] multidimensionalCoord)
mean - The normal distribution mean.multidimensionalCoord - The multidimensional coordinate which is the
state associated with each possible discrete parent node.
public void setMean(double mean,
int index)
mean - The normal distribution mean.index - The index which is the state associated with each possible
discrete parent node.public double getMean(int[] multidimensionalCoord)
public double getMean(int index)
public void setVariance(double variance,
int[] multidimensionalCoord)
variance - The normal distribution variance.multidimensionalCoord - The multidimensional coordinate which is the
state associated with each possible discrete parent node.
public void setVariance(double variance,
int index)
variance - The normal distribution variance.index - The index which is the state associated with each possible
discrete parent node.public double getVariance(int[] multidimensionalCoord)
public double getVariance(int index)
protected void calculateFactors()
public final int getLinearCoord(int[] multidimensionalCoord)
multidimensionalCoord - Multidimensional coordinate (represented by the state for
each discrete parent node).
public final int[] getMultidimensionalCoord(int linearCoord)
linearCoord - The linear coordinate.
public int functionSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||