Skip to content
Merged
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
8 changes: 0 additions & 8 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ column_groups
row_groups
```

### ADTypes interface

```@docs
column_coloring
row_coloring
symmetric_coloring
```

## Public, not exported

### Decompression
Expand Down
27 changes: 9 additions & 18 deletions src/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,29 +179,20 @@ end

## ADTypes interface

"""
ADTypes.column_coloring(S::AbstractMatrix, algo::GreedyColoringAlgorithm)

Call [`column_coloring_detailed`](@ref) and return only the vector of column colors.
"""
function ADTypes.column_coloring(S::AbstractMatrix, algo::GreedyColoringAlgorithm)
return column_colors(column_coloring_detailed(S, algo))
bg = bipartite_graph(S)
color = partial_distance2_coloring(bg, Val(2), algo.order)
return color
end

"""
ADTypes.row_coloring(S::AbstractMatrix, algo::GreedyColoringAlgorithm)

Call [`row_coloring_detailed`](@ref) and return only the vector of column colors.
"""
function ADTypes.row_coloring(S::AbstractMatrix, algo::GreedyColoringAlgorithm)
return row_colors(row_coloring_detailed(S, algo))
bg = bipartite_graph(S)
color = partial_distance2_coloring(bg, Val(1), algo.order)
return color
end

"""
ADTypes.symmetric_coloring(S::AbstractMatrix, algo::GreedyColoringAlgorithm)

Call [`symmetric_coloring_detailed`](@ref) and return only the vector of column colors.
"""
function ADTypes.symmetric_coloring(S::AbstractMatrix, algo::GreedyColoringAlgorithm)
return column_colors(symmetric_coloring_detailed(S, algo))
ag = adjacency_graph(S)
color, star_set = star_coloring(ag, algo.order)
return color
end