     [(+ sup-crossings sub-crossings) marked]))
 
 
-(defn flip-graph
-  "Flips a graph along the axis perpendicular to the layers, so that nodes and
-  edges within a layer reverse their order, more or less. This doesn't touch
-  some of the attributes of a layer that give us an ordering, but only the maps
-  that we need to touch during coordinate assignment"
-  [graph]
-  (assoc graph
-    :aboves (:belows graph)
-    :belows (:aboves graph)
-    :top-idxs (:bot-idxs graph)
-    :bot-idxs (:top-idxs graph)))
-
-
 (defn SparseGraph->OrderedGraph
   "Performs one layer-by-layer sweep of the graph using ESK's algorithm"
   [sparse-graph first-layer]

    (map->FlatGraph {:layers layers
                     :succs (:succs cm-graph)
                     :preds (:preds cm-graph)
                     :marked (:marked cm-graph)
                     :aboves aboves
                     :belows belows
                     :top-idxs top-idxs
                     :bot-idxs bot-idxs})))


(defn check-alignment

(defprotocol Reversible
  (rev [item] "It... reverses"))

(defprotocol Flippable
  (flip [item] "Flips a graph along the axis perpendicular to the layers, so
                that nodes and edges within a layer reverse their order"))

(defrecord Node [id layer-id characters weight])

