예제 #1
0
        private XVector3 GetFurthestVertFrom(XVector3 o)
        {
            MaxHeap <XVector3> sorter = new MaxHeap <XVector3>((XVector3 a, XVector3 b) =>
            {
                return((XVector3.Distance(o, a) <= XVector3.Distance(o, b)) ? -1 : 1);
            });

            foreach (XVector3 vert in _verts)
            {
                sorter.Add(vert);
            }

            return(sorter.Remove());
        }
예제 #2
0
 public SecureSortedSet()
 {
     _Map       = new Map <T0, T1>();
     _MaxSorter = new MaxHeap <T1>(null);
     _MinSorter = new MinHeap <T1>(null);
 }
예제 #3
0
 public SecureSortedSet(Comparison <T1> comparer)
 {
     _Map       = new Map <T0, T1>();
     _MaxSorter = new MaxHeap <T1>(comparer);
     _MinSorter = new MinHeap <T1>(comparer);
 }