Skip to content

Commit

Permalink
fix for android termux
Browse files Browse the repository at this point in the history
  • Loading branch information
luk036 committed Dec 14, 2024
1 parent 4d111ca commit 8b2f0af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/source/test_conjugate_gradient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ TEST_CASE("Conjugate Gradient Simple") {
}

TEST_CASE("Conjugate Gradient Larger") {
int n = 100;
size_t n = 100U;
Matrix0 A(n, n);
for (int i = 0; i < n; ++i) {
A[i][i] = i + 1;
for (size_t i = 0; i < n; ++i) {
A[i][i] = double(i + 1);
}

std::random_device rd;
std::mt19937 gen(rd());
std::uniform_real_distribution<> dis(0, 1);

Vector0 x_true(n);
for (int i = 0; i < n; ++i) {
for (size_t i = 0; i < n; ++i) {
x_true[i] = dis(gen);
}
Vector0 b = A.dot(x_true);
Expand Down

0 comments on commit 8b2f0af

Please sign in to comment.