Exemple #1
0
 public Tree_Serialization()
 {
     testcases.Add(new InOut <char>(Helfer.AssembleBTreeCharPreOrder("abcf//ksz//kql//kqk/elstw/gh/legpwgw/"), c => c + "", s => s[0]));
     testcases.Add(new InOut <int>(Helfer.AssembleBTreePreOrder("/"), i => i + "", int.Parse));
     testcases.Add(new InOut <char>(Helfer.AssembleBTreeCharPreOrder("a,b,c,/,/,/,f,g,/"), c => c + "", s => s[0]));
     testcases.Add(new InOut <int>(Helfer.AssembleBTreePreOrder("5,6,8,/,/,/,5,4,/"), i => i + "", int.Parse));
 }
Exemple #2
0
 public Input(string s, char n, char n1)
 {
     tree    = Helfer.AssembleBTreeCharPreOrder(s);
     this.n  = Search(n, tree.GetRoot());
     this.n1 = Search(n1, tree.GetRoot());
 }