示例#1
0
        public void Week4_Q2()
        {
            var s      = "AACGATAGCGGTAGA$";
            var order  = SuffixArray.SortCharacters(s, SuffixArray.NucleotideAlphabet);
            var actual = SuffixArray.ComputeCharClasses(s, order);

            Console.WriteLine(string.Join(",", actual.Select(i => i.ToString())));
        }
示例#2
0
        public void Week4_Q6()
        {
            var s       = "AACGATAGCGGTAGA$";
            var order   = SuffixArray.SortCharacters(s, SuffixArray.NucleotideAlphabet);
            var classes = SuffixArray.ComputeCharClasses(s, order);

            var l = 1;

            while (l < s.Length)
            {
                order   = SuffixArray.SortDoubled(s, l, order, classes);
                classes = SuffixArray.UpdateClasses(order, classes, l);
                l       = 2 * l;
            }

            Console.WriteLine(string.Join(",", order.Select(i => i.ToString())));
        }