org.cytoscape.cyni
Class CyniBayesianUtils
java.lang.Object
org.cytoscape.cyni.CyniBayesianUtils
public class CyniBayesianUtils
- extends Object
This is a class that contains several utilities that will help creating a new bayesian network
Field Summary |
protected Map<Integer,ArrayList<Integer>> |
nodeParents
This variable maps an integer representing a node/row with a list
of integers that represents a list of parents for that node/row
In oder to use it correctly, this variable needs to be initialized and a previous
map between a node and its corresponding integer is also required |
Method Summary |
boolean |
isGraphCyclic(int nodeToCheck)
This method allows checking if there is a cycle in a graph starting from a defined node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nodeParents
protected Map<Integer,ArrayList<Integer>> nodeParents
- This variable maps an integer representing a node/row with a list
of integers that represents a list of parents for that node/row
In oder to use it correctly, this variable needs to be initialized and a previous
map between a node and its corresponding integer is also required
CyniBayesianUtils
public CyniBayesianUtils(Map<Integer,ArrayList<Integer>> nodeParents)
- Constructor.
- Parameters:
nodeParents
- The map used to know at any time the list of parents a node has.
isGraphCyclic
public boolean isGraphCyclic(int nodeToCheck)
- This method allows checking if there is a cycle in a graph starting from a defined node. It also uses the nodeParents variable
so to make a good use of this function, the nodeParents variable needs to be previously initialized
- Parameters:
nodeToCheck
- The index corresponding to the starting node from where we want to check if there is a cycle in the graph
- Returns:
- True if the graph is cyclic or false if not or the nodeParents has not been initialized
Copyright © 2013. All Rights Reserved.