Class AState

java.lang.Object
mazealgo.model.algorithms.search.AState
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Maze3DState, MazeState

public abstract class AState extends Object implements Serializable
A state in a search problem. Carries the parent it was reached from (cameFrom) and the accumulated path cost from the start.

Serializable so a Solution can be sent across the wire from the server to the client. The cameFrom chain is walked at Solution-construction time, so serializing a Solution doesn't drag along the entire visited graph - just the path states.

See Also:
  • Constructor Details

    • AState

      public AState()
  • Method Details

    • getCameFrom

      public AState getCameFrom()
    • setCameFrom

      public void setCameFrom(AState cameFrom)
    • getCost

      public double getCost()
    • setCost

      public void setCost(double cost)
    • equals

      public abstract boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public abstract int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public abstract String toString()
      Overrides:
      toString in class Object