API reference
Entry points
ColPack.ColPackColoring
— TypeColPackColoring
Struct holding the parameters of a coloring as well as its results (which can be queried with get_colors
).
Fields
The fields of this struct are not part of the public API, they are only useful to interface with the C++ library ColPack.
Constructors
ColPackColoring(
filename::AbstractString,
method::ColoringMethod,
order::ColoringOrder;
verbose::Bool=false
)
ColPackColoring(
M::SparseMatrixCSC,
method::ColoringMethod,
order::ColoringOrder;
verbose::Bool=false
)
Perform the coloring of a matrix that is either given directly or read from a file.
The users needs to specify a coloring method
and an order
on the vertices.
See also
ColPack.get_colors
— Methodget_colors(coloring::ColPackColoring; verbose=false)
Retrieve the colors from a ColPackColoring
as a vector of integers.
ColPack.matrix2adjmatrix
— Methodmatrix2adjmatrix(M::AbstractMatrix; partition_by_rows=true)
Create an adjacency matrix between the rows or between the columns of M
, depending on whether partition_by_rows
is true
or false
.
Coloring method
ColPack.ColoringMethod
— TypeColPack.acyclic_coloring
— Methodacyclic_coloring()
Shortcut for ColoringMethod("ACYCLIC")
.
ColPack.d1_coloring
— Methodd1_coloring()
Shortcut for ColoringMethod("DISTANCE_ONE")
.
ColPack.d2_coloring
— Methodd2_coloring()
Shortcut for ColoringMethod("DISTANCE_TWO")
.
ColPack.star_coloring
— Methodstar_coloring()
Shortcut for ColoringMethod("STAR")
.
Coloring order
ColPack.ColoringOrder
— TypeColPack.distance_two_incidence_degree_ordering
— Methoddistance_two_incidence_degree_ordering()
Shortcut for ColoringOrder("DISTANCE_TWO_INCIDENCE_DEGREE")
.
ColPack.distance_two_largest_first_ordering
— Methoddistance_two_largest_first_ordering()
Shortcut for ColoringOrder("DISTANCE_TWO_LARGEST_FIRST")
.
ColPack.distance_two_smallest_last_ordering
— Methoddistance_two_smallest_last_ordering()
Shortcut for ColoringOrder("DISTANCE_TWO_SMALLEST_LAST")
.
ColPack.dynamic_largest_first_ordering
— Methoddynamic_largest_first_ordering()
Shortcut for ColoringOrder("DYNAMIC_LARGEST_FIRST")
.
ColPack.incidence_degree_ordering
— Methodincidence_degree_ordering()
Shortcut for ColoringOrder("INCIDENCE_DEGREE")
.
ColPack.largest_first_ordering
— Methodlargest_first_ordering()
Shortcut for ColoringOrder("LARGEST_FIRST")
.
ColPack.natural_ordering
— Methodnatural_ordering()
Shortcut for ColoringOrder("NATURAL")
.
ColPack.random_ordering
— Methodrandom_ordering()
Shortcut for ColoringOrder("RANDOM")
.
ColPack.smallest_last_ordering
— Methodsmallest_last_ordering()
Shortcut for ColoringOrder("SMALLEST_LAST")
.
Internals
ColPack._cols_by_rows
— Method _cols_by_rows(rows_index, cols_index)
Returns a vector of rows where each row contains a vector of its column indices.
ColPack._rows_by_cols
— Method _rows_by_cols(rows_index, cols_index)
Returns a vector of columns where each column contains a vector of its row indices.