Skip to content

Instantly share code, notes, and snippets.

@tkelman
Created December 1, 2014 23:58
Show Gist options
  • Select an option

  • Save tkelman/a04872b0f1ca22797f91 to your computer and use it in GitHub Desktop.

Select an option

Save tkelman/a04872b0f1ca22797f91 to your computer and use it in GitHub Desktop.
| | |_| | | | (_| | | Version 0.4.0-dev+1913 (2014-12-01 22:44 UTC)
_/ |\__'_|_|_|\__'_| | (detached from acroy/cholmod)/5920095* (fork: 5 commit
s, 0 days)
|__/ | i686-w64-mingw32
julia> const CHOLMOD = Base.LinAlg.CHOLMOD
Base.LinAlg.CHOLMOD
julia> C = CHOLMOD.CholmodDense(rand(10,10))
CHOLMOD dense: : 10-by-10,
leading dimension 10, nzmax 100, real, double
col 0:
0: 0.78437
1: 0.024328
2: 0.66787
3: 0.89269
4: 0.5156
5: 0.48313
6: 0.28483
7: 0.1243
...
col 9:
0: 0.39086
1: 0.080157
2: 0.91206
3: 0.56211
...
6: 0.012699
7: 0.95717
8: 0.50274
9: 0.33328
OK
julia> S = CHOLMOD.CholmodSparse(C)
CHOLMOD sparse: : 10-by-10, nz 100, up/lo.
nzmax 100, sorted, packed,
scalar types: int, real, double
col 0: nz 10 start 0 end 10:
0: 0.78437
1: 0.024328
2: 0.66787
3: 0.89269
4: 0.5156
5: 0.48313
6: 0.28483
...
col 9: nz 10 start 90 end 100:
0: 0.39086
1: 0.080157
2: 0.91206
...
6: 0.012699
7: 0.95717
8: 0.50274
9: 0.33328
nnz on diagonal: 10
OK
julia> sort!(S)
CHOLMOD sparse: : 10-by-10, nz 100, up/lo.
nzmax 100, sorted, packed,
scalar types: int, real, double
col 0: nz 10 start 0 end 10:
0: 0.78437
1: 0.024328
2: 0.66787
3: 0.89269
4: 0.5156
5: 0.48313
6: 0.28483
...
col 9: nz 10 start 90 end 100:
0: 0.39086
1: 0.080157
2: 0.91206
...
6: 0.012699
7: 0.95717
8: 0.50274
9: 0.33328
nnz on diagonal: 10
OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment