예제 #1
0
        public static void Sort <TNode, TNodeList>(
            ref BidiNodeUtility <TNode> .Dump Dump, ref TNodeList List)
            where TNode : class, IBidiNode <TNode>, IComparable <TNode> where TNodeList : struct, IBidiNodeList <TNode>
        {
            BidiNodeUtility <TNode> .LinkList Link;
            BidiNodeUtility <TNode> .Alloc(ref List, ref Dump, out Link);

            Sort(ref Link);
            List.First = Link.First.Data;
            List.Last  = Link.Last.Data;
            BidiNodeUtility <TNode> .FreeAssign(ref Link, ref Dump);
        }
예제 #2
0
        public static void Sort <TNode>(
            ref BidiNodeUtility <TNode> .Dump Dump, IBidiNodeList <TNode> List, Comparison <TNode> Comparison)
            where TNode : class, IBidiNode <TNode>
        {
            BidiNodeUtility <TNode> .LinkList Link;
            BidiNodeUtility <TNode> .Alloc(List, ref Dump, out Link);

            Sort(ref Link, Comparison);
            List.First = Link.First.Data;
            List.Last  = Link.Last.Data;
            BidiNodeUtility <TNode> .FreeAssign(ref Link, ref Dump);
        }