Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Apr 26, 2024
1 parent e58b00d commit 94ebb02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ext/DataGraphsNamedGraphsExt/DataGraphsNamedGraphsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ using NamedGraphs: NamedGraphs, AbstractNamedGraph

DataGraphs.is_underlying_graph(::Type{<:AbstractNamedGraph}) = true

for f in [:(NamedGraphs.ordinal_graph), :(NamedGraphs.ordinal_vertex_to_vertex)]
for f in [:(NamedGraphs.position_graph), :(NamedGraphs.vertex_positions)]
@eval begin
function $f(graph::AbstractDataGraph, args...; kwargs...)
return $f(underlying_graph(graph), args...; kwargs...)
function $f(graph::AbstractDataGraph)
return $f(underlying_graph(graph))
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using DataGraphs:
is_arranged,
vertex_data,
vertex_data_eltype
using Dictionaries: Dictionary, Indices, dictionary
using Dictionaries: AbstractIndices, Dictionary, Indices, dictionary
using Graphs:
add_edge!,
bfs_tree,
Expand Down Expand Up @@ -208,7 +208,7 @@ using DataGraphs: is_arranged
@test vertex_data_eltype(dg) === String
@test edge_data_eltype(dg) === Symbol
@test issetequal(vertices(dg), Float64.(1:4))
@test vertices(dg) isa Indices{Float64}
@test vertices(dg) isa AbstractIndices{Float64}
@test eltype(vertices(dg)) === Float64
@test has_edge(dg, 1.0 => 2.0)
@test has_edge(dg, 2.0 => 3.0)
Expand Down

0 comments on commit 94ebb02

Please sign in to comment.