Skip to content

Commit be47453

Browse files
author
Joshua David Finkelstein - 350854
committed
redid indentation using indent.sh, instead of indent command shown on github README
1 parent 9a03cd9 commit be47453

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

examples/sparse-matrix/gen-sparse.c

+10-8
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
Generate a sparse N x N Hamiltonian matrix given the matrix dimension, N, and threshold value, eps.
99
Output to terminal given in matrix market format.
1010
11-
Usage:
12-
$> gcc -o gen-sparse gen-sparse.c -lm
11+
Usage:
12+
$> gcc -o gen-sparse gen-sparse.c -lm
1313
$> ./gen-sparse N eps
1414
1515
1616
1717
Authors: Josh Finkelstein
1818
Christian F. A. Negre
19-
19+
2020
Los Alamos National Laboratory
2121
2222
Date: 7/22/2021
@@ -31,7 +31,7 @@ main(
3131
{
3232
//
3333
// Input parameters
34-
//
34+
//
3535
int N = atoi(argv[1]);
3636
float thresh = atof(argv[2]);
3737

@@ -44,9 +44,10 @@ main(
4444

4545
//
4646
// Generate sparse Hamiltonian matrix
47-
//
48-
fprintf(stdout, "\n %%%MatrixMarket matrix coordinate real general \n \n");
49-
47+
//
48+
fprintf(stdout,
49+
"\n %%%MatrixMarket matrix coordinate real general \n \n");
50+
5051
for (i = 0; i < N; ++i)
5152
{
5253

@@ -70,7 +71,8 @@ main(
7071
}
7172
else
7273
{
73-
fprintf(stdout, " %d %d %10.3g\n", i + 1, j + 1, X[i + j * N]);
74+
fprintf(stdout, " %d %d %10.3g\n", i + 1, j + 1,
75+
X[i + j * N]);
7476

7577
}
7678

0 commit comments

Comments
 (0)