@@ -3,13 +3,13 @@ $TYPEDSIGNATURES
33
44Compute backward bounds of instance (see [Computing bounds](@ref)).
55"""
6- function compute_bounds(instance:: CSPInstance ; kwargs... )
6+ function compute_bounds(instance:: CSPInstance{T,G,FR,BR} ; kwargs... ) where {T,G,FR,BR}
77 (; graph, destination_vertex, topological_ordering, is_useful) = instance
88
99 vertices_order = topological_ordering
1010 @assert vertices_order[1 ] == destination_vertex
1111
12- bounds = Dict{Int,typeof(instance . destination_backward_resource) }()
12+ bounds = Dict{Int,BR }()
1313 # bounds = Vector{typeof(instance.destination_backward_resource)}(undef, nv(graph))
1414 bounds[destination_vertex] = instance. destination_backward_resource
1515
@@ -30,7 +30,7 @@ $TYPEDSIGNATURES
3030Perform generalized A star algorithm on instnace using bounds
3131(see [Generalized `A^\\ star`](@ref)).
3232"""
33- function generalized_a_star(instance:: CSPInstance , bounds; kwargs... )
33+ function generalized_a_star(instance:: CSPInstance{T,G,FR} , bounds; kwargs... ) where {T,G,FR}
3434 (; graph, origin_vertex, destination_vertex, is_useful) = instance
3535 nb_vertices = nv(graph)
3636
@@ -42,8 +42,8 @@ function generalized_a_star(instance::CSPInstance, bounds; kwargs...)
4242 instance. cost_function(forward_resources[empty_path], bounds[origin_vertex]),
4343 )
4444
45- forward_type = typeof(forward_resources[empty_path])
46- M = [forward_type [] for _ in 1 : nb_vertices]
45+ # forward_type = typeof(forward_resources[empty_path])
46+ M = [FR [] for _ in 1 : nb_vertices]
4747 push!(M[origin_vertex], forward_resources[empty_path])
4848 c_star = Inf
4949 p_star = [origin_vertex]
0 commit comments