Ejemplo n.º 1
0
 public MathematicaScalar this[int row, int column] =>
 MathematicaScalar.Create(
     CasInterface,
     IsFullMatrix()
             ? Expression.Args[row].Args[column]
             : CasInterface[Mfs.Part[Expression, (row + 1).ToExpr(), (column + 1).ToExpr()]]
     );
Ejemplo n.º 2
0
        public static MathematicaScalar operator *(MathematicaVector vector1, MathematicaVector vector2)
        {
            var e = vector1.CasInterface[Mfs.Dot[vector1.Expression, vector2.Expression]];

            return(MathematicaScalar.Create(vector1.CasInterface, e));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Euclidean norm squared of a vector
        /// </summary>
        /// <returns></returns>
        public MathematicaScalar Norm2()
        {
            var e = CasInterface[Mfs.Dot[Expression, Expression]];

            return(MathematicaScalar.Create(CasInterface, e));
        }
Ejemplo n.º 4
0
 public MathematicaScalar this[int index] => MathematicaScalar.Create(
     CasInterface,
     IsFullVector()
         ? Expression.Args[index]
         : CasInterface[Mfs.Part[Expression, (index + 1).ToExpr()]]
     );
Ejemplo n.º 5
0
        /// <summary>
        /// Euclidean norm squared of a vector
        /// </summary>
        /// <returns></returns>
        public MathematicaScalar Norm2()
        {
            var e = CasInterface[Mfs.Dot[MathExpr, MathExpr]];

            return(MathematicaScalar.Create(CasInterface, e));
        }