• Kirill Smelkov's avatar
    X fix metric to keep Z <- N order stable over key^ · fb56193f
    Kirill Smelkov authored
    with just sum of abs, it was reverting the order for e.g.
    
    	[2,3) [3,∞)  wrt  [-∞,1) [1,2)
    
    where cost matrix was
    
    	⎡∞ + 4  2⋅∞ + 2⎤
    	⎢              ⎥
    	⎣  2       ∞   ⎦
    
    and 0-0 + 1-1 is the same as 0-1 + 1-0
    
    with squares 2 in (2⋅∞)² becomes 4 and wins ∞²+∞².
    
    This assert in T2/T1-T3/B0-B1-T-T/B2-B3 -> T2/T1-T/T-T-B2,3/B0-B1.
    fb56193f
xbtree.py 33.4 KB