Skip to content

Commit 083e86c

Browse files
committed
linalg : 行列ノルムの例を修正 (#1233)
Signed-off-by: Yuya Asano <64895419+sukeya@users.noreply.github.com>
1 parent 1b89c3c commit 083e86c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

reference/linalg/matrix_frob_norm.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ int main()
7878
constexpr size_t M = 4;
7979
constexpr size_t N = 4;
8080
81-
std::array<double, M * N> vec;
81+
std::array<double, M * N> mat;
8282
83-
std::mdspan v(vec.data(), M, N);
83+
std::mdspan A(mat.data(), M, N);
8484
8585
for(int i = 0; i < A.extent(0); ++i) {
8686
for(int j = 0; j < A.extent(1); ++j) {
@@ -100,10 +100,10 @@ int main()
100100

101101
### 出力
102102
```
103-
1.2636
104-
1.2636
105-
1.25871
106-
1.25871
103+
1.58781
104+
1.58781
105+
1.58435
106+
1.58435
107107
```
108108

109109

reference/linalg/matrix_one_norm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ int main()
8181
constexpr size_t M = 4;
8282
constexpr size_t N = 4;
8383
84-
std::array<double, M * N> vec;
84+
std::array<double, M * N> mat;
8585
86-
std::mdspan v(vec.data(), M, N);
86+
std::mdspan A(mat.data(), M, N);
8787
8888
for(int i = 0; i < A.extent(0); ++i) {
8989
for(int j = 0; j < A.extent(1); ++j) {

0 commit comments

Comments
 (0)