comments, timing added and matrix generation changed

- added/changed comments
- random matrix generation changed from uniform random numbers to
sampling with replacement
- elapsed time measuring added for inverse caching
(!!!Note that time difference is relevant only for matrix size of 150 or
above)