Skip to content

Question about symmetric coloring #22

@amontoison

Description

@amontoison

For the following matrix, how can I know if I should use the "compressed columns" in the AD context associated to colors[i] or colors[j] to determine the coefficient H[i,j]?

10×10 SparseMatrixCSC{Float64, Int64} with 58 stored entries:
 2.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  2.0  2.0
 1.0  2.0                          1.0  1.0
 1.0      2.0                      1.0  1.0
 1.0          2.0                  1.0  1.0
 1.0              2.0              1.0  1.0
 1.0                  2.0          1.0  1.0
 1.0                      2.0      1.0  1.0
 1.0                          2.0  1.0  1.0
 2.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  2.0  1.0
 2.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0  2.0

julia> colors = symmetric_coloring(H, GreedyColoringAlgorithm())
10-element Vector{Int64}:
 1
 2
 2
 2
 2
 2
 2
 2
 3
 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions