https://github.com/yuukitoriyama/gyolets
行列の簡約化ができます!途中式も出力可能。LaTeX形式での書き出しもできます!
https://github.com/yuukitoriyama/gyolets
cli matrix reduction
Last synced: 3 months ago
JSON representation
行列の簡約化ができます!途中式も出力可能。LaTeX形式での書き出しもできます!
- Host: GitHub
- URL: https://github.com/yuukitoriyama/gyolets
- Owner: YuukiToriyama
- License: mit
- Created: 2021-06-02T10:20:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-20T18:04:07.000Z (over 4 years ago)
- Last Synced: 2025-06-28T11:17:03.441Z (4 months ago)
- Topics: cli, matrix, reduction
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@toriyama/gyolets
- Size: 883 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# gyolets
## Abstract
行列の簡約化を行なうライブラリです。
CLIツールとして使えるほか、ライブラリとして他のプログラムやWebアプリに組み込んで使うこともできます。## Usage
### CLI
#### Installation
```bash
$ npm install -g @toriyama/gyolets
```
#### `-m, --matrix `
```bash
$ gyolets -m "[[1,2,3], [4,5,6], [7,8,9]]"
```
```terminal
1 0 -1
0 1 2
0 0 0
```
#### `-v, --verbose`
```bash
$ gyolets -v -m "[[1,2,3], [4,5,6], [7,8,9]]"
```
```terminal
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 `
```bash
$ gyolets -l -v -m "[[2,2,1,1,0,0], [3,1,-1,0,1,0], [4,3,1,0,0,1]]"
```
```latex
\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
```bash
npm install @toriyama/gyolets
```
```javascript
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());
```
```console
1 0 -1
0 1 2
0 0 0
```## Docs
For more details, see [https://yuukitoriyama.github.io/gyolets/](https://yuukitoriyama.github.io/gyolets/)## License
MIT License## Contribution
不具合などあればご気軽にIssueから!
こんな機能がほしい!などのコメントもお待ちしています。## Author
YUUKIToriyama