# vertex_coloring

Color the vertices of a network such that no two colors are adjacent.

Parameters

network (compas.datastructures.Network) – The network object.

Notes

References

1

Chu-Carroll, M. Graph Coloring Algorithms. Available at: http://scienceblogs.com/goodmath/2007/06/28/graph-coloring-algorithms-1/.

Warning

This is a greedy algorithm, so it might be slow for large networks.

Examples

>>> import compas
>>> from compas.datastructures import Network
>>> network = Network.from_obj(compas.get('lines.obj'))