public interface DagLevel
Interface DagLevel
represents a level of a leveled directed
acyclic graph (DAG).
All instances of DagLevel
are required to be immutable.
Modifier and Type | Method and Description |
---|---|
int |
childNode(int edge)
Returns the index of the child node of the specified edge
at this level of the DAG.
|
float |
condEdgeProb(int edge)
Returns the conditional edge probability, which is defined to be
the ratio of the sum of the weights of the sequences that pass
through the specified edge at this level of the DAG and
the sum of the weights of the sequences that pass through the parent
node of the specified edge.
|
float |
edgeProb(int edge)
Returns the edge probability, which is defined to be the ratio of the
sum of the weights of the sequences that pass through the specified
edge at this level of the DAG and the sum of the weights of the
sequences that pass through any edge at this level of the DAG.
|
float |
edgeWeight(int edge)
Returns the sum of weights for the sequences that pass
through the specified edge at this level of the DAG.
|
int |
inEdge(int childNode,
int inEdge)
Returns the index of the specified edge at this level of the DAG.
|
int |
nChildNodes()
Returns the number of child nodes at this level of the DAG.
|
int |
nEdges()
Returns the number of edges at this level of the DAG.
|
int |
nInEdges(int childNode)
Returns the number of ingoing edges for the specified child node
at this level of the DAG.
|
int |
nOutEdges(int parentNode)
Returns the number of outgoing edges of the specified parent node
at this level of the DAG.
|
int |
nParentNodes()
Returns the number of parent nodes at this level of the DAG.
|
int |
outEdge(int parentNode,
int outEdge)
Returns the index of the specified edge at this level of the DAG.
|
int |
outEdgeBySymbol(int parentNode,
int symbol)
Returns the index of the specified edge at this level of the
DAG or
-1 if no such edge exists. |
int |
parentNode(int edge)
Returns the index of the parent node of the specified edge
at this level of the DAG.
|
float |
parentProb(int parentNode)
Returns the parent node probability, which is defined to be the
ratio of the sum of the weights of the sequences that pass through
the specified parent node at this level of the DAG and the sum of
the weights of the sequences that pass through any parent node at this
level of the DAG.
|
float |
parentWeight(int parentNode)
Returns the sum of weights for the sequences that pass
through the specified node at this level of the DAG.
|
int |
symbol(int edge)
Returns the symbol labeling the specified edge at this level
of the DAG.
|
java.lang.String |
toString()
Returns a string representation of
this . |
int nEdges()
int nParentNodes()
int nChildNodes()
int parentNode(int edge)
edge
- an edge indexjava.lang.IndexOutOfBoundsException
- if
edge < 0 || edge >= this.nEdges()
int childNode(int edge)
edge
- an edge index.java.lang.IndexOutOfBoundsException
- if
edge<0 || edge>=this.nEdges()
int symbol(int edge)
edge
- an edge indexjava.lang.IndexOutOfBoundsException
- if
edge < 0 || edge >= this.nEdges()
float edgeWeight(int edge)
edge
- an edge indexjava.lang.IndexOutOfBoundsException
- if
edge < 0 || edge >= this.nEdges()
float parentWeight(int parentNode)
parentNode
- a parent node indexjava.lang.IndexOutOfBoundsException
- if
parentNode < 0 || parentNode >= this.nParentNodes()
float condEdgeProb(int edge)
edge
- an edge indexjava.lang.IndexOutOfBoundsException
- if
edge < 0 || edge >= this.nEdges()
float edgeProb(int edge)
edge
- an edge indexjava.lang.IndexOutOfBoundsException
- if
edge < 0 || edge >= this.nEdges()
float parentProb(int parentNode)
parentNode
- a parent node indexjava.lang.IndexOutOfBoundsException
- if
parentNode < 0 || parentNode >= this.nParentNodes()
int nOutEdges(int parentNode)
parentNode
- a parent node indexjava.lang.IndexOutOfBoundsException
- if
parentNode < 0 || parentNode >= nParentNodes()
int outEdge(int parentNode, int outEdge)
parentNode
- a parent node indexoutEdge
- the index of the outgoing edge of the specified
parent nodejava.lang.IndexOutOfBoundsException
- if
parentNode < 0 || parentNode >= nParentNodes()
java.lang.IndexOutOfBoundsException
- if
outEdge < 0 || outEdge >= this.nOutEdges(parentNode)
int outEdgeBySymbol(int parentNode, int symbol)
-1
if no such edge exists.parentNode
- a parent node indexsymbol
- a symbol labeling an outgoing edge of the specified
parent node-1
if no such edge existsjava.lang.IndexOutOfBoundsException
- if
parentNode < 0 || parentNode >= nParentNodes()
int nInEdges(int childNode)
childNode
- a child node indexjava.lang.IndexOutOfBoundsException
- if
childNode < 0 || childNode >= this.nChildNodes()
int inEdge(int childNode, int inEdge)
childNode
- index of the child nodeinEdge
- index of an ingoing edge of the specified child nodejava.lang.IndexOutOfBoundsException
- if
childNode < 0 || childNode >= this.nChildNodes()
java.lang.IndexOutOfBoundsException
- if
inEdge < 0 || inEdge >= this.nInEdges(childNode)
java.lang.String toString()
this
. The exact
details of the representation are unspecified and subject to change.toString
in class java.lang.Object
this