示例#1
0
        static Hashtable process(ArrayList words, int level)
        {
            Hashtable t = new Hashtable();
            foreach (string s in words)
            {
                Word w = new Word(s);
                object key = w.getpoint(level);
                if (t.ContainsKey(key))
                {
                    ArrayList a = (ArrayList)t[key];
                    a.Add(s);
                }
                else
                {
                    ArrayList a = new ArrayList();
                    a.Add(s);
                    t.Add(key, a);
                }
            }

            return t;
        }
示例#2
0
        static void x()
        {
            String s = "sty"; //efferent overfeed seepweed tenderee underfed unreefed unseeded weepered
            String s1 = "stz";
            Word w = new Word(s);
            Word w1 = new Word(s1);

            Point x = w.getpoint(0);
            Point xx = w.getpoint(0);
            bool aa = xx.Equals(x);
            //Point y = w1.getpoint(3);
            //int d = x.diff(y);
            //RTree<Word> tree = new RTree.RTree<Word>();
            //Hashtable t = processR(words);
        }