public override void Init(LongSegment tapeSeg) { tapeSegContext.KSetCommodities = new SortedDictionary <long, Commodity>(); tapeSegContext.KSetZetaSubset = new SortedDictionary <long, SortedSet <long> >(); tapeSeg.ForEach(e => tapeSegContext.KSetZetaSubset[(long)e] = new SortedSet <long>()); meapContext.KSetZetaSets.Where(s => tapeSeg.Contains(s.Key)).ToList() .ForEach( p => { List <Commodity> commodities = p.Value; commodities.ForEach(w => tapeSegContext.KSetCommodities[w.Id] = w); tapeSegContext.KSetZetaSubset[p.Key].UnionWith( p.Value.Select(v => v.Id)); }); tapeSegContext.TArbSeqCFGUnusedNodes = new SortedSet <long>(); }
public abstract void Init(LongSegment tapeSeg);
public LongSegment(LongSegment s) { this.Left = s.Left; this.Right = s.Right; }