public void DeleteComplexLeftRightRotation() { var t = Tree(8, 3, 11, 2, 5, 9, 12, 1, 4, 6, 10, 7); AssertTree(t, "8L=[3R=[2L=1|*]|[5R=4|[6R=*|7]]]|[11L=[9R=*|10]|12]"); UnsafeOrderedCollection.Remove(t, 10); AssertTree(t, "5=[3L=[2L=1|*]|4]|[8=[6R=*|7]|[11=9|12]]"); }
public void DeleteComplexRightLeftRotation() { var t = Tree(5, 3, 10, 1, 4, 8, 11, 2, 7, 9, 12, 6); AssertTree(t, "5R=[3L=[1R=*|2]|4]|[10L=[8L=[7L=6|*]|9]|[11R=*|12]]"); UnsafeOrderedCollection.Remove(t, 2); AssertTree(t, "8=[5=[3=1|4]|[7L=6|*]]|[10R=9|[11R=*|12]]"); }
public void DeleteComplexRightRotation() { var t = Tree(5, 3, 7, 2, 4, 6, 1); AssertTree(t, "5L=[3L=[2L=1|*]|4]|[7L=6|*]"); UnsafeOrderedCollection.Remove(t, 6); AssertTree(t, "3=[2L=1|*]|[5=4|7]"); }
public void DeleteComplexLeftRotation() { var t = Tree(3, 2, 5, 1, 4, 6, 7); AssertTree(t, "3R=[2L=1|*]|[5R=4|[6R=*|7]]"); UnsafeOrderedCollection.Remove(t, 1); AssertTree(t, "5=[3=2|4]|[6R=*|7]"); }
public void DeleteCase3() { UnsafeOrderedCollection *t; t = Tree(_deleteCase3); AssertTree(t, "5R=[2R=1|[3R=*|4]]|[8R=[7L=6|*]|[10R=9|[11R=*|12]]]"); UnsafeOrderedCollection.Remove(t, 1); AssertTree(t, "8=[5=[3=2|4]|[7L=6|*]]|[10R=9|[11R=*|12]]"); }
public void DeleteCase2() { UnsafeOrderedCollection *t; t = Tree(_deleteCase2); AssertTree(t, "6R=[2R=1|[4=3|5]]|[9R=[8L=7|*]|[11R=10|[12R=*|13]]]"); UnsafeOrderedCollection.Remove(t, 1); AssertTree(t, "6R=[4L=[2R=*|3]|5]|[9R=[8L=7|*]|[11R=10|[12R=*|13]]]"); }
public void DeleteCase1() { UnsafeOrderedCollection *t; t = Tree(_deleteCase1); AssertTree(t, "2R=1|[4=3|5]"); UnsafeOrderedCollection.Remove(t, 1); AssertTree(t, "4L=[2R=*|3]|5"); }
public void DeleteSimpleLeftRightRotation() { var t = Tree(3, 4, 1, 2); AssertTree(t, "3L=[1R=*|2]|4"); UnsafeOrderedCollection.Remove(t, 4); AssertTree(t, "2=1|3"); UnsafeOrderedCollection.Free(t); }
public void DeleteSimpleRightRotation() { var t = Tree(3, 2, 4, 1); AssertTree(t, "3L=[2L=1|*]|4"); UnsafeOrderedCollection.Remove(t, 4); AssertTree(t, "2=1|3"); UnsafeOrderedCollection.Free(t); }
public void DeleteSimpleRightLeftRotation() { var t = Tree(2, 1, 4, 3); AssertTree(t, "2R=1|[4L=3|*]"); UnsafeOrderedCollection.Remove(t, 1); AssertTree(t, "3=2|4"); UnsafeOrderedCollection.Free(t); }
public void DeleteSimpleLeftRotation() { var t = Tree(2, 1, 3, 4); AssertTree(t, "2R=1|[3R=*|4]"); UnsafeOrderedCollection.Remove(t, 1); AssertTree(t, "3=2|4"); UnsafeOrderedCollection.Free(t); }
public static void Remove <T>(UnsafeOrderedSet *set, T item) where T : unmanaged, IComparable <T> { UnsafeOrderedCollection.Remove <T>(&set->_collection, item); }