matrix class can multiply with sparse matrix
conjugate gradient class extended to handle full and sparse matrices