Beispiel #1
0
 public TernaryTableUpdater(TernaryTable table, ValueStoreUpdater store1, ValueStoreUpdater store2, ValueStoreUpdater store3)
 {
     this.table  = table;
     this.store1 = store1;
     this.store2 = store2;
     this.store3 = store3;
 }
Beispiel #2
0
 public Iter(uint field1, uint field2, uint field3, uint index, Type type, TernaryTable table)
 {
     this.field1 = field1;
     this.field2 = field2;
     this.field3 = field3;
     this.index  = index;
     this.type   = type;
     this.table  = table;
     if (index != Tuple.Empty)
     {
         Tuple tuple = table.tuples[index];
         bool  ok1   = field1 == Tuple.Empty | tuple.field1OrNext == field1;
         bool  ok2   = field2 == Tuple.Empty | tuple.field2OrEmptyMarker == field2;
         bool  ok3   = field3 == Tuple.Empty | tuple.field3 == field3;
         if ((type == Type.F123 & tuple.field2OrEmptyMarker == Tuple.Empty) | !ok1 | !ok2 | !ok3)
         {
             Next();
         }
     }
 }
Beispiel #3
0
        public static bool TableContains(TernaryTable table, Obj field1, Obj field2, Obj field3)
        {
            int surr1 = table.store1.LookupValue(field1);

            if (surr1 == -1)
            {
                return(false);
            }
            int surr2 = table.store2.LookupValue(field2);

            if (surr2 == -1)
            {
                return(false);
            }
            int surr3 = table.store3.LookupValue(field3);

            if (surr3 == -1)
            {
                return(false);
            }
            return(table.Contains((uint)surr1, (uint)surr2, (uint)surr3));
        }