The 2 functions were defined in cachematrix.R