Exemplo n.º 1
0
        public static void runTIRPClo(SequenceDB tdb)
        {
            //int count = 0;
            List <string> rks = new List <string>();

            foreach (KeyValuePair <string, MasterTiep> mtiep in TiepsHandler.master_tieps)
            {
                if (mtiep.Value.supporting_entities.Count < Constants.MINSUP)
                {
                    rks.Add(mtiep.Key);
                }
            }
            foreach (string rk in rks)
            {
                TiepsHandler.master_tieps.Remove(rk);
            }
            tdb.filterInfrequentTiepsFromInitialSDB();
            foreach (KeyValuePair <string, MasterTiep> mtiep in TiepsHandler.master_tieps)
            {
                //count++;
                //For each frequent start tiep
                string t = mtiep.Key;
                //Console.WriteLine(t + ", " + count + "/" + TiepsHandler.master_tieps.Count);
                if (t[t.Length - 1] == Constants.ST_REP)
                {
                    //Project the sequence db by the tiep
                    SequenceDB projDB = tdb.first_projectDB(t, mtiep.Value.supporting_entities);
                    extendTIRP(projDB, t, null);
                }
            }
        }
Exemplo n.º 2
0
        public static void runTIRPClo(SequenceDB tdb)
        {
            //int count = 0;
            List <string> rks = new List <string>();

            foreach (KeyValuePair <string, MasterTiep> mtiep in TiepsHandler.master_tieps)
            {
                if (mtiep.Value.supporting_entities.Count < Constants.MINSUP)
                {
                    rks.Add(mtiep.Key);
                }
            }
            foreach (string rk in rks)
            {
                TiepsHandler.master_tieps.Remove(rk);
            }
            tdb.filterInfrequentTiepsFromInitialSDB();
            foreach (KeyValuePair <string, MasterTiep> mtiep in TiepsHandler.master_tieps)
            {
                //For each frequent start tiep
                //count++;
                string t = mtiep.Key;
                //Console.WriteLine(count + "/" + TiepsHandler.master_tieps.Count + "/" + t);
                if (t[t.Length - 1] == Constants.ST_REP)
                {
                    //Project the sequence db by the tiep
                    bool is_closed = true;
                    Dictionary <string, List <BETiep> > bets = new Dictionary <string, List <BETiep> >();
                    SequenceDB projDB = tdb.first_projectDB(t, mtiep.Value.supporting_entities, ref is_closed, ref bets);
                    //Continue only if it can be extended to form a closed TIRP
                    if (is_closed)
                    {
                        extendTIRP(t, projDB, t, null, ref bets);
                    }
                }
            }
        }