Skip to content

Commit

Permalink
More tests working
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Apr 15, 2024
1 parent 3dcac92 commit 91ee79c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/lib/GraphsExtensions/src/partitioning.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ function partitioned_vertices(
)
end

function partitioned_vertices(
g::AbstractGraph; npartitions=nothing, nvertices_per_partition=nothing, kwargs...
)
function partitioned_vertices(g::AbstractGraph; kwargs...)
return not_implemented()
end
5 changes: 3 additions & 2 deletions src/lib/PartitionedGraphs/src/abstractpartitionedgraph.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using Graphs: Graphs, AbstractEdge, dst, edgetype, src, vertices
using Graphs:
Graphs, AbstractEdge, add_vertex!, dst, edgetype, has_vertex, rem_vertex!, src, vertices
using ..NamedGraphs:
NamedGraphs,
AbstractNamedGraph,
parent_graph,
parent_graph_type,
parent_vertex_to_vertex,
vertex_to_parent_vertex
using ..NamedGraphs.GraphsExtensions: GraphsExtensions
using ..NamedGraphs.GraphsExtensions: GraphsExtensions, add_vertices!, rem_vertices!

abstract type AbstractPartitionedGraph{V,PV} <: AbstractNamedGraph{V} end

Expand Down
3 changes: 2 additions & 1 deletion src/lib/PartitionedGraphs/src/partitionedgraph.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using Dictionaries: Dictionary
using Graphs:
AbstractEdge, AbstractGraph, add_edge!, edges, has_edge, induced_subgraph, vertices
using .GraphsExtensions: GraphsExtensions, is_self_loop, partitioned_vertices
using .GraphsExtensions:
GraphsExtensions, boundary_edges, is_self_loop, partitioned_vertices
using ..NamedGraphs: NamedEdge, NamedGraph

# TODO: Parametrize `partitioned_vertices` and `which_partition`,
Expand Down
23 changes: 21 additions & 2 deletions test/test_partitionedgraph.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
@eval module $(gensym())
using Graphs: center, is_tree, radius, random_regular_graph, vertices
using Graphs:
center,
edges,
has_vertex,
is_connected,
is_tree,
radius,
random_regular_graph,
rem_vertex!,
vertices
using NamedGraphs: NamedEdge, NamedGraph, diameter, ne, nv
# TODO: Move to `NamedGraphGenerators`.
using NamedGraphs: named_comb_tree, named_grid
# TODO: Rename to `named_triangular_lattice_graph`,
# move to `NamedGraphGenerators`/`GraphGenerators`.
using NamedGraphs: triangular_lattice_graph
using NamedGraphs.GraphsExtensions:
add_edges!, default_root_vertex, forest_cover, spanning_forest, spanning_tree, vertextype
add_edges!,
add_vertices!,
boundary_edges,
default_root_vertex,
forest_cover,
is_path_graph,
is_self_loop,
spanning_forest,
spanning_tree,
subgraph,
vertextype
using NamedGraphs.PartitionedGraphs:
PartitionEdge,
PartitionedGraph,
Expand Down

0 comments on commit 91ee79c

Please sign in to comment.