From 8118a41278f2d13e5a7a43d6a3f8891c359b0325 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Fri, 3 May 2024 00:18:39 +0800 Subject: [PATCH] [linalg] --- source/numerics.tex | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 2ab8b57ecf..e08036998a 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -12327,7 +12327,7 @@ void test_scaled(mdspan> x) { auto x_scaled = scaled(5.0, x); - for(int i = 0; i < x.extent(0); ++i) { + for (int i = 0; i < x.extent(0); ++i) { assert(x_scaled[i] == 5.0 * x[i]); } } @@ -12486,22 +12486,22 @@ \begin{codeblock} void test_conjugated_complex(mdspan, extents> a) { auto a_conj = conjugated(a); - for(int i = 0; i < a.extent(0); ++i) { + for (int i = 0; i < a.extent(0); ++i) { assert(a_conj[i] == conj(a[i]); } auto a_conj_conj = conjugated(a_conj); - for(int i = 0; i < a.extent(0); ++i) { + for (int i = 0; i < a.extent(0); ++i) { assert(a_conj_conj[i] == a[i]); } } void test_conjugated_real(mdspan> a) { auto a_conj = conjugated(a); - for(int i = 0; i < a.extent(0); ++i) { + for (int i = 0; i < a.extent(0); ++i) { assert(a_conj[i] == a[i]); } auto a_conj_conj = conjugated(a_conj); - for(int i = 0; i < a.extent(0); ++i) { + for (int i = 0; i < a.extent(0); ++i) { assert(a_conj_conj[i] == a[i]); } } @@ -12791,8 +12791,8 @@ assert(a.stride(0) == a_t.stride(1)); assert(a.stride(1) == a_t.stride(0)); - for(size_t row = 0; row < num_rows; ++row) { - for(size_t col = 0; col < num_rows; ++col) { + for (size_t row = 0; row < num_rows; ++row) { + for (size_t col = 0; col < num_rows; ++col) { assert(a[row, col] == a_t[col, row]); } } @@ -12803,8 +12803,8 @@ assert(a.stride(0) == a_t_t.stride(0)); assert(a.stride(1) == a_t_t.stride(1)); - for(size_t row = 0; row < num_rows; ++row) { - for(size_t col = 0; col < num_rows; ++col) { + for (size_t row = 0; row < num_rows; ++row) { + for (size_t col = 0; col < num_rows; ++col) { assert(a[row, col] == a_t_t[row, col]); } } @@ -12843,8 +12843,8 @@ assert(a.stride(0) == a_ct.stride(1)); assert(a.stride(1) == a_ct.stride(0)); - for(size_t row = 0; row < num_rows; ++row) { - for(size_t col = 0; col < num_rows; ++col) { + for (size_t row = 0; row < num_rows; ++row) { + for (size_t col = 0; col < num_rows; ++col) { assert(a[row, col] == conj(a_ct[col, row])); } } @@ -12855,8 +12855,8 @@ assert(a.stride(0) == a_ct_ct.stride(0)); assert(a.stride(1) == a_ct_ct.stride(1)); - for(size_t row = 0; row < num_rows; ++row) { - for(size_t col = 0; col < num_rows; ++col) { + for (size_t row = 0; row < num_rows; ++row) { + for (size_t col = 0; col < num_rows; ++col) { assert(a[row, col] == a_ct_ct[row, col]); assert(conj(a_ct[col, row]) == a_ct_ct[row, col]); }