Sparse and Dense Matrix Classes and Methods