public class Path
extends java.lang.Object
Constructor and Description |
---|
Path(java.util.ArrayList<java.lang.String> path,
Semiring semiring)
Create a Path instance with specified path and semiring elements
|
Path(Semiring semiring)
Create a Path instance with specified semiring element
|
Modifier and Type | Method and Description |
---|---|
float |
getCost()
Get the paths' cost
|
java.util.ArrayList<java.lang.String> |
getPath()
Get the path
|
void |
setCost(float cost)
Set the paths' cost
|
void |
setPath(java.util.ArrayList<java.lang.String> path)
Set the path
|
java.lang.String |
toString() |
public Path(java.util.ArrayList<java.lang.String> path, Semiring semiring)
path
- word list to create path fromsemiring
- the semiring to usepublic Path(Semiring semiring)
semiring
- semiring to usepublic java.util.ArrayList<java.lang.String> getPath()
public float getCost()
public void setCost(float cost)
cost
- to setpublic void setPath(java.util.ArrayList<java.lang.String> path)
path
- set from list of wordpublic java.lang.String toString()
toString
in class java.lang.Object