Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Apr 25, 2024
1 parent 4de8d8f commit 5af0862
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/namedgraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function Graphs.rem_vertex!(graph::GenericNamedGraph, vertex)
end
one_based_vertex = vertex_to_one_based_vertex(graph, vertex)
rem_vertex!(one_based_graph(graph), one_based_vertex)
delete!(vertices(graph), vertex)
return delete!(vertices(graph), vertex)
## # Insert the last vertex into the position of the vertex
## # that is being deleted, then remove the last vertex.
## last_vertex = last(graph.ordered_vertices)
Expand Down Expand Up @@ -115,7 +115,9 @@ function GenericNamedGraph{<:Any,G}(
return GenericNamedGraph{eltype(vertices),G}(one_based_graph, vertices)
end

function GenericNamedGraph{<:Any,G}(one_based_graph::AbstractSimpleGraph) where {G<:AbstractSimpleGraph{Int}}
function GenericNamedGraph{<:Any,G}(
one_based_graph::AbstractSimpleGraph
) where {G<:AbstractSimpleGraph{Int}}
return GenericNamedGraph{<:Any,G}(one_based_graph, vertices(one_based_graph))
end

Expand Down

0 comments on commit 5af0862

Please sign in to comment.