Skip to content

Commit 34f59ef

Browse files
committed
Minimize diff
1 parent 0185130 commit 34f59ef

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

src/coloring.jl

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,7 @@ struct StarSet{T}
250250
end
251251

252252
"""
253-
acyclic_coloring(
254-
g::AdjacencyGraph, vertices_in_order::AbstractVector, postprocessing::Bool;
255-
forced_colors::Union{AbstractVector,Nothing}=nothing
256-
)
253+
acyclic_coloring(g::AdjacencyGraph, vertices_in_order::AbstractVector, postprocessing::Bool)
257254
258255
Compute an acyclic coloring of all vertices in the adjacency graph `g` and return a tuple `(color, tree_set)`, where
259256
@@ -266,8 +263,6 @@ The vertices are colored in a greedy fashion, following the order supplied.
266263
267264
If `postprocessing=true`, some colors might be replaced with `0` (the "neutral" color) as long as they are not needed during decompression.
268265
269-
The optional `forced_colors` keyword argument is used to enforce predefined vertex colors (e.g. coming from another optimization algorithm) but still run the acyclic coloring procedure to verify correctness and build auxiliary data structures, useful during decompression.
270-
271266
# See also
272267
273268
- [`AdjacencyGraph`](@ref)
@@ -278,10 +273,7 @@ The optional `forced_colors` keyword argument is used to enforce predefined vert
278273
> [_New Acyclic and Star Coloring Algorithms with Application to Computing Hessians_](https://epubs.siam.org/doi/abs/10.1137/050639879), Gebremedhin et al. (2007), Algorithm 3.1
279274
"""
280275
function acyclic_coloring(
281-
g::AdjacencyGraph{T},
282-
vertices_in_order::AbstractVector{<:Integer},
283-
postprocessing::Bool;
284-
forced_colors::Union{AbstractVector{<:Integer},Nothing}=nothing,
276+
g::AdjacencyGraph{T}, vertices_in_order::AbstractVector{<:Integer}, postprocessing::Bool
285277
) where {T<:Integer}
286278
# Initialize data structures
287279
nv = nb_vertices(g)

src/interface.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,7 @@ function _coloring(
320320
::ColoringProblem{:nonsymmetric,:bidirectional},
321321
algo::GreedyColoringAlgorithm{:direct},
322322
decompression_eltype::Type{R},
323-
symmetric_pattern::Bool;
324-
forced_colors::Union{AbstractVector{<:Integer},Nothing}=nothing,
323+
symmetric_pattern::Bool,
325324
) where {R}
326325
A_and_Aᵀ, edge_to_index = bidirectional_pattern(A; symmetric_pattern)
327326
ag = AdjacencyGraph(A_and_Aᵀ, edge_to_index; has_diagonal=false)
@@ -368,8 +367,7 @@ function _coloring(
368367
::ColoringProblem{:nonsymmetric,:bidirectional},
369368
algo::GreedyColoringAlgorithm{:substitution},
370369
decompression_eltype::Type{R},
371-
symmetric_pattern::Bool;
372-
forced_colors::Union{AbstractVector{<:Integer},Nothing}=nothing,
370+
symmetric_pattern::Bool,
373371
) where {R}
374372
A_and_Aᵀ, edge_to_index = bidirectional_pattern(A; symmetric_pattern)
375373
ag = AdjacencyGraph(A_and_Aᵀ, edge_to_index; has_diagonal=false)

0 commit comments

Comments
 (0)