Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 514c8ea

Browse files
committed
Document cacheSolve
1 parent e8ec73a commit 514c8ea

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cachematrix.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,17 @@ makeCacheMatrix <- function(x = matrix()) {
3030
getinverse = getinverse)
3131
}
3232

33-
## Write a short comment describing this function
3433
cacheSolve <- function(x) {
34+
# return the inverse of x, where x is a cachable data structure
35+
# created with makeCacheMatrix. If the matrix hasn't changed the
36+
# result is returned from the cache
37+
#
38+
# Args:
39+
# x: an instance of makeCacheMatrix containing the matrix to be
40+
# inverted.
41+
#
42+
# Returns:
43+
# The inverse of the matrix (calculated using solve())
3544

3645
xinverse <- x$getinverse()
3746
if(!is.null(xinverse)) {

0 commit comments

Comments
 (0)