|
From: <in...@dn...> - 2006-01-19 09:08:49
|
Author: marcus
Date: 2006-01-19 04:07:07 -0500 (Thu, 19 Jan 2006)
New Revision: 179
Modified:
trunk/LinearAlgebra/Decomposition/Cholesky.cs
trunk/LinearAlgebra/Decomposition/LU.cs
trunk/LinearAlgebra/Decomposition/QR.cs
Log:
finished all changes with regards to ticket #37.
Modified: trunk/LinearAlgebra/Decomposition/Cholesky.cs
===================================================================
--- trunk/LinearAlgebra/Decomposition/Cholesky.cs 2006-01-19 08:38:52 UTC (rev 178)
+++ trunk/LinearAlgebra/Decomposition/Cholesky.cs 2006-01-19 09:07:07 UTC (rev 179)
@@ -42,15 +42,9 @@
throw new NotSquareMatrixException(Strings.MustBeSquare);
}
- if (matrix.GetType() == typeof(DenseMatrix))
- {
- decomp = new DenseCholesky(matrix);
- }
- //add other types, such as sparse here.
- else
- {
- decomp = new DenseCholesky(matrix);
- }
+
+ decomp = new DenseCholesky(matrix);
+
order = matrix.Rows;
}
Modified: trunk/LinearAlgebra/Decomposition/LU.cs
===================================================================
--- trunk/LinearAlgebra/Decomposition/LU.cs 2006-01-19 08:38:52 UTC (rev 178)
+++ trunk/LinearAlgebra/Decomposition/LU.cs 2006-01-19 09:07:07 UTC (rev 179)
@@ -17,7 +17,7 @@
namespace dnAnalytics.LinearAlgebra.Decomposition
{
/// <summary>
- /// Class for computing the LU factorization of an n by n <see cref="Matrix"/>.
+ /// Class for computing the <c>LU</c> factorization of an n by n <see cref="Matrix"/>.
/// </summary>
public sealed class LU : Algorithm
{
@@ -28,7 +28,7 @@
#region Constructor
/// <summary>
- /// Constructs an LU object for the given matrix.
+ /// Constructs an <c>LU</c> object for the given matrix.
/// </summary>
/// <param name="matrix">The matrix to factor.</param>
/// <exception cref="ArgumentNullException">If <paramref name="matrix"/> is <c>null</c>.</exception>
@@ -45,15 +45,8 @@
throw new NotSquareMatrixException(Strings.MustBeSquare);
}
- if (matrix.GetType() == typeof(DenseMatrix))
- {
- decomp = new DenseLU(matrix);
- }
- //add other types, such as sparse here.
- else
- {
- decomp = new DenseLU(matrix);
- }
+ decomp = new DenseLU(matrix);
+
order = matrix.Rows;
}
#endregion Constructor
Modified: trunk/LinearAlgebra/Decomposition/QR.cs
===================================================================
--- trunk/LinearAlgebra/Decomposition/QR.cs 2006-01-19 08:38:52 UTC (rev 178)
+++ trunk/LinearAlgebra/Decomposition/QR.cs 2006-01-19 09:07:07 UTC (rev 179)
@@ -37,15 +37,7 @@
throw new ArgumentNullException("matrix", Strings.NullParameterException);
}
- if (matrix.GetType() == typeof(DenseMatrix))
- {
- decomp = new DenseQR(matrix);
- }
- //add other types, such as sparse here.
- else
- {
- decomp = new DenseQR(matrix);
- }
+ decomp = new DenseQR(matrix);
rows = matrix.Rows;
columns = matrix.Columns;
}
@@ -136,7 +128,7 @@
}
#endregion Public Properites
-
+
#region Protected Members
/// <summary>
|