public Iter3(Sym12TernaryTable table, int arg3, int index0) : base(table, index0) { this.arg3 = arg3; while (index != Empty && table.Arg3(index) != arg3) { index = table.index3.Next(index); } }
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// public static Obj Copy(Sym12TernaryTable[] tables) { int count = 0; for (int i = 0; i < tables.Length; i++) { count += tables[i].count; } if (count == 0) { return(EmptyRelObj.singleton); } Obj[] col1 = new Obj[count]; Obj[] col2 = new Obj[count]; Obj[] col3 = new Obj[count]; int next = 0; for (int iT = 0; iT < tables.Length; iT++) { Sym12TernaryTable table = tables[iT]; SurrObjMapper mapper12 = table.mapper12; SurrObjMapper mapper3 = table.mapper3; int size = table.Capacity(); for (int iS = 0; iS < size; iS++) { int arg2 = table.Arg2OrEmptyMarker(iS); if (arg2 != Empty) { col1[next] = mapper12(table.Arg1OrNext(iS)); col2[next] = mapper12(arg2); col3[next] = mapper3(table.Arg3(iS)); next++; } } } Debug.Assert(next == count); return(Builder.CreateTernRel(col1, col2, col3, count)); }