File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2
2
# # allow an invertible matrix and its inverse to be cached.
3
3
# # The inversion function used is solve()
4
4
5
- # # makeCacheMatrix - returns a cacheable invertible matrix.
5
+ # # makeCacheMatrix - returns a special cacheable invertible " matrix" .
6
6
# # x: is an invertible matrix
7
7
# # set() stores the matrix
8
8
# # get() retrieves the matrix
9
- # # setinverse caches the result of of the inversion function
10
- # # getinverse retrieves any cached result
9
+ # # setinverse() caches the result of of the inversion function
10
+ # # getinverse() retrieves any cached result
11
11
12
12
makeCacheMatrix <- function (x = matrix ()) {
13
13
inv <- NULL
@@ -23,6 +23,7 @@ makeCacheMatrix <- function(x = matrix()) {
23
23
setinverse <- function (s ) inv <<- s
24
24
getinverse <- function () inv
25
25
26
+ # expose functions
26
27
list (set = set ,
27
28
get = get ,
28
29
setinverse = setinverse ,
@@ -31,7 +32,7 @@ makeCacheMatrix <- function(x = matrix()) {
31
32
32
33
33
34
# # cacheSolve - returns the cached inverse of a matrix.
34
- # # x: is a cacheable invertible matrix defined by calling
35
+ # # x: is a special cacheable " matrix" defined by calling
35
36
# # makeCacheMatrix(M), where M is an invertible matrix
36
37
# #
37
38
You can’t perform that action at this time.
0 commit comments