-
Notifications
You must be signed in to change notification settings - Fork 0
/
runjobs_timing.m
44 lines (37 loc) · 1.6 KB
/
runjobs_timing.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
% Copyright 2021, C. Minz. BSD 3-Clause License.
function runjobs_timing( N, d )
tstart = tic;
g = metric( d );
fprintf( 'Timing causet with N = %d, d = %d.\n', N, d );
maxpurity = min( 2000, ceil( 60 * 5^( d - 2 ) ) );
coord = causet_new_sprinkle( N, d, 'Bicone', [ 0.7, 5 ] );
fprintf( 'Generate: %0.2fs\n', toc( tstart ) );
tstart = tic;
C = causet_edit_relate( coord, g );
L = causet_get_links( C );
fprintf( 'Link: %0.2fs\n', toc( tstart ) );
tstart = tic;
chains = causet_get_chains( C, 4 );
fprintf( 'Count chains: %0.2fs\n', toc( tstart ) );
tstart = tic;
causet_get_statistics( C, L, ...
[ maxpurity, min( 2000, 4 * maxpurity ), 200, 200, 2, 8 ], ...
'-set', 1 : N, [ 6, 1 ], coord, g );
fprintf( 'Causet statistics: %0.2fs\n', toc( tstart ) );
tstart = tic;
geo = causet_find_linkgeodesics( C, L, 1, N );
fprintf( 'Find link geodesic: %0.2fs\n', toc( tstart ) );
tstart = tic;
causet_get_statistics( C, L, ...
[ maxpurity, min( 2000, 4 * maxpurity ), 200, 200, 2, 8 ], ...
'-chain', geo{ 1 }, [], coord, g );
fprintf( 'Statistics of link geodesic: %0.2fs\n', toc( tstart ) );
tstart = tic;
geo = causet_find_volumegeodesics( C, L, 1, N );
fprintf( 'Find volume geodesic: %0.2fs\n', toc( tstart ) );
tstart = tic;
causet_get_statistics( C, L, ...
[ maxpurity, min( 2000, 4 * maxpurity ), 200, 200, 2, 8 ], ...
'-chain', geo{ 1 }, [], coord, g );
fprintf( 'Statistics of volume geodesic: %0.2fs\n', toc( tstart ) );
end