C# Class VacuumCleaner.Agents.ModelAgent.DataPool

Used for A* to produce less garbage
显示文件 Open project: Troilk/VacuumCleaner

Public Methods

Method Description
Add ( Point point, Node parent, int realCost, int heuristicCost ) : void

Adds node to fringe only if it is not already in fringe or it's cheaper (then old node is rewritten)

Clear ( ) : void
DataPool ( int capacity ) : System.Collections.Generic
GetBestNode ( ) : Node
RemoveFromFringe ( Node node ) : void

Method Details

Add() public method

Adds node to fringe only if it is not already in fringe or it's cheaper (then old node is rewritten)
public Add ( Point point, Node parent, int realCost, int heuristicCost ) : void
point Point point of the path
parent Node parent node
realCost int real cost to this node
heuristicCost int heuristic cost to target node
return void

Clear() public method

public Clear ( ) : void
return void

DataPool() public method

public DataPool ( int capacity ) : System.Collections.Generic
capacity int
return System.Collections.Generic

GetBestNode() public method

public GetBestNode ( ) : Node
return Node

RemoveFromFringe() public method

public RemoveFromFringe ( Node node ) : void
node Node
return void