topology¤
Topological properties of meshes.
Colouring¤
is_adjacency_two_colorable
¤
Try to color a data of adjacency with two colors only withtout any element adjacent to each other having the same colour.
Parameters:
-
adjacency(dict) –Dictionary of adjacency between elements, each elements points to the list of adjacent elements.
Returns:
-
key_to_color((dict, None)) –A dictionary with vertex keys pointing to colors, if two-colorable. None if not two-colorable.