From 37d91dec144e28de0390f7b6d9fd16d8cc07b852 Mon Sep 17 00:00:00 2001 From: Ken Ho Date: Fri, 26 Jun 2020 09:39:47 -0700 Subject: [PATCH] Print out imaginary part of logdet also. --- hifde/test/fd_cube1.m | 8 ++++---- hifde/test/fd_cube1x.m | 8 ++++---- hifde/test/fd_cube2.m | 8 ++++---- hifde/test/fd_cube2x.m | 8 ++++---- hifde/test/fd_cube3.m | 10 +++++----- hifde/test/fd_cube3x.m | 10 +++++----- hifde/test/fd_square1.m | 8 ++++---- hifde/test/fd_square1x.m | 8 ++++---- hifde/test/fd_square2.m | 8 ++++---- hifde/test/fd_square3.m | 10 +++++----- hifde/test/fd_square4x.m | 8 ++++---- hifde/test/fd_square5.m | 8 ++++---- hifie/test/cov_cube1.m | 4 +++- hifie/test/cov_cube2.m | 4 +++- hifie/test/cov_square1.m | 4 +++- hifie/test/cov_square2.m | 4 +++- mf/test/fd_cube1.m | 8 ++++---- mf/test/fd_cube1x.m | 8 ++++---- mf/test/fd_cube2.m | 8 ++++---- mf/test/fd_cube3.m | 8 ++++---- mf/test/fd_line1x.m | 8 ++++---- mf/test/fd_line2x.m | 8 ++++---- mf/test/fd_square1.m | 8 ++++---- mf/test/fd_square1x.m | 8 ++++---- mf/test/fd_square2.m | 8 ++++---- mf/test/fd_square3.m | 8 ++++---- mf/test/fd_square4x.m | 8 ++++---- mf/test/fd_square5.m | 8 ++++---- rskelf/test/cov_circle1.m | 4 +++- rskelf/test/cov_circle2.m | 4 +++- rskelf/test/cov_line1.m | 4 +++- rskelf/test/cov_line2.m | 4 +++- rskelf/test/cov_square1.m | 4 +++- rskelf/test/cov_square2.m | 4 +++- 34 files changed, 129 insertions(+), 109 deletions(-) diff --git a/hifde/test/fd_cube1.m b/hifde/test/fd_cube1.m index 12c39c0..b10549d 100644 --- a/hifde/test/fd_cube1.m +++ b/hifde/test/fd_cube1.m @@ -107,10 +107,10 @@ function fd_cube1(n,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_cube1x.m b/hifde/test/fd_cube1x.m index b67388b..ae0c885 100644 --- a/hifde/test/fd_cube1x.m +++ b/hifde/test/fd_cube1x.m @@ -109,10 +109,10 @@ function fd_cube1x(n,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_cube2.m b/hifde/test/fd_cube2.m index a9e1e7d..c1fe479 100644 --- a/hifde/test/fd_cube2.m +++ b/hifde/test/fd_cube2.m @@ -135,10 +135,10 @@ function fd_cube2(n,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_cube2x.m b/hifde/test/fd_cube2x.m index fb327fb..c2ff6fe 100644 --- a/hifde/test/fd_cube2x.m +++ b/hifde/test/fd_cube2x.m @@ -137,10 +137,10 @@ function fd_cube2x(n,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_cube3.m b/hifde/test/fd_cube3.m index 7ce5306..c2ac615 100644 --- a/hifde/test/fd_cube3.m +++ b/hifde/test/fd_cube3.m @@ -102,7 +102,7 @@ function fd_cube3(n,k,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) if doiter, [~,~,~,iter] = gmres(@(x)(A*x),B,32,1e-12,32); end % run preconditioned GMRES - tic; + tic [Y,~,~,piter] = gmres(@(x)(A*x),B,32,1e-12,32,@(x)hifde_sv(F,x)); t = toc; err1 = norm(X - Y)/norm(X); @@ -113,10 +113,10 @@ function fd_cube3(n,k,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) (iter(1)+1)*iter(2)) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_cube3x.m b/hifde/test/fd_cube3x.m index 29be55f..680f2cd 100644 --- a/hifde/test/fd_cube3x.m +++ b/hifde/test/fd_cube3x.m @@ -104,7 +104,7 @@ function fd_cube3x(n,k,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) if doiter, [~,~,~,iter] = gmres(@(x)(A*x),B,32,1e-12,32); end % run preconditioned GMRES - tic; + tic [Y,~,~,piter] = gmres(@(x)(A*x),B,32,1e-12,32,@(x)hifde_sv(F,x)); t = toc; err1 = norm(X - Y)/norm(X); @@ -115,10 +115,10 @@ function fd_cube3x(n,k,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) (iter(1)+1)*iter(2)) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_square1.m b/hifde/test/fd_square1.m index 440ec7a..e5a5efd 100644 --- a/hifde/test/fd_square1.m +++ b/hifde/test/fd_square1.m @@ -116,10 +116,10 @@ function fd_square1(n,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_square1x.m b/hifde/test/fd_square1x.m index 77b704b..fbad772 100644 --- a/hifde/test/fd_square1x.m +++ b/hifde/test/fd_square1x.m @@ -106,10 +106,10 @@ function fd_square1x(n,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_square2.m b/hifde/test/fd_square2.m index e21db5b..3ce2a5f 100644 --- a/hifde/test/fd_square2.m +++ b/hifde/test/fd_square2.m @@ -129,10 +129,10 @@ function fd_square2(n,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_square3.m b/hifde/test/fd_square3.m index e0cfa45..a012c68 100644 --- a/hifde/test/fd_square3.m +++ b/hifde/test/fd_square3.m @@ -83,7 +83,7 @@ function fd_square3(n,k,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) if doiter, [~,~,~,iter] = gmres(@(x)(A*x),B,32,1e-12,32); end % run preconditioned GMRES - tic; + tic [Y,~,~,piter] = gmres(@(x)(A*x),B,32,1e-12,32,@(x)hifde_sv(F,x)); t = toc; err1 = norm(X - Y)/norm(X); @@ -94,10 +94,10 @@ function fd_square3(n,k,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) (iter(1)+1)*iter(2)) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_square4x.m b/hifde/test/fd_square4x.m index 2d7675d..12b0d60 100644 --- a/hifde/test/fd_square4x.m +++ b/hifde/test/fd_square4x.m @@ -117,10 +117,10 @@ function fd_square4x(n,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifde/test/fd_square5.m b/hifde/test/fd_square5.m index 2c21c83..1aedbdb 100644 --- a/hifde/test/fd_square5.m +++ b/hifde/test/fd_square5.m @@ -128,10 +128,10 @@ function fd_square5(n,occ,rank_or_tol,Tmax,skip,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = hifde_logdet(F); - t = toc; - fprintf('hifde_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = hifde_logdet(F); t = toc; + fprintf('hifde_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifie/test/cov_cube1.m b/hifie/test/cov_cube1.m index c554e83..597b2c3 100644 --- a/hifie/test/cov_cube1.m +++ b/hifie/test/cov_cube1.m @@ -99,7 +99,9 @@ function cov_cube1(n,occ,p,rank_or_tol,Tmax,skip,symm,noise,scale,diagmode) % compute log-determinant tic; ld = hifie_logdet(F); t = toc; - fprintf('hifie_logdet: %22.16e / %10.4e (s)\n',ld,t) + fprintf('hifie_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifie/test/cov_cube2.m b/hifie/test/cov_cube2.m index 8f94597..e5c7737 100644 --- a/hifie/test/cov_cube2.m +++ b/hifie/test/cov_cube2.m @@ -99,7 +99,9 @@ function cov_cube2(n,occ,p,rank_or_tol,Tmax,skip,symm,noise,scale,diagmode) % compute log-determinant tic; ld = hifie_logdet(F); t = toc; - fprintf('hifie_logdet: %22.16e / %10.4e (s)\n',ld,t) + fprintf('hifie_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifie/test/cov_square1.m b/hifie/test/cov_square1.m index a1a58d9..709c92d 100644 --- a/hifie/test/cov_square1.m +++ b/hifie/test/cov_square1.m @@ -113,7 +113,9 @@ function cov_square1(n,occ,p,rank_or_tol,Tmax,skip,symm,noise,scale,diagmode) % compute log-determinant tic; ld = hifie_logdet(F); t = toc; - fprintf('hifie_logdet: %22.16e / %10.4e (s)\n',ld,t) + fprintf('hifie_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/hifie/test/cov_square2.m b/hifie/test/cov_square2.m index b021273..49fbed8 100644 --- a/hifie/test/cov_square2.m +++ b/hifie/test/cov_square2.m @@ -93,7 +93,9 @@ function cov_square2(n,occ,p,rank_or_tol,Tmax,skip,symm,noise,scale,diagmode) % compute log-determinant tic; ld = hifie_logdet(F); t = toc; - fprintf('hifie_logdet: %22.16e / %10.4e (s)\n',ld,t) + fprintf('hifie_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_cube1.m b/mf/test/fd_cube1.m index 8f8bc0e..cbaf7b8 100644 --- a/mf/test/fd_cube1.m +++ b/mf/test/fd_cube1.m @@ -99,10 +99,10 @@ function fd_cube1(n,occ,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_cube1x.m b/mf/test/fd_cube1x.m index 387da3c..1f32e7d 100644 --- a/mf/test/fd_cube1x.m +++ b/mf/test/fd_cube1x.m @@ -101,10 +101,10 @@ function fd_cube1x(n,occ,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_cube2.m b/mf/test/fd_cube2.m index 8b33573..5fd5b99 100644 --- a/mf/test/fd_cube2.m +++ b/mf/test/fd_cube2.m @@ -127,10 +127,10 @@ function fd_cube2(n,occ,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_cube3.m b/mf/test/fd_cube3.m index 206418d..b9f0be8 100644 --- a/mf/test/fd_cube3.m +++ b/mf/test/fd_cube3.m @@ -103,10 +103,10 @@ function fd_cube3(n,k,occ,symm,doiter,diagmode) (iter(1)+1)*iter(2)) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_line1x.m b/mf/test/fd_line1x.m index 245288a..6a0381a 100644 --- a/mf/test/fd_line1x.m +++ b/mf/test/fd_line1x.m @@ -96,10 +96,10 @@ function fd_line1x(n,occ,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_line2x.m b/mf/test/fd_line2x.m index 5ce234b..81569fa 100644 --- a/mf/test/fd_line2x.m +++ b/mf/test/fd_line2x.m @@ -101,10 +101,10 @@ function fd_line2x(n,occ,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_square1.m b/mf/test/fd_square1.m index 3de3c05..e493b9d 100644 --- a/mf/test/fd_square1.m +++ b/mf/test/fd_square1.m @@ -108,10 +108,10 @@ function fd_square1(n,occ,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_square1x.m b/mf/test/fd_square1x.m index f0c5396..785e5ef 100644 --- a/mf/test/fd_square1x.m +++ b/mf/test/fd_square1x.m @@ -98,10 +98,10 @@ function fd_square1x(n,occ,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_square2.m b/mf/test/fd_square2.m index e2866b0..8e3d9f8 100644 --- a/mf/test/fd_square2.m +++ b/mf/test/fd_square2.m @@ -121,10 +121,10 @@ function fd_square2(n,occ,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_square3.m b/mf/test/fd_square3.m index 80bcb24..5feaf28 100644 --- a/mf/test/fd_square3.m +++ b/mf/test/fd_square3.m @@ -86,10 +86,10 @@ function fd_square3(n,k,occ,symm,doiter,diagmode) (iter(1)+1)*iter(2)) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_square4x.m b/mf/test/fd_square4x.m index 5199e61..f9ecf86 100644 --- a/mf/test/fd_square4x.m +++ b/mf/test/fd_square4x.m @@ -109,10 +109,10 @@ function fd_square4x(n,occ,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/mf/test/fd_square5.m b/mf/test/fd_square5.m index 93cb608..a95e607 100644 --- a/mf/test/fd_square5.m +++ b/mf/test/fd_square5.m @@ -120,10 +120,10 @@ function fd_square5(n,occ,symm,doiter,diagmode) fprintf(' precon/unprecon iter: %d / %d\n',piter,iter) % compute log-determinant - tic - ld = mf_logdet(F); - t = toc; - fprintf('mf_logdet: %22.16e / %10.4e (s)\n',ld,t) + tic; ld = mf_logdet(F); t = toc; + fprintf('mf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/rskelf/test/cov_circle1.m b/rskelf/test/cov_circle1.m index eb235ed..834a4e5 100644 --- a/rskelf/test/cov_circle1.m +++ b/rskelf/test/cov_circle1.m @@ -83,7 +83,9 @@ function cov_circle1(N,occ,p,rank_or_tol,Tmax,symm,noise,scale,diagmode) % compute log-determinant tic; ld = rskelf_logdet(F); t = toc; - fprintf('rskelf_logdet: %22.16e / %10.4e (s)\n',ld,t) + fprintf('rskelf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/rskelf/test/cov_circle2.m b/rskelf/test/cov_circle2.m index 391d1a8..4d8e200 100644 --- a/rskelf/test/cov_circle2.m +++ b/rskelf/test/cov_circle2.m @@ -82,7 +82,9 @@ function cov_circle2(N,occ,p,rank_or_tol,Tmax,symm,noise,scale,diagmode) % compute log-determinant tic; ld = rskelf_logdet(F); t = toc; - fprintf('rskelf_logdet: %22.16e / %10.4e (s)\n',ld,t) + fprintf('rskelf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/rskelf/test/cov_line1.m b/rskelf/test/cov_line1.m index b2470bf..f9c20c0 100644 --- a/rskelf/test/cov_line1.m +++ b/rskelf/test/cov_line1.m @@ -103,7 +103,9 @@ function cov_line1(N,occ,p,rank_or_tol,Tmax,symm,noise,scale,diagmode) % compute log-determinant tic; ld = rskelf_logdet(F); t = toc; - fprintf('rskelf_logdet: %22.16e / %10.4e (s)\n',ld,t) + fprintf('rskelf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/rskelf/test/cov_line2.m b/rskelf/test/cov_line2.m index 5f6d9c7..63bba3d 100644 --- a/rskelf/test/cov_line2.m +++ b/rskelf/test/cov_line2.m @@ -83,7 +83,9 @@ function cov_line2(N,occ,p,rank_or_tol,Tmax,symm,noise,scale,diagmode) % compute log-determinant tic; ld = rskelf_logdet(F); t = toc; - fprintf('rskelf_logdet: %22.16e / %10.4e (s)\n',ld,t) + fprintf('rskelf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/rskelf/test/cov_square1.m b/rskelf/test/cov_square1.m index 543f201..9158ccf 100644 --- a/rskelf/test/cov_square1.m +++ b/rskelf/test/cov_square1.m @@ -91,7 +91,9 @@ function cov_square1(n,occ,p,rank_or_tol,Tmax,symm,noise,scale,diagmode) % compute log-determinant tic; ld = rskelf_logdet(F); t = toc; - fprintf('rskelf_logdet: %22.16e / %10.4e (s)\n',ld,t) + fprintf('rskelf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction diff --git a/rskelf/test/cov_square2.m b/rskelf/test/cov_square2.m index fd263c6..c35216e 100644 --- a/rskelf/test/cov_square2.m +++ b/rskelf/test/cov_square2.m @@ -91,7 +91,9 @@ function cov_square2(n,occ,p,rank_or_tol,Tmax,symm,noise,scale,diagmode) % compute log-determinant tic; ld = rskelf_logdet(F); t = toc; - fprintf('rskelf_logdet: %22.16e / %10.4e (s)\n',ld,t) + fprintf('rskelf_logdet:\n') + fprintf(' real/imag: %22.16e / %22.16e\n',real(ld),imag(ld)) + fprintf(' time: %10.4e (s)\n',t) if diagmode > 0 % prepare for diagonal extraction