예제 #1
0
        /// <summary>
        /// sort utilizing bucket sort
        /// </summary>
        /// <typeparam name="SubelementType">subelement type</typeparam>
        /// <param name="mapper">keymapper mapping subelement items to buckets</param>
        public void Sort <SubelementType>(ILKeyMapper <T1, SubelementType> mapper)
        {
            ILQueueList <T1, T2> ret = ILBucketSort.BucketSort <T1, SubelementType, T2>(this, null, mapper, ILBucketSort.SortMethod.ConstantLength);

            this.Head = ret.Head;
            this.Tail = ret.Tail;
        }
예제 #2
0
 /// <summary>
 /// add queue list to end of this queue list
 /// </summary>
 /// <param name="list">queue list to be added</param>
 public void Enqueue(ILQueueList <T1, T2> list)
 {
     if (list == null || list.Count == 0)
     {
         return;
     }
     if (Tail != null)
     {
         Tail.Next = list.Head;
         Tail      = list.Tail;
     }
     else
     {
         Head = list.Head;
         Tail = list.Tail;
     }
     m_count += list.m_count;
 }
예제 #3
0
 /// <summary>
 /// concatenate 2 queuelists
 /// </summary>
 /// <param name="qlist">queue list to be added at start of this queuelist</param>
 public void AddToStart(ILQueueList <T1, T2> qlist)
 {
     m_count        += qlist.m_count;
     qlist.Tail.Next = Head;
     Head            = qlist.Head;
 }