コード例 #1
0
ファイル: ComplexVector.cs プロジェクト: zyzhu/metanumerics
 /// <summary>
 /// Multiplies a complex column vector by a complex constant.
 /// </summary>
 /// <param name="alpha">The complex constant.</param>
 /// <param name="v">The complex column vector.</param>
 /// <returns>The product &#x3B1;v.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="v"/> is null.</exception>
 public static ComplexColumnVector operator *(Complex alpha, ComplexColumnVector v)
 {
     if (v == null)
     {
         throw new ArgumentNullException(nameof(v));
     }
     Complex[] product = new Complex[v.dimension];
     Blas1.zAxpy(alpha, v.store, v.offset, 1, product, 0, 1, v.dimension);
     return(new ComplexColumnVector(product, 0, v.dimension, false));
 }