File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -329,11 +329,13 @@ The `vertex_order` can be a vector or one of the following inputs
329
329
embed_graph (g:: SimpleGraph ; vertex_order= Branching ()) = embed_graph (UnWeighted (), g; vertex_order)
330
330
function embed_graph (mode, g:: SimpleGraph ; vertex_order= Branching ())
331
331
if vertex_order isa AbstractVector
332
- L = PathDecomposition. Layout (g, collect (vertex_order))
332
+ L = PathDecomposition. Layout (g, collect (vertex_order[ end : - 1 : 1 ] ))
333
333
else
334
334
L = pathwidth (g, vertex_order)
335
335
end
336
- ug = ugrid (mode, g, L. vertices; padding= 2 , nrow= L. vsep+ 1 )
336
+ # we reverse the vertex order of the pathwidth result,
337
+ # because this order corresponds to the vertex-seperation.
338
+ ug = ugrid (mode, g, L. vertices[end : - 1 : 1 ]; padding= 2 , nrow= L. vsep+ 1 )
337
339
return ug
338
340
end
339
341
You can’t perform that action at this time.
0 commit comments