Ejemplo n.º 1
0
        public static Matrix operator *(Matrix matrix, double number)
        {
            if (matrix == null)
            {
                throw new ArgumentNullException(nameof(matrix));
            }

            return(CalculateProvider.Multiply(matrix, number));
        }
Ejemplo n.º 2
0
        public static Matrix operator *(Matrix leftSide, Matrix rightSide)
        {
            if (leftSide == null)
            {
                throw new ArgumentNullException(nameof(leftSide));
            }

            if (rightSide == null)
            {
                throw new ArgumentNullException(nameof(rightSide));
            }

            if (leftSide.ColumnsCount != rightSide.RowsCount)
            {
                throw new DimensionsDontMatchException("Multiplication is impossible");
            }

            return(CalculateProvider.Multiply(leftSide, rightSide));
        }