Beispiel #1
0
 public sealed override IEnumerable <GFA> getGFAPGFAs(int pi, GFA lgfa)
 {
     return(new HashSet <GFA>(from pgtt in getGTTPGTTs(pi, lgfa.gtt)
                              let pgfa = pus[pi].tryGetGFA(lgfa.function, pgtt)
                                         where pgfa != null
                                         select pgfa));
 }
        private void updateRepI()
        {
            if (rep != null)
            {
                Debug.Assert(height < int.MaxValue / 2);
                return;
            }
            if (updatingRep)
            {
                return;
            }
            updatingRep = true;
            var repHeight = pHeight;
            GFA tobeRep   = null;

            foreach (var gfa in gfas)
            {
                var rh = gfa.height;
                if (rh < repHeight ||
                    (rh == repHeight && (
                         tobeRep == null ||
                         (rh == 1 && !tobeRep.function.isInterpreted && gfa.function.isInterpreted)
                         )
                    ))

                {
                    tobeRep   = gfa;
                    repHeight = rh;
                    Debug.Assert(rh <= pHeight);
                    pHeight = rh;
                }
            }

            for (var c = 0; c < 2; c++)
            {
                foreach (var gfa in gfas)
                {
                    foreach (var a in gfa.gtt.gtT)
                    {
                        a.updateRepI();
                    }
                    var rh = gfa.height;
                    if (rh < repHeight || (rh == repHeight && tobeRep == null))
                    {
                        tobeRep   = gfa;
                        repHeight = rh;
                    }
                }
            }
            rep = tobeRep;
            if (rep != null)
            {
                Debug.Assert(rep.height <= pHeight);
                pHeight = rep.height;
                Debug.Assert(height < int.MaxValue / 2);
            }
            Debug.Assert(updatingRep || height < int.MaxValue / 2);
            updatingRep = false;
        }
Beispiel #3
0
 public override bool isGFANewDirect(GFA gfa)
 {
     return(true);
 }