Dot() public static method

Dot product between a matrix and a vector.
Thrown when the requested operation is invalid.
public static Dot ( Matrix x, Vector v ) : Vector
x Matrix Matrix x.
v Vector Vector v.
return Vector
Example #1
0
        /// <summary>Multiplication operator.</summary>
        /// <param name="v">The Vector to process.</param>
        /// <param name="m">The Matrix to process.</param>
        /// <returns>The result of the operation.</returns>
        public static Matrix operator *(Vector v, Matrix m)
        {
            Vector ans = Matrix.Dot(v, m);

            return(ans.ToMatrix(VectorType.Row));
        }
Example #2
0
        /// <summary>Multiplication operator.</summary>
        /// <param name="m">The Matrix to process.</param>
        /// <param name="v">The Vector to process.</param>
        /// <returns>The result of the operation.</returns>
        public static Matrix operator *(Matrix m, Vector v)
        {
            Vector ans = Matrix.Dot(m, v);

            return(ans.ToMatrix(VectorType.Col));
        }