| Constructor and Description |
|---|
ImmutableDag(Markers markers,
DagLevel[] levels)
Constructs a new
ImmutableDag instance from the specified data. |
| Modifier and Type | Method and Description |
|---|---|
int |
childNode(int level,
int edge)
Returns the index of the specified child node in the DAG.
|
float |
condEdgeProb(int level,
int edge)
Returns the ratio of the sum of the weights of the sequences that pass
through the specified edge of the DAG and
the sum of the weights of the sequences that pass through the parent
node of the specified edge of the DAG.
|
float |
edgeProb(int level,
int edge)
Returns the ratio of the sum of the weights of the sequences that pass
through the specified edge of the DAG and the sum of the weights of all
sequences.
|
float |
edgeWeight(int level,
int edge)
Returns the sum of the weights of the sequences that pass
through the specified edge of the DAG.
|
int |
inEdge(int level,
int childNode,
int inEdge)
Returns the index of the specified edge in the DAG.
|
boolean |
isChildOf(int parentLevel,
int parentEdge,
int childEdge)
Returns
true if the child node of the specified parent
edge equals the parent node of the specified child edge and
returns false otherwise. |
Markers |
markers()
Returns the markers represented by this DAG.
|
int |
maxEdges()
Returns the maximum number of edges at any level of the DAG.
|
int |
maxNodes()
Returns the maximum number of parent nodes at any level of the DAG.
|
int |
nChildNodes(int level)
Returns the number of child nodes at the specified level of the DAG.
|
long |
nEdges()
Returns the number of edges in the DAG.
|
int |
nEdges(int level)
Returns the number of edges at the specified level of the DAG.
|
int |
nInEdges(int level,
int childNode)
Returns the number of ingoing edges for the specified node of the DAG.
|
int |
nLevels()
Returns the number of markers.
|
long |
nNodes()
Returns the number of nodes in the DAG.
|
int |
nOutEdges(int level,
int parentNode)
Returns the number of outgoing edges for the specified node of the DAG.
|
int |
nParentNodes(int level)
Returns the number of parent nodes at the specified level of the DAG.
|
int |
outEdge(int level,
int parentNode,
int outEdge)
Returns the index of the specified edge in the DAG.
|
int |
outEdgeBySymbol(int level,
int parentNode,
int symbol)
Returns the index of the specified edge at the specified level of the
DAG or
-1 if no such edge exists. |
int |
parentNode(int level,
int edge)
Returns the index of the specified parent node in the DAG.
|
float |
parentProb(int level,
int node)
Returns the ratio of the sum of the weights of the sequences that pass
through the specified parent node of the DAG and the sum of the weights
of all sequences.
|
float |
parentWeight(int level,
int parentNode)
Returns the sum of the weights of the sequences that pass
through the specified node of the DAG.
|
double[] |
posArray()
Returns an array of length
this.nMarkers() whose j-th
element is the distance from the root node to
the child node at level j of the DAG. |
int |
symbol(int level,
int edge)
Returns the symbol labeling the specified edge of the DAG.
|
java.lang.String |
toString()
Returns a string representation of
this. |
java.lang.String |
toString(int startLevel,
int endLevel)
Returns a description of the specified levels of the DAG.
|
public ImmutableDag(Markers markers, DagLevel[] levels)
ImmutableDag instance from the specified data.markers - the markerslevels - the levels of the leveled DAGjava.lang.IllegalArgumentException - if levels.length == 0java.lang.IllegalArgumentException - if levels[0].nParentNodes() != 1java.lang.IllegalArgumentException - if
levels[j-1].nChildNodes() != levels[j].nParentNodes() for any
j satisfying 0 < j && j < levels.lengthjava.lang.NullPointerException - if
(markers == null || levels==null), or if
levels[j] == null for any
j satisfying 0 <= j && j < levels.lengthpublic int nEdges(int level)
Dagpublic int nParentNodes(int level)
DagnParentNodes in interface Daglevel - a level of the DAGpublic int nChildNodes(int level)
DagnChildNodes in interface Daglevel - a level of the DAGpublic int parentNode(int level,
int edge)
DagparentNode in interface Daglevel - a level of the DAG.edge - the index of an edge at the specified level of the DAGpublic int childNode(int level,
int edge)
Dagpublic int symbol(int level,
int edge)
Dagpublic float edgeWeight(int level,
int edge)
DagedgeWeight in interface Daglevel - a level of the DAGedge - the index of an edge at the specified level of the DAGpublic float parentWeight(int level,
int parentNode)
DagparentWeight in interface Daglevel - a level of the DAGparentNode - the index of a parent node at the specified level
of the DAGpublic float condEdgeProb(int level,
int edge)
DagcondEdgeProb in interface Daglevel - a level of the DAGedge - the index of an edge at the specified level of the DAGpublic float edgeProb(int level,
int edge)
Dagpublic float parentProb(int level,
int node)
DagparentProb in interface Daglevel - a level of the DAGnode - the index of a parent node at the specified level
of the DAGpublic int nLevels()
Dagpublic Markers markers()
Dagpublic long nNodes()
Dagpublic long nEdges()
Dagpublic int maxNodes()
Dagpublic int maxEdges()
Dagpublic int nOutEdges(int level,
int parentNode)
Dagpublic int outEdge(int level,
int parentNode,
int outEdge)
Dagpublic int outEdgeBySymbol(int level,
int parentNode,
int symbol)
Dag-1 if no such edge exists.outEdgeBySymbol in interface Daglevel - a level of the DAGparentNode - the index of a parent node at the specified
level of the DAGsymbol - a symbol labeling an outgoing edge of the specified
parent node of the DAG-1 if no such edge existspublic int nInEdges(int level,
int childNode)
Dagpublic int inEdge(int level,
int childNode,
int inEdge)
Dagpublic boolean isChildOf(int parentLevel,
int parentEdge,
int childEdge)
Dagtrue if the child node of the specified parent
edge equals the parent node of the specified child edge and
returns false otherwise.isChildOf in interface DagparentLevel - a level of the DAGparentEdge - the index of an edge at the specified level
of the DAGchildEdge - the index of an edge at level (parentLevel + 1)
of the DAGtrue if the child node of the specified parent
edge equals the parent node of the specified child edgepublic double[] posArray()
Dagthis.nMarkers() whose j-th
element is the distance from the root node to
the child node at level j of the DAG.
The distance from parent node to child node at level lev
equals -Math.log10(P) where P is the weighted conditional
edge probability at level lev, when each edge e is
weighted by this.counts(lev, e).public java.lang.String toString(int startLevel,
int endLevel)
Dagpublic java.lang.String toString()
Dagthis. The exact
details of the representation are unspecifed and subject to change.