Exemple #1
0
 private static void _Backward <A, A_, B, B_>(ITuple <A, A_, B, B_> thiz, int item, object delta, Backpropagation bp)
     where A : class, IExpr <A_>
     where B : class, IExpr <B_>
 {
     if (item == 1)
     {
         thiz.Backward1((A)delta, bp);
     }
     else if (item == 2)
     {
         thiz.Backward2((B)delta, bp);
     }
     else
     {
         throw new ArgumentException(string.Format("There is no item {0} in this tuple-2.", item));
     }
 }