Handbook
Glossary
cost ( from to astar -- n )
Vocabulary
path-finding
Inputs
from
a node
to
a node
astar
an instance of a subclassed
astar
tuple
Outputs
n
a
number
Word description
Return the cost to go from
from
to
to
.
to
is necessarily a neighbor of
from
.
Definition
IN:
path-finding
GENERIC:
cost
( from to astar -- n )
Methods
USING:
accessors
combinators
path-finding
path-finding.private
;
M:
astar-simple
cost
cost>>
( n1 n2 -- c )
call-effect
;
USING:
kernel
path-finding
path-finding.private
;
M:
bfs
cost
3drop
1
;
USING:
accessors
assocs
kernel
path-finding
path-finding.private
;
M:
dijkstra
cost
costs>>
swapd
at
at
;