|
|
|
@ -199,7 +199,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// </summary>
|
|
|
|
/// <param name="other">The matrix to add to this matrix.</param>
|
|
|
|
/// <param name="result">The matrix to store the result of the addition.</param>
|
|
|
|
/// <exception cref="ArgumentNullException">If the other matrix is <see langword="null"/>.</exception>
|
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If the two matrices don't have the same dimensions.</exception>
|
|
|
|
protected override void DoAdd(Matrix<Complex> other, Matrix<Complex> result) |
|
|
|
{ |
|
|
|
@ -221,7 +220,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// </summary>
|
|
|
|
/// <param name="other">The matrix to subtract.</param>
|
|
|
|
/// <param name="result">The matrix to store the result of the subtraction.</param>
|
|
|
|
/// <exception cref="ArgumentNullException">If the other matrix is <see langword="null"/>.</exception>
|
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If the two matrices don't have the same dimensions.</exception>
|
|
|
|
protected override void DoSubtract(Matrix<Complex> other, Matrix<Complex> result) |
|
|
|
{ |
|
|
|
@ -243,18 +241,12 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The array to copy the values from. The length of the vector should be
|
|
|
|
/// Min(Rows, Columns).</param>
|
|
|
|
/// <exception cref="ArgumentNullException">If <paramref name="source"/> is <see langword="null" />.</exception>
|
|
|
|
/// <exception cref="ArgumentException">If the length of <paramref name="source"/> does not
|
|
|
|
/// equal Min(Rows, Columns).</exception>
|
|
|
|
/// <remarks>For non-square matrices, the elements of <paramref name="source"/> are copied to
|
|
|
|
/// this[i,i].</remarks>
|
|
|
|
public override void SetDiagonal(Complex[] source) |
|
|
|
{ |
|
|
|
if (source == null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException("source"); |
|
|
|
} |
|
|
|
|
|
|
|
if (source.Length != _data.Length) |
|
|
|
{ |
|
|
|
throw new ArgumentException(Resources.ArgumentArraysSameLength, "source"); |
|
|
|
@ -268,7 +260,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The vector to copy the values from. The length of the vector should be
|
|
|
|
/// Min(Rows, Columns).</param>
|
|
|
|
/// <exception cref="ArgumentNullException">If <paramref name="source"/> is <see langword="null" />.</exception>
|
|
|
|
/// <exception cref="ArgumentException">If the length of <paramref name="source"/> does not
|
|
|
|
/// equal Min(Rows, Columns).</exception>
|
|
|
|
/// <remarks>For non-square matrices, the elements of <paramref name="source"/> are copied to
|
|
|
|
@ -295,7 +286,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// </summary>
|
|
|
|
/// <param name="scalar">The scalar to multiply the matrix with.</param>
|
|
|
|
/// <param name="result">The matrix to store the result of the multiplication.</param>
|
|
|
|
/// <exception cref="ArgumentNullException">If the result matrix is <see langword="null" />.</exception>
|
|
|
|
/// <exception cref="ArgumentException">If the result matrix's dimensions are not the same as this matrix.</exception>
|
|
|
|
protected override void DoMultiply(Complex scalar, Matrix<Complex> result) |
|
|
|
{ |
|
|
|
@ -640,15 +630,9 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// Puts the lower triangle of this matrix into the result matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="result">Where to store the lower triangle.</param>
|
|
|
|
/// <exception cref="ArgumentNullException">If <paramref name="result"/> is <see langword="null" />.</exception>
|
|
|
|
/// <exception cref="ArgumentException">If the result matrix's dimensions are not the same as this matrix.</exception>
|
|
|
|
public override void LowerTriangle(Matrix<Complex> result) |
|
|
|
{ |
|
|
|
if (result == null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException("result"); |
|
|
|
} |
|
|
|
|
|
|
|
if (result.RowCount != RowCount || result.ColumnCount != ColumnCount) |
|
|
|
{ |
|
|
|
throw DimensionsDontMatch<ArgumentException>(this, result, "result"); |
|
|
|
@ -680,15 +664,9 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// Puts the strictly lower triangle of this matrix into the result matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="result">Where to store the lower triangle.</param>
|
|
|
|
/// <exception cref="ArgumentNullException">If <paramref name="result"/> is <see langword="null" />.</exception>
|
|
|
|
/// <exception cref="ArgumentException">If the result matrix's dimensions are not the same as this matrix.</exception>
|
|
|
|
public override void StrictlyLowerTriangle(Matrix<Complex> result) |
|
|
|
{ |
|
|
|
if (result == null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException("result"); |
|
|
|
} |
|
|
|
|
|
|
|
if (result.RowCount != RowCount || result.ColumnCount != ColumnCount) |
|
|
|
{ |
|
|
|
throw DimensionsDontMatch<ArgumentException>(this, result, "result"); |
|
|
|
@ -710,15 +688,9 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// Puts the upper triangle of this matrix into the result matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="result">Where to store the lower triangle.</param>
|
|
|
|
/// <exception cref="ArgumentNullException">If <paramref name="result"/> is <see langword="null" />.</exception>
|
|
|
|
/// <exception cref="ArgumentException">If the result matrix's dimensions are not the same as this matrix.</exception>
|
|
|
|
public override void UpperTriangle(Matrix<Complex> result) |
|
|
|
{ |
|
|
|
if (result == null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException("result"); |
|
|
|
} |
|
|
|
|
|
|
|
if (result.RowCount != RowCount || result.ColumnCount != ColumnCount) |
|
|
|
{ |
|
|
|
throw DimensionsDontMatch<ArgumentException>(this, result, "result"); |
|
|
|
@ -745,15 +717,9 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// Puts the strictly upper triangle of this matrix into the result matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="result">Where to store the lower triangle.</param>
|
|
|
|
/// <exception cref="ArgumentNullException">If <paramref name="result"/> is <see langword="null" />.</exception>
|
|
|
|
/// <exception cref="ArgumentException">If the result matrix's dimensions are not the same as this matrix.</exception>
|
|
|
|
public override void StrictlyUpperTriangle(Matrix<Complex> result) |
|
|
|
{ |
|
|
|
if (result == null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException("result"); |
|
|
|
} |
|
|
|
|
|
|
|
if (result.RowCount != RowCount || result.ColumnCount != ColumnCount) |
|
|
|
{ |
|
|
|
throw DimensionsDontMatch<ArgumentException>(this, result, "result"); |
|
|
|
@ -794,16 +760,10 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// <param name="columnIndex">The index of where to insert the column.</param>
|
|
|
|
/// <param name="column">The column to insert.</param>
|
|
|
|
/// <returns>A new <see cref="SparseMatrix"/> with the inserted column.</returns>
|
|
|
|
/// <exception cref="ArgumentNullException">If <paramref name="column "/> is <see langword="null" />. </exception>
|
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <paramref name="columnIndex"/> is < zero or > the number of columns.</exception>
|
|
|
|
/// <exception cref="ArgumentException">If the size of <paramref name="column"/> != the number of rows.</exception>
|
|
|
|
public override Matrix<Complex> InsertColumn(int columnIndex, Vector<Complex> column) |
|
|
|
{ |
|
|
|
if (column == null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException("column"); |
|
|
|
} |
|
|
|
|
|
|
|
if (columnIndex < 0 || columnIndex > ColumnCount) |
|
|
|
{ |
|
|
|
throw new ArgumentOutOfRangeException("columnIndex"); |
|
|
|
@ -837,16 +797,10 @@ namespace MathNet.Numerics.LinearAlgebra.Complex |
|
|
|
/// <param name="rowIndex">The index of where to insert the row.</param>
|
|
|
|
/// <param name="row">The row to insert.</param>
|
|
|
|
/// <returns>A new <see cref="SparseMatrix"/> with the inserted column.</returns>
|
|
|
|
/// <exception cref="ArgumentNullException">If <paramref name="row"/> is <see langword="null" />. </exception>
|
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <paramref name="rowIndex"/> is < zero or > the number of rows.</exception>
|
|
|
|
/// <exception cref="ArgumentException">If the size of <paramref name="row"/> != the number of columns.</exception>
|
|
|
|
public override Matrix<Complex> InsertRow(int rowIndex, Vector<Complex> row) |
|
|
|
{ |
|
|
|
if (row == null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException("row"); |
|
|
|
} |
|
|
|
|
|
|
|
if (rowIndex < 0 || rowIndex > RowCount) |
|
|
|
{ |
|
|
|
throw new ArgumentOutOfRangeException("rowIndex"); |
|
|
|
|