coloring: add `POSetConflictGraph:order`
authorJean Privat <jean@pryen.org>
Mon, 23 Mar 2015 06:18:44 +0000 (13:18 +0700)
committerJean Privat <jean@pryen.org>
Mon, 23 Mar 2015 08:27:34 +0000 (15:27 +0700)
to factorize the linearization

Signed-off-by: Jean Privat <jean@pryen.org>

src/compiler/coloring.nit

index b2f4837..4746bc4 100644 (file)
@@ -47,11 +47,15 @@ class POSetConflictGraph[E: Object]
 
        var poset: POSet[E]
 
+       # The linearisation order to visit elements in the poset
+       var order: Array[E] is noinit
+
        init do
                extract_core
                extract_border
                extract_crown
                compute_conflicts
+               order = poset.linearize(poset)
        end
 
        # Compute the set of elements forming the core of the poset hierarchy.