-
Notifications
You must be signed in to change notification settings - Fork 3
Sort First Column
-
Compute a rank for every port in D. A port
p1
has lower rank thanp2
if it is above or to the left ofp2
in the drawing of D. -
Compute an output score for every output port vector V in D.
-
Associate with each output port in V the rank of the input port to which it is connected.
-
Let
min
be the minimum rank andmax
be the maximum rank. -
Return the interval
(min, max)
as the score.
-
-
Compute a score for every instance I in D.
-
If there are no output ports in I, then return a default score
(0, N)
, whereN
is a large number. This ensures that I will never compare less than or greater than any other instance. -
Otherwise the score is an interval
(min, max)
, wheremin
is the min of the min over all the scores of the output port vectors in I, andmax
is the max of the max.
-
-
Sort the instances according to their scores, lowest first, where
(min1, max1) < (min2, max2)
ifmax1 < min2
. -
For each instance, sort the port vectors according to their scores.