|
|
|
@ -306,11 +306,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32 |
|
|
|
Matrix<Complex32> result; |
|
|
|
if (other is DiagonalMatrix) |
|
|
|
{ |
|
|
|
result = new DenseMatrix(RowCount, ColumnCount); |
|
|
|
result = new DiagonalMatrix(RowCount, ColumnCount); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
result = new DiagonalMatrix(RowCount, ColumnCount); |
|
|
|
result = new DenseMatrix(RowCount, ColumnCount); |
|
|
|
} |
|
|
|
|
|
|
|
Add(other, result); |
|
|
|
@ -381,11 +381,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32 |
|
|
|
Matrix<Complex32> result; |
|
|
|
if (other is DiagonalMatrix) |
|
|
|
{ |
|
|
|
result = new DenseMatrix(RowCount, ColumnCount); |
|
|
|
result = new DiagonalMatrix(RowCount, ColumnCount); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
result = new DiagonalMatrix(RowCount, ColumnCount); |
|
|
|
result = new DenseMatrix(RowCount, ColumnCount); |
|
|
|
} |
|
|
|
|
|
|
|
Subtract(other, result); |
|
|
|
|