In interface.jl we have:
function coloring(
S::AbstractMatrix,
::ColoringProblem{:symmetric,:column,:direct},
algo::GreedyColoringAlgorithm,
)
ag = adjacency_graph(S)
color, star_set = star_coloring(ag, algo.order)
# TODO: handle star_set
return DefaultColoringResult{:symmetric,:column,:direct}(S, color)
end
function coloring(
S::AbstractMatrix,
::ColoringProblem{:symmetric,:column,:substitution},
algo::GreedyColoringAlgorithm,
)
ag = adjacency_graph(S)
color, tree_set = acyclic_coloring(ag, algo.order)
# TODO: handle tree_set
return DefaultColoringResult{:symmetric,:column,:substitution}(S, color)
end
Should we also add:
function coloring(
S::AbstractMatrix,
::ColoringProblem{:symmetric,:row,:direct},
algo::GreedyColoringAlgorithm,
)
ag = adjacency_graph(S)
color, star_set = star_coloring(ag, algo.order)
# TODO: handle star_set
return DefaultColoringResult{:symmetric,:row,:direct}(S, color)
end
function coloring(
S::AbstractMatrix,
::ColoringProblem{:symmetric,:row,:substitution},
algo::GreedyColoringAlgorithm,
)
ag = adjacency_graph(S)
color, tree_set = acyclic_coloring(ag, algo.order)
# TODO: handle tree_set
return DefaultColoringResult{:symmetric,:row,:substitution}(S, color)
end
Alternative solution:
Should we add a :row_or_column entry to the partition, and only allow it if structure == :symmetric?
In
interface.jlwe have:Should we also add:
Alternative solution:
Should we add a
:row_or_columnentry to the partition, and only allow it ifstructure == :symmetric?