public int peek() { int temp = 0; if (front != null) { temp = front.getData(); } return(temp); }
public String display() { String nodes = ""; AStarNode temp = front; while (temp != null) { nodes += temp.getData() + " "; temp = temp.getNext(); } return(nodes); }
public bool isVisited(int data) { bool flag = false; AStarNode temp = front; while (temp != null) { if (data == temp.getData()) { flag = true; break; } else { temp = temp.getNext(); } } return(flag); }
public int compare() { int node = 0; double function = 0; if (front != null) { AStarNode temp = front.getNext(); function = front.getFunction(); node = front.getData(); while (temp != null) { if (temp.getFunction() < function) { function = temp.getFunction(); node = temp.getData(); } temp = temp.getNext(); } } return(node); }