Exemple #1
0
        public static TensorOld <double> DoDoubleCellByCell <TIn1, TIn2>(this TensorOld <TIn1> t1, TensorOld <TIn2> t2, Func <double, double, double> operation)
        {
            var converter1 = NumericUtils.GetConverterToDouble <TIn1>();
            var converter2 = NumericUtils.GetConverterToDouble <TIn2>();

            return(t1.DoCellByCell(t2, (TIn1 item1, TIn2 item2) => operation(converter1(item1), converter2(item2))));
        }
Exemple #2
0
        public static TensorOld <int> DoIntCellByCell <TIn1, TIn2>(this TensorOld <TIn1> t1, TensorOld <TIn2> t2, Func <int, int, int> operation)
        {
            var converter1 = NumericUtils.GetNumericConverter <TIn1, int>();
            var converter2 = NumericUtils.GetNumericConverter <TIn2, int>();

            return(t1.DoCellByCell(t2, (TIn1 item1, TIn2 item2) => operation(converter1(item1), converter2(item2))));
        }