|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlio.probdistributions.Network
public abstract class Network
This class represents a generic network and can be used to build trees or graphs with directed links
Field Summary | |
---|---|
protected boolean |
laplace
|
protected int |
numNodes
|
Constructor Summary | |
---|---|
Network()
|
|
Network(int numNodes)
|
Method Summary | |
---|---|
void |
addLink(int parentNode,
int childNode)
Set a new link between these nodes |
boolean |
existsLink(int parentNode,
int childNode)
|
int[] |
getChildren(int node)
|
int |
getNumNodes()
|
int[] |
getParents(int node)
|
abstract double |
getProbability(int X,
Individual configuration)
|
int[] |
getTopologicalOrder()
|
boolean |
hasCycle()
Checks whether the graph in this network isn't acyclic |
boolean |
isLaplace()
|
abstract void |
learnCPT()
Learn conditional probability tables from the data in population according with structure in the graph |
boolean |
makeCycle(int parentNode,
int childNode)
Checks whether the link between patentNode and childNode introduces a cycle in the graph |
void |
removeLink(int parentNode,
int childNode)
Delete link between these nodes |
abstract void |
setData(Individual[] individuals)
|
void |
setLaplace(boolean laplace)
|
void |
setNumNodes(int numNodes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int numNodes
protected boolean laplace
Constructor Detail |
---|
public Network()
public Network(int numNodes)
Method Detail |
---|
public boolean isLaplace()
public void setLaplace(boolean laplace)
laplace
- The laplace to set.public void addLink(int parentNode, int childNode)
parentNode
- node where the new link goes outchildNode
- node where the new link point topublic void removeLink(int parentNode, int childNode)
parentNode
- childNode
- public boolean existsLink(int parentNode, int childNode)
parentNode
- childNode
-
public boolean makeCycle(int parentNode, int childNode)
parentNode
- childNode
-
public boolean hasCycle()
public int[] getParents(int node)
node
-
public int[] getChildren(int node)
node
-
public int[] getTopologicalOrder()
public abstract void learnCPT()
pop
- public abstract void setData(Individual[] individuals)
public abstract double getProbability(int X, Individual configuration)
X
- variable of interestconfiguration
- list of values of each variable in the proper order
public int getNumNodes()
public void setNumNodes(int numNodes)
numNodes
- The numNodes to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |