Package net.citizensnpcs.api.astar
Class SimpleAStarStorage
java.lang.Object
net.citizensnpcs.api.astar.SimpleAStarStorage
- All Implemented Interfaces:
- AStarStorage
A base implementation of 
AStarStorage that uses a PriorityQueue for the frontier and HashMaps
 for the open/closed sets.- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidClose a givenAStarNode, moving it from the open set to the closed set.voidClose a givenAStarNode, moving or adding it from the frontier to the open set.Returns the best node from the frontier and removes it.booleanshouldExamine(AStarNode neighbour) Returns whether to examine a givenAStarNode.toString()
- 
Field Details- 
FACTORY
 
- 
- 
Constructor Details- 
SimpleAStarStoragepublic SimpleAStarStorage()
 
- 
- 
Method Details- 
closeDescription copied from interface:AStarStorageClose a givenAStarNode, moving it from the open set to the closed set.- Specified by:
- closein interface- AStarStorage
 
- 
getBestNode- Specified by:
- getBestNodein interface- AStarStorage
- Returns:
- The AStarNodeto examine next from the frontier
 
- 
openDescription copied from interface:AStarStorageClose a givenAStarNode, moving or adding it from the frontier to the open set.- Specified by:
- openin interface- AStarStorage
 
- 
removeBestNodeDescription copied from interface:AStarStorageReturns the best node from the frontier and removes it.- Specified by:
- removeBestNodein interface- AStarStorage
- Returns:
- The AStarNodeto examine next from the frontier
 
- 
shouldExamineDescription copied from interface:AStarStorageReturns whether to examine a givenAStarNode.- Specified by:
- shouldExaminein interface- AStarStorage
 
- 
toString
 
-