Ejemplo n.º 1
0
 public Expr this[IGaSymMultivector mv1]
 => _factorsList.Count == 0
         ? Expr.INT_ZERO
         : Mfs.SumExpr(
     _factorsList
     .Select(term => Mfs.Times[term.Item2, mv1[term.Item1]])
     .ToArray()
     );
Ejemplo n.º 2
0
            public Expr this[IGaSymMultivector mv1, IGaSymMultivector mv2]
            {
                get
                {
                    if (_factorsList.Count == 0)
                    {
                        return(Expr.INT_ZERO);
                    }

                    var termsExprArray =
                        _factorsList
                        .Select(factor => Mfs.ProductExpr(
                                    mv1[factor.Item1],
                                    mv2[factor.Item2],
                                    factor.Item3
                                    )).ToArray();

                    return(termsExprArray.Length == 1
                        ? termsExprArray[0]
                        : Mfs.SumExpr(termsExprArray));
                }
            }