static public IEnumerable <Rime19> GetAllByChar(CodePoint cp) { var range = ESyllable.GetAllByChar(cp); Rime19 last = new Rime19 { _i = 0xff }; for (int i = 0; i < range.Count; ++i) { var syl = range[i]; var er = ESection.GetByRime(syl.Final.Index, syl.Tone); var fork = _erTo19[er.Index]; var curr = new Rime19 { _i = (fork.First == 30 /*泰*/ && !syl.Final.Rounded) ? fork.Second : fork.First }; if (!curr.Equals(last)) { yield return(last = curr); if (fork.Count == 2 && (er.Title == '佳' || er.Title == '卦') && _jias.Contains(cp)) { yield return(last = new Rime19 { _i = fork.Second }); } } } }
static public IEnumerable <Rime106> GetAllByChar(CodePoint cp) { Rime106 last = new Rime106 { _i = 0xFF }; foreach (var er in ESection.GetAllByChar(cp)) { Rime106 curr = Get(_erTo106[er.Index]); if (!curr.Equals(last)) { last = curr; yield return(curr); } } }
internal Fork FromEr(ESection er) { return(_erTo19[er.Index]); }