Ejemplo n.º 1
0
        //Transforms the DB to coincidence rep. by using the incision strategy
        public TransformedDB transformDB()
        {
            Dictionary <string, List <string> >       trans_db         = new Dictionary <string, List <string> >();
            Dictionary <string, Tuple <string, int> > initial_patterns = new Dictionary <string, Tuple <string, int> >();
            Dictionary <string, int> subids = new Dictionary <string, int>();

            foreach (KeyValuePair <string, EventSequence> entry in seqs)
            {
                trans_db.Add(entry.Key, IncisionStrategy.eventSeqToCoincidenceSeq(entry.Value));
                initial_patterns.Add(entry.Key, new Tuple <string, int>("", -1));
                subids.Add(entry.Key, 0);
            }
            return(new TransformedDB(trans_db, initial_patterns, subids, null, 0));
        }
Ejemplo n.º 2
0
        //compares two event intervals
        public int Compare(EventInterval other)
        {
            int st_dif = st_time - other.st_time;

            if (st_dif != 0)
            {
                return(st_dif);
            }
            int fin_dif = fin_time - other.fin_time;

            if (fin_dif != 0)
            {
                return(fin_dif);
            }
            int sym_dif = IncisionStrategy.compareSyms(sym, other.sym);

            return(sym_dif);
        }