# Want output of dijikstra\_algorithm like A star Algorithm in edges Field instead of int64... or How we can convert integer into edges between nodes?

**URL:** <https://discourse.julialang.org/t/want-output-of-dijikstra-algorithm-like-a-star-algorithm-in-edges-field-instead-of-int64-or-how-we-can-convert-integer-into-edges-between-nodes/88531>\
**Category:** Performance\
**Tags:** question\
**Created:** [October 10, 2022, 5:15pm UTC](https://discourse.julialang.org/t/want-output-of-dijikstra-algorithm-like-a-star-algorithm-in-edges-field-instead-of-int64-or-how-we-can-convert-integer-into-edges-between-nodes/88531 "2022-10-10T17:15:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kumail\_Haider](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kumail_haider/32/32253_2.png) [@Kumail\_Haider](https://discourse.julialang.org/u/Kumail_Haider)\
**Post date:** [October 10, 2022, 5:15pm UTC](https://discourse.julialang.org/t/want-output-of-dijikstra-algorithm-like-a-star-algorithm-in-edges-field-instead-of-int64-or-how-we-can-convert-integer-into-edges-between-nodes/88531/1 "2022-10-10T17:15:17Z")

</div>

julia\> using Graphs, GraphPlot

julia\> using Symbolics, Statistics, LinearAlgebra

julia\> using Plots, LaTeXStrings

julia\> g = wheel\_graph(10)  
{10, 18} undirected simple Int64 graph

julia\> ds = dijkstra\_shortest\_paths(g,2)  
Graphs.DijkstraState{Int64, Int64}([2, 0, 2, 1, 1, 1, 1, 1, 1, 2], [1, 0, 1, 2, 2, 2, 2, 2, 2, 1], [Int64, Int64, Int64, Int64, Int64, Int64, Int64, Int64, Int64, Int64], [1.0, 1.0, 1.0, 2.0, 1.0, 1.0, 1.0, 1.0, 2.0, 1.0], Int64)

julia\> A=ds.dists  
10-element Vector{Int64}:  
1  
0  
⋮  
2  
1

julia\> A[6]  
2  
this is integer but i want this as 2 edges like below  
julia\> path = a\_star(g,2,6)  
2-element Vector{Graphs.SimpleGraphs.SimpleEdge{Int64}}:  
Edge 2 =\> 1  
Edge 1 =\> 6
