Description Usage Arguments Value Author(s) References
This algorithm colours the nodes in sequential order, where the order is given through a breadth first search algorithm started on a pre-specified start-node.
1 2 | colour_graph(adj.matrix, numcolours, method = "BFS", startnode = 1,
obs = NULL)
|
adj.matrix |
the graphs adjacency matrix (usually sparse) |
numcolours |
the maximum number of colours to try out with the |
method |
takes values |
startnode |
the starting node for the BFS algorithm |
obs |
an |
a data frame with the associated colour for each vertex (also class
)
Andrew Zammit Mangion
http://community.topcoder.com/longcontest/?module=Static&d1=match_editorials&d2=intel_mtcs_10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.