public class Edge
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected double |
acousticScore |
protected Node |
fromNode |
protected double |
lmScore |
protected Node |
toNode |
Modifier | Constructor and Description |
---|---|
protected |
Edge(Node fromNode,
Node toNode,
double acousticScore,
double lmScore)
Create an Edge from fromNode to toNode with acoustic and Language Model scores.
|
Modifier and Type | Method and Description |
---|---|
void |
dumpDot(java.io.FileWriter f)
Internal routine used when dumping a Lattice as an Graphviz file
|
double |
getAcousticScore()
Get the acoustic score associated with an Edge.
|
Node |
getFromNode()
Get the "from" Node associated with an Edge
|
double |
getLMScore()
Get the language model score associated with an Edge
|
Node |
getToNode()
Get the "to" Node associated with an Edge
|
boolean |
isEquivalent(Edge other)
Returns true if the given edge is equivalent to this edge.
|
void |
setAcousticScore(double v)
Sets the acoustic score
|
void |
setLMScore(double v)
Sets the language model score
|
java.lang.String |
toString() |
protected double acousticScore
protected double lmScore
protected final Node fromNode
protected final Node toNode
public java.lang.String toString()
toString
in class java.lang.Object
public void dumpDot(java.io.FileWriter f) throws java.io.IOException
f
- file writerjava.io.IOException
- if error occuredpublic double getAcousticScore()
public double getLMScore()
public Node getFromNode()
public Node getToNode()
public void setAcousticScore(double v)
v
- the acoustic score.public void setLMScore(double v)
v
- the lm score.public boolean isEquivalent(Edge other)
other
- the Edge to compare this Edge against