Skip to content

Commit 34c41f4

Browse files
committed
additional comments
1 parent 8437d18 commit 34c41f4

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

cachematrix.R

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
## TODO more comments
1+
## The two functions cache the inverse of a given matrix.
2+
##
3+
## Note: the matrix supplied is always invertible.
24

3-
## Sets the value of the matrix
4-
## Gets the value of the matrix
5-
## Sets the inverse
6-
## Gets the inverse
5+
## makeCacheMatrix is a function taking a matrix as it argument.
6+
##
7+
## It will expose:
8+
##
9+
## Setting the value of the matrix
10+
## Getting the value of the matrix
11+
## Setting the inverse of the matrix
12+
## Getting the inverse of the matrix
713

814
makeCacheMatrix <- function(x = matrix()) {
915
i <- NULL
@@ -19,8 +25,9 @@ makeCacheMatrix <- function(x = matrix()) {
1925
getinverse = getinverse)
2026
}
2127

22-
23-
## TODO write more comments
28+
## Return the inverse of the makeCacheMatrix function.
29+
## This will return the cached inverse if it already has been calculated
30+
## and a message will be displayed.
2431

2532
cacheSolve <- function(x, ...) {
2633
## Return a matrix that is the inverse of 'x'

0 commit comments

Comments
 (0)