private IDictionary <Label, Label> GetOldNewStatesMap(SetsOfEquivalence setsOfEquivalence) { return(setsOfEquivalence.SelectMany(item => item.Select(subitem => new Tuple <Label, Label>(subitem, item.First()))). ToDictionary(item => item.Item1, item => item.Item2)); }
private IDictionary <Label, int> GetStatesMap(SetsOfEquivalence setsOfEquivalence) { return(setsOfEquivalence.SelectMany((set, index) => set.Select(item => new KeyValuePair <Label, int>(item, index))).ToDictionary()); }