Skip to content

Commit

Permalink
Merge pull request #18 from donghanmath/master
Browse files Browse the repository at this point in the history
Major Update
  • Loading branch information
minseo0388 authored Jan 3, 2021
2 parents be56dc3 + 6b38b14 commit 74a2d4b
Show file tree
Hide file tree
Showing 25 changed files with 746 additions and 737 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "naesungmath",
"version": "1.0.0",
"version": "2.0.0",
"description": "Math and Science",
"main": "/src/math.js",
"scripts": {
Expand All @@ -16,7 +16,7 @@
"bugs": {
"url": "https://github.com/minseo0388/naesungmath/issues"
},
"homepage": "https://MyNSLab.net",
"homepage": "https://MyNSLab.net/naesungmath",
"keywords": [
"Naesungmath",
"Naesung",
Expand Down
2 changes: 1 addition & 1 deletion src/math.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
calc: require('./calc/calc'),
calculus: require('./calculus/calculus'),
equation: require('./equation/equation'),
//matrix: require('./matrix/matrix'),
matrix: require('./matrix/matrix'),
others: require('./others/others'),
progress: require('./progress/progress'),
vector: require('./vector/vector'),
Expand Down
29 changes: 0 additions & 29 deletions src/matrix/Gaussseidelmethod_223.js

This file was deleted.

22 changes: 0 additions & 22 deletions src/matrix/IdentityMatrix_222.js

This file was deleted.

28 changes: 0 additions & 28 deletions src/matrix/SingularValueDecomposition_221.js

This file was deleted.

44 changes: 0 additions & 44 deletions src/matrix/cramer_227.js

This file was deleted.

37 changes: 0 additions & 37 deletions src/matrix/determinant_206.js

This file was deleted.

27 changes: 0 additions & 27 deletions src/matrix/durandkerner_224.js

This file was deleted.

88 changes: 0 additions & 88 deletions src/matrix/eigendecomposition_226.js

This file was deleted.

35 changes: 0 additions & 35 deletions src/matrix/gaussian_207.js
Original file line number Diff line number Diff line change
@@ -1,36 +1 @@
/**
* 207 ���콺 �ҰŹ�
*
* @author: DPS0340
* @param {matrix} matrix
* @param {number} m
* @param {nmuber} n
* @return {number} Gaussian elimination
*
*/
exports.gaussian = function (matrix, m, n) {
let X = []
for (let i = 0; i < matrix.length; i++) {
X.push([])
for (let j = 0; j < matrix[i].length; j++) {
X[i].push(matrix[i][j])
}
}

for (let i = 0; i < n; i++) {
let k = X[i][i]
for (let j = 0; j < m; j++) {
X[i][j] /= k
}
for (let j = 0; j < n; j++) {
if (i !== j) {
let ratio = X[j][i]
for (let l = 0; l < matrix[j].length; l++) {
X[j][l] -= ratio * X[i][l]
}
}
}
}

return X
}
Loading

0 comments on commit 74a2d4b

Please sign in to comment.