Implement functions to get diagonal entries and scale rows and columns

Added methods for:
* Getting the diagonal elements
* Scaling rows
* Scaling columns