Exemplo n.º 1
0
        /// <summary>
        /// Create a new dense matrix with the diagonal as a copy of the given array.
        /// This new matrix will be independent from the array.
        /// A new memory block will be allocated for storing the matrix.
        /// </summary>
        public static DenseMatrix OfDiagonalArray(int rows, int columns, Complex32[] diagonal)
        {
            var m = new DenseMatrix(rows, columns);

            m.SetDiagonal(diagonal);
            return(m);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create a new dense matrix with the diagonal as a copy of the given array.
        /// This new matrix will be independent from the array.
        /// A new memory block will be allocated for storing the matrix.
        /// </summary>
        public static DenseMatrix OfDiagonalArray(Complex32[] diagonal)
        {
            var m = new DenseMatrix(diagonal.Length, diagonal.Length);

            m.SetDiagonal(diagonal);
            return(m);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Create a new dense matrix with the diagonal as a copy of the given vector.
        /// This new matrix will be independent from the vector.
        /// A new memory block will be allocated for storing the matrix.
        /// </summary>
        public static DenseMatrix OfDiagonalVector(int rows, int columns, Vector <Complex32> diagonal)
        {
            var m = new DenseMatrix(rows, columns);

            m.SetDiagonal(diagonal);
            return(m);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Create a new dense matrix with the diagonal as a copy of the given vector.
        /// This new matrix will be independent from the vector.
        /// A new memory block will be allocated for storing the matrix.
        /// </summary>
        public static DenseMatrix OfDiagonalVector(Vector <Complex32> diagonal)
        {
            var m = new DenseMatrix(diagonal.Count, diagonal.Count);

            m.SetDiagonal(diagonal);
            return(m);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Create a new dense matrix with the diagonal as a copy of the given vector.
 /// This new matrix will be independent from the vector.
 /// A new memory block will be allocated for storing the matrix.
 /// </summary>
 public static DenseMatrix OfDiagonalVector(int rows, int columns, Vector<Complex32> diagonal)
 {
     var m = new DenseMatrix(rows, columns);
     m.SetDiagonal(diagonal);
     return m;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Create a new dense matrix with the diagonal as a copy of the given vector.
 /// This new matrix will be independent from the vector.
 /// A new memory block will be allocated for storing the matrix.
 /// </summary>
 public static DenseMatrix OfDiagonalVector(Vector<Complex32> diagonal)
 {
     var m = new DenseMatrix(diagonal.Count, diagonal.Count);
     m.SetDiagonal(diagonal);
     return m;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Create a new dense matrix with the diagonal as a copy of the given array.
 /// This new matrix will be independent from the array.
 /// A new memory block will be allocated for storing the matrix.
 /// </summary>
 public static DenseMatrix OfDiagonalArray(int rows, int columns, Complex32[] diagonal)
 {
     var m = new DenseMatrix(rows, columns);
     m.SetDiagonal(diagonal);
     return m;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Create a new dense matrix with the diagonal as a copy of the given array.
 /// This new matrix will be independent from the array.
 /// A new memory block will be allocated for storing the matrix.
 /// </summary>
 public static DenseMatrix OfDiagonalArray(Complex32[] diagonal)
 {
     var m = new DenseMatrix(diagonal.Length, diagonal.Length);
     m.SetDiagonal(diagonal);
     return m;
 }