class

AStar::Node(T)

Inherits Reference < Object

Represents one node from a graph. Every Node(T) can store something in its data getter e.g. coordinates.

Constructors

new(data : T = nil)

Create a new node and optionally set its data field.

Source

Instance methods

connect(node : self, distance : Number::Primitive)

Connect self to another node with a distance.

Source
data
Source
f=(f : Number::Primitive)
Source
g=(g : Number::Primitive)
Source
neighbor
Source
parent
Source
parent=(parent : self | Nil)
Source
reset

Resets F and G values back to its initial state Float64::INFINITY. Returns self.

Source
to_s(io : IO) : Nil

Appends #data to the given IO object.

Source