/// <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, float[] diagonal) { var m = new DenseMatrix(rows, columns); m.SetDiagonal(diagonal); return(m); }
/// <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(float[] diagonal) { var m = new DenseMatrix(diagonal.Length, diagonal.Length); m.SetDiagonal(diagonal); return(m); }
/// <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 <float> diagonal) { var m = new DenseMatrix(rows, columns); m.SetDiagonal(diagonal); return(m); }
/// <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 <float> diagonal) { var m = new DenseMatrix(diagonal.Count, diagonal.Count); m.SetDiagonal(diagonal); return(m); }
/// <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<float> diagonal) { var m = new DenseMatrix(rows, columns); m.SetDiagonal(diagonal); return m; }
/// <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<float> diagonal) { var m = new DenseMatrix(diagonal.Count, diagonal.Count); m.SetDiagonal(diagonal); return m; }
/// <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, float[] diagonal) { var m = new DenseMatrix(rows, columns); m.SetDiagonal(diagonal); return m; }
/// <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(float[] diagonal) { var m = new DenseMatrix(diagonal.Length, diagonal.Length); m.SetDiagonal(diagonal); return m; }