(A *Matrix, B *Matrix)
| 135 | } |
| 136 | |
| 137 | func Substract(A *Matrix, B *Matrix) *Matrix { |
| 138 | result := MakeMatrix(make([]float64, A.cols*A.rows), A.cols, A.rows) |
| 139 | |
| 140 | for i := 0; i < A.rows; i++ { |
| 141 | for j := 0; j < A.cols; j++ { |
| 142 | result.SetElm(i, j, A.GetElm(i, j)-B.GetElm(i, j)) |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | return result |
| 147 | } |
| 148 | |
| 149 | func Multiply(A *Matrix, B *Matrix) *Matrix { |
| 150 | result := MakeMatrix(make([]float64, A.cols*A.rows), A.cols, A.rows) |
nothing calls this directly
no test coverage detected