added new utilities functions

added a show instance for CSparseRow, changed diagonalMatrix and
generateCSparseRow to no longer shadow “size”, added imap, and changed
“size” in Matrix class to “dim”