Skip to content

Commit

Permalink
replace missing kw...
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Sep 18, 2022
1 parent 80ecc25 commit 15ca042
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Parallel/centrality/betweenness.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ end

function distr_betweenness_centrality(
g::AbstractGraph, k::Integer, distmx::AbstractMatrix=weights(g);
normalize=true, endpoints=false, rng::Union{Nothing, AbstractRNG}=nothing, seed::Union{Nothing, Integer}=nothing, kw...
normalize=true, endpoints=false, rng::Union{Nothing, AbstractRNG}=nothing, seed::Union{Nothing, Integer}=nothing
)
samples = sample(vertices(g), k; rng=rng, seed=seed)
distr_betweenness_centrality(g, samples, distmx; normalize=normalize, endpoints=endpoints, kw...)
distr_betweenness_centrality(g, samples, distmx; normalize=normalize, endpoints=endpoints)
end

function threaded_betweenness_centrality(g::AbstractGraph,
Expand Down
6 changes: 3 additions & 3 deletions src/Parallel/dominatingset/minimal_dom_set.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
dominating_set(g, reps, MinimalDominatingSet(); parallel=:threads, kw...)
dominating_set(g, reps, MinimalDominatingSet(); parallel=:threads, rng=nothing, seed=nothing)
Perform [`Graphs.dominating_set(g, MinimalDominatingSet())`](@ref) `reps` times in parallel
and return the solution with the fewest vertices.
Expand All @@ -11,11 +11,11 @@ used. This implementation is more efficient if `reps` is large.
"""
function dominating_set(
g::AbstractGraph{T}, reps::Integer, alg::MinimalDominatingSet;
parallel=:threads, kw...
parallel=:threads, rng::Union{Nothing, AbstractRNG}=nothing, seed::Union{Nothing, Integer}=nothing
) where T <: Integer
Graphs.Parallel.generate_reduce(
g,
(g::AbstractGraph{T})->Graphs.dominating_set(g, alg; kw...),
(g::AbstractGraph{T})->Graphs.dominating_set(g, alg; rng=rng, seed=seed),
(x::Vector{T}, y::Vector{T})->length(x)<length(y),
reps;
parallel=parallel
Expand Down
6 changes: 3 additions & 3 deletions src/Parallel/independentset/maximal_ind_set.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
independent_set(g, reps, MaximalIndependentSet(); parallel=:threads, kw...)
independent_set(g, reps, MaximalIndependentSet(); parallel=:threads, rng=nothing, seed=nothing)
Perform [`Graphs.independent_set(g, MaximalIndependentSet())`](@ref) `reps` times in parallel
and return the solution with the most vertices.
Expand All @@ -10,11 +10,11 @@ used. This implementation is more efficient if `reps` is large.
"""
function independent_set(
g::AbstractGraph{T}, reps::Integer, alg::MaximalIndependentSet;
parallel=:threads, kw...
parallel=:threads, rng::Union{Nothing, AbstractRNG}=nothing, seed::Union{Nothing, Integer}=nothing
) where T <: Integer
Graphs.Parallel.generate_reduce(
g,
(g::AbstractGraph{T})->Graphs.independent_set(g, alg; kw...),
(g::AbstractGraph{T})->Graphs.independent_set(g, alg; rng=rng, seed=seed),
(x::Vector{T}, y::Vector{T})->length(x)>length(y),
reps;
parallel=parallel
Expand Down
6 changes: 3 additions & 3 deletions src/Parallel/vertexcover/random_vertex_cover.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
vertex_cover(g, reps, RandomVertexCover(); parallel=:threads, kw...)
vertex_cover(g, reps, RandomVertexCover(); parallel=:threads, rng=nothing, seed=nothing)
Perform [`Graphs.vertex_cover(g, RandomVertexCover())`](@ref) `reps` times in parallel
and return the solution with the fewest vertices.
Expand All @@ -10,11 +10,11 @@ used. This implementation is more efficient if `reps` is large.
"""
function vertex_cover(
g::AbstractGraph{T}, reps::Integer, alg::RandomVertexCover;
parallel=:threads, kw...
parallel=:threads, rng::Union{Nothing, AbstractRNG}=nothing, seed::Union{Nothing, Integer}=nothing
) where T <: Integer
Graphs.Parallel.generate_reduce(
g,
(g::AbstractGraph{T})->Graphs.vertex_cover(g, alg; kw...),
(g::AbstractGraph{T})->Graphs.vertex_cover(g, alg; rng=rng, seed=seed),
(x::Vector{T}, y::Vector{T})->length(x)<length(y),
reps;
parallel=parallel
Expand Down

0 comments on commit 15ca042

Please sign in to comment.