File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 3
3
4
4
# # Write a short comment describing this function
5
5
6
+ # # Creates an opbect of type list that acts as a storage device.
7
+ # # Stores the original matrix value and what will be the solve which is set to null
8
+ # # This is essentially a getter setter to put it into OOP terms I am familier with
6
9
makeCacheMatrix <- function (x = matrix ()) {
7
- s <- NULL
10
+ s <- NULL # set s = null
8
11
set <- function (y ) {
9
12
x <<- y
10
13
s <<- NULL
@@ -19,7 +22,10 @@ makeCacheMatrix <- function(x = matrix()) {
19
22
20
23
21
24
# # Write a short comment describing this function
22
-
25
+ # # Accesses the makeCacheMatrix object (not the function).
26
+ # # Gets the value of the matrix used to create the object.
27
+ # # If solve has not been calculated then it calculates and stores it
28
+ # # If it has been calculated it gets and returns the value
23
29
cacheSolve <- function (x , ... ) {
24
30
# # Return a matrix that is the inverse of 'x'
25
31
s <- x $ getsolve()
You can’t perform that action at this time.
0 commit comments