Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions examples/datagraph.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using DataGraphs: DataGraph
using Graphs: Edge, grid, has_edge, has_vertex
using Graphs: has_edge, has_vertex
using NamedGraphs: NamedEdge
using NamedGraphs.NamedGraphGenerators: named_grid

g = grid((4,))
g = named_grid((4))
dg = DataGraph(g; vertex_data_eltype = String, edge_data_eltype = Symbol)
@show !isassigned(dg, Edge(1, 2))
@show !isassigned(dg, NamedEdge(1, 2))
@show !isassigned(dg, 1 => 2)
@show !isassigned(dg, Edge(1 => 2))
@show !isassigned(dg, NamedEdge(1 => 2))
@show !isassigned(dg, 1 => 3)
@show !isassigned(dg, 1)
@show !isassigned(dg, 2)
Expand Down Expand Up @@ -33,10 +35,10 @@ dg[4] = "V4"

dg[1 => 2] = :E12
dg[2 => 3] = :E23
dg[Edge(3, 4)] = :E34
dg[NamedEdge(3, 4)] = :E34
#@show isassigned(dg, (1, 2))
@show isassigned(dg, Edge(2, 3))
@show isassigned(dg, NamedEdge(2, 3))
@show isassigned(dg, 3 => 4)
@show dg[Edge(1, 2)] == :E12
@show dg[NamedEdge(1, 2)] == :E12
@show dg[2 => 3] == :E23
@show dg[3 => 4] == :E34
40 changes: 0 additions & 40 deletions ext/DataGraphsNamedGraphsExt/DataGraphsNamedGraphsExt.jl

This file was deleted.

5 changes: 2 additions & 3 deletions src/DataGraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ module DataGraphs

include("utils.jl")
include("traits/isunderlyinggraph.jl")
include("dataview.jl")
include("abstractdatagraph.jl")
include("indexing.jl")
include("datagraph.jl")
# TODO: Turn into a weak dependency once `GraphsExtensions`
# is split off from `NamedGraphs`.
include("../ext/DataGraphsNamedGraphsExt/DataGraphsNamedGraphsExt.jl")

export AbstractDataGraph, DataGraph

Expand Down
Loading