Completed function definitions in cachematrix.R