/// <summary> /// Divides a row vector by a real, scalar constant. /// </summary> /// <param name="alpha">The real, scalar constant.</param> /// <param name="v">The row vector.</param> /// <returns>The result.</returns> public static RowVector operator /(RowVector v, double alpha) { if (v == null) { throw new ArgumentNullException(nameof(v)); } double[] store = VectorAlgorithms.Multiply(1.0 / alpha, v.store, v.offset, v.stride, v.dimension); return(new RowVector(store, v.dimension)); }
/// <summary> /// Multiplies a column vector by a real, scalar constant. /// </summary> /// <param name="alpha">The real, scalar constant.</param> /// <param name="v">The column vector.</param> /// <returns>The product αv.</returns> public static ColumnVector operator *(double alpha, ColumnVector v) { if (v == null) { throw new ArgumentNullException(nameof(v)); } double[] store = VectorAlgorithms.Multiply(alpha, v.store, v.offset, v.stride, v.dimension); return(new ColumnVector(store, v.dimension)); }