Apr 10, 2010 at 10:56 AM
Edited Apr 10, 2010 at 10:57 AM

OK  I think I see what you are saying. A Cholesky abstract class with static "factory" methods, so something like (based of dnA and only for discussion):
public abstract class Cholesky
{
public static Cholesky Create(Matrix matrix);
public bool IsPositiveDefinite();
public Matrix Factor();
public double Determinant();
public abstract Matrix Solve(Matrix input);
public abstract void Solve(Matrix input, Matrix result);
public abstract Vector Solve(Vector input);
public abstract void Solve(Vector input, Vector result);
public abstract void Compute();
}
or maybe
public abstract class Cholesky
{
public static Cholesky Create(Matrix matrix);
public bool IsPositiveDefinite();
public Matrix Factor();
public double Determinant();
public Matrix Solve(Matrix input);
public void Solve(Matrix input, Matrix result);
public Vector Solve(Vector input);
public void Solve(Vector input, Vector result);
protected abstract void Compute();
protected abstract void DoSolve(Matrix factor, Matrix result);
protected abstract void DoSolve(Matrix factor, Vector result);
}
Then we'd have internal DenseCholesky and SparseCholesky subclasses. We don't need to have versions for managed or native, since the one class would call the LAPACK provider (that would be native or managed).
