MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / generate_colorings

Function generate_colorings

src/backtracking/graph_coloring.rs:25–30  ·  view source on GitHub ↗

Generates all possible valid colorings of a graph. # Arguments `adjacency_matrix` - A 2D vector representing the adjacency matrix of the graph. `num_colors` - The number of colors available for coloring the graph. # Returns A `Result` containing an `Option` with a vector of solutions or a `GraphColoringError` if there is an issue with the matrix.

(
    adjacency_matrix: Vec<Vec<bool>>,
    num_colors: usize,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

find_solutionsMethod · 0.80

Tested by

no test coverage detected