# parent graph
var graph: Graph[N, Link]
- init(graph: Graph[N, Link])
+ init
do
- self.graph = graph
graph.add_node(self)
end
var from: N
var to: N
- init(graph: Graph[N, L], from, to: N)
+ init
do
- self.graph = graph
- self.from = from
- self.to = to
-
graph.add_link(self)
end
end
var nodes = new List[N]
- init (cost: Int) do total_cost = cost
var at: Int = 0
fun step: N
redef type L: WeightedLink
- init(graph: Graph[N, L])
+ init
do
super
self.worst_cost = worst_cost
end
- redef var worst_cost: Int
+ redef var worst_cost: Int is noinit
redef fun cost(l) do
return l.weight
var weight: Int
- init(graph: Graph[N, L], from, to: N, weight: Int)
- do
- super
-
- self.weight = weight
- end
end
# Advanced path conditions with customizable accept states