| java.lang.Object org.enhydra.shark.xpdl.GraphChecker
GraphChecker | public class GraphChecker (Code) | | You can use this class to check if the graph is cyclic, or to
find index of corresponding join node for the given split node index.
When constructing class, you have to pass it the incidence matrix, which
has to be the two-dimensional array of booleans , where the rows and
column indexes represents the graph node indexes, and values represents
if there is a connection between these nodes. If there is connection
from node i to the node j it is represented by putting
true into j'th column of the i'th row.
|
Constructor Summary | |
public | GraphChecker(boolean[][] matParam) Constructs the GraphChecker object. |
GraphChecker | public GraphChecker(boolean[][] matParam)(Code) | | Constructs the GraphChecker object.
Parameters: matParam - The two dimensional array of booleans representingthe graphs incidence matrix. |
getCyclicNodes | public int[] getCyclicNodes()(Code) | | The array of graph node indexes that are within some graph cycle.If the graph is not cyclic, returns null . |
getJoinIndex | public int getJoinIndex(int nodeX)(Code) | | Returns index of corresponding join node for the given split node index.
Parameters: nodeX - The index of split node Index of corresponding join node if it exists, -1 otherwise. |
isGraphCyclic | public boolean isGraphCyclic()(Code) | | true if the graph is cyclic, and false otherwise. |
|
|