Constructor and Description |
---|
Vertex()
Instantiates a new vertex.
|
Vertex(int id)
Instantiates a new vertex.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Vertex o) |
double |
getF()
Gets the f.
|
double |
getG()
Gets the g.
|
double |
getH()
Gets the h.
|
int |
getID()
Gets the id.
|
Vertex |
getPrevious()
Gets the previous.
|
static void |
reset()
Reset.
|
void |
setF()
Sets the F.
|
void |
setG(double g)
Sets the g.
|
void |
setH(double h)
Sets the h.
|
void |
setPrevious(Vertex v)
Sets the previous.
|
java.lang.String |
toString() |
public Vertex()
public Vertex(int id)
id
- the idpublic int compareTo(Vertex o)
compareTo
in interface java.lang.Comparable<Vertex>
public java.lang.String toString()
toString
in class java.lang.Object
public static void reset()
public int getID()
public void setPrevious(Vertex v)
v
- the new previouspublic Vertex getPrevious()
public double getH()
public void setH(double h)
h
- the new hpublic double getG()
public void setG(double g)
g
- the new gpublic double getF()
public void setF()