Example #1
0
        /// <summary>
        /// return a / s
        /// </summary>
        /// <param name="a"></param>
        /// <param name="s"></param>
        /// <returns></returns>
        public static Matrix Divide(Matrix a, double s) {
            a.ShouldNotBeNull("a");
            Guard.Assert<DivideByZeroException>(s != 0.0, @"s is zero.");

            var result = new Matrix(a.Rows, a.Cols);
            result.Divide(a, s);
            return result;
        }
Example #2
0
        /// <summary>
        /// return a / b
        /// </summary>
        /// <param name="a"></param>
        /// <param name="b"></param>
        /// <returns></returns>
        public static Matrix Divide(Matrix a, Matrix b) {
            a.ShouldNotBeNull("a");
            b.ShouldNotBeNull("b");
            CheckSameDimension(a, b);
            var result = new Matrix(a.Rows, b.Cols);
            result.Divide(a, b);

            return result;
        }