-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_stats.m
41 lines (23 loc) · 996 Bytes
/
plot_stats.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
% Code implementing the paper "Injective and Bounded Mappings in 3D".
% Disclaimer: The code is provided as-is and without any guarantees. Please contact the author to report any bugs.
% Written by Noam Aigerman, http:https://www.wisdom.weizmann.ac.il/~noamaig/
function plot_stats( stats,OPTIONS)
%plot the stats
lqf=log([stats.target_function]+1);
ldst=log(max([stats.max_distortion]-OPTIONS.K,0)+1);
%plot(xs,lqf,'b',xs,flips,'g',xs,ldst,'r',xs,flags,'black',length(quad_func),mlqf,'b*',length(quad_func),mldst,'r*');
Y=[lqf' [stats.flips]' ldst' [stats.flag]' ];
L={'log quad func','#flips','log max dist','flag'};
if OPTIONS.GRAPHICS.DIST_TO_BD
Y=[Y [stats.dist_to_bd]'/OPTIONS.PROBLEM.MESH_VOLUME];
L=[L,'dist to BD'];
end
if OPTIONS.GRAPHICS.DIST_TO_INITIAL
Y=[Y [stats.dist_to_initial]'/OPTIONS.PROBLEM.MESH_VOLUME];
L=[L,'dist to initial'];
end
Y=[stats.dist_to_last_map]';
L={'dist to last'};
plot(1:length(Y)-1,Y(2:end));
legend(L);
end