0.9.7 • Published 3 years ago

@toriyama/gyolets v0.9.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Gyolets logo

gyolets

Abstract

行列の簡約化を行なうライブラリです。
CLIツールとして使えるほか、ライブラリとして他のプログラムやWebアプリに組み込んで使うこともできます。

Usage

CLI

Installation

$ npm install -g @toriyama/gyolets

-m, --matrix <number[][]>

$ gyolets -m "[[1,2,3], [4,5,6], [7,8,9]]"
1	0	-1
0	1	2
0	0	0

-v, --verbose

$ gyolets -v -m "[[1,2,3], [4,5,6], [7,8,9]]" 
1       2       3
4       5       6
7       8       9
[ [ 1, 2 ] ]
1       2       3
0       1       2
7       8       9
[ [ 1, 3 ] ]
1       2       3
0       1       2
0       1       2
[ [ 2, 1 ] ]
1       0       -1
0       1       2
0       1       2
[ [ 2, 3 ] ]
1       0       -1
0       1       2
0       0       0
[]
1       0       -1
0       1       2
0       0       0

-l, --latex <string>

$ node dist/bin.js -l -v -m "[[2,2,1,1,0,0], [3,1,-1,0,1,0], [4,3,1,0,0,1]]"
\begin{bmatrix}
        2 & 2 & 1 & 1 & 0 & 0 \\
        3 & 1 & -1 & 0 & 1 & 0 \\
        4 & 3 & 1 & 0 & 0 & 1 \\
\end{bmatrix}
\begin{bmatrix}
        2 & 2 & 1 & 1 & 0 & 0 \\
        0 & 4 & 5 & 3 & -2 & 0 \\
        4 & 3 & 1 & 0 & 0 & 1 \\
\end{bmatrix}
\begin{bmatrix}
        2 & 2 & 1 & 1 & 0 & 0 \\
        0 & 4 & 5 & 3 & -2 & 0 \\
        0 & 1 & 1 & 2 & 0 & -1 \\
\end{bmatrix}
\begin{bmatrix}
        4 & 0 & -3 & -1 & 2 & 0 \\
        0 & 4 & 5 & 3 & -2 & 0 \\
        0 & 1 & 1 & 2 & 0 & -1 \\
\end{bmatrix}
\begin{bmatrix}
        4 & 0 & -3 & -1 & 2 & 0 \\
        0 & 4 & 5 & 3 & -2 & 0 \\
        0 & 0 & 1 & -5 & -2 & 4 \\
\end{bmatrix}
\begin{bmatrix}
        1 & 0 & 0 & -4 & -1 & 3 \\
        0 & 4 & 5 & 3 & -2 & 0 \\
        0 & 0 & 1 & -5 & -2 & 4 \\
\end{bmatrix}
\begin{bmatrix}
        1 & 0 & 0 & -4 & -1 & 3 \\
        0 & 1 & 0 & 7 & 2 & -5 \\
        0 & 0 & 1 & -5 & -2 & 4 \\
\end{bmatrix}
\begin{bmatrix}
        1 & 0 & 0 & -4 & -1 & 3 \\
        0 & 1 & 0 & 7 & 2 & -5 \\
        0 & 0 & 1 & -5 & -2 & 4 \\
\end{bmatrix}

JavaScript

npm install @toriyama/gyolets
import Gyolets from "@toriyama/gyolets";
const mat = new Gyolets([
	[1, 2, 3],
	[4, 5, 6],
	[7, 8, 9]
], {row: 3, column: 3});
const reducedMat = mat.reduction({
	rapid: true,
	verbose: false
});
console.log(reducedMat.toString());
1	0	-1
0	1	2
0	0	0

Docs

For more details, see https://yuukitoriyama.github.io/gyolets/

License

MIT License

Contribution

不具合などあればご気軽にIssueから!
こんな機能がほしい!などのコメントもお待ちしています。

Author

YUUKIToriyama

0.9.7

3 years ago

0.9.6

3 years ago

0.9.5

3 years ago

0.9.4

3 years ago

0.9.3

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.9.0

3 years ago