AStar icon indicating copy to clipboard operation
AStar copied to clipboard

No issue just a question.

Open PodeCaradox opened this issue 4 years ago • 3 comments

Hello,

first of all thanks for sharing your AStar implementation on github. Can you answer me why you also have a
IList<IEdge> Incoming { get; } in your INode interface, maybe i missing something in the Code? From your implementation of the AStar i see you only use the Outgoing List for the algorithm, which is self explained.

PodeCaradox avatar Jul 24 '20 10:07 PodeCaradox

Hey,

Good observation. the incoming list is not used when calculating the path. But it makes it a lot easier to increase the traversal time to reach a specific node. Otherwise you would need another lookup structure to find all edges going to a specific node.

I guess this technically means that it doesn't have to be part of the INode interface! (I could leave it on the concrete Node class that implements INode. Which I didn't realize before.

roy-t avatar Jul 24 '20 20:07 roy-t

I'll keep this question open for now, to potentially address it in potential v4, as its a breaking change to remove these members.

roy-t avatar Aug 02 '20 11:08 roy-t

Yeah that's fine, i will use your implementations in a different way for my Grid. The MinHeap is really nice :)

PodeCaradox avatar Aug 02 '20 11:08 PodeCaradox