18 \usetikzlibrary{shadows} |
15 \usetikzlibrary{shadows} |
19 \usetikzlibrary{positioning} |
16 \usetikzlibrary{positioning} |
20 \usetikzlibrary{plotmarks} |
17 \usetikzlibrary{plotmarks} |
21 \usetikzlibrary{calc} |
18 \usetikzlibrary{calc} |
22 \usepackage{graphicx} |
19 \usepackage{graphicx} |
23 |
20 \usepackage{../langs} |
24 \definecolor{javared}{rgb}{0.6,0,0} % for strings |
21 \usepackage{../data} |
25 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments |
|
26 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords |
|
27 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc |
|
28 |
22 |
29 \makeatletter |
23 \makeatletter |
30 \lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}} |
24 \lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}} |
31 \@empty\z@\@empty |
25 \@empty\z@\@empty |
32 \makeatother |
26 \makeatother |
33 |
27 |
34 \lstset{language=Java, |
|
35 basicstyle=\consolas, |
|
36 keywordstyle=\color{javapurple}\bfseries, |
|
37 stringstyle=\color{javagreen}, |
|
38 commentstyle=\color{javagreen}, |
|
39 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
40 numbers=left, |
|
41 numberstyle=\tiny\color{black}, |
|
42 stepnumber=1, |
|
43 numbersep=10pt, |
|
44 tabsize=2, |
|
45 showspaces=false, |
|
46 showstringspaces=false} |
|
47 |
|
48 \lstdefinelanguage{scala}{ |
|
49 morekeywords={abstract,case,catch,class,def,% |
|
50 do,else,extends,false,final,finally,% |
|
51 for,if,implicit,import,match,mixin,% |
|
52 new,null,object,override,package,% |
|
53 private,protected,requires,return,sealed,% |
|
54 super,this,throw,trait,true,try,% |
|
55 type,val,var,while,with,yield}, |
|
56 otherkeywords={=>,<-,<\%,<:,>:,\#,@,->}, |
|
57 sensitive=true, |
|
58 morecomment=[l]{//}, |
|
59 morecomment=[n]{/*}{*/}, |
|
60 morestring=[b]", |
|
61 morestring=[b]', |
|
62 morestring=[b]""" |
|
63 } |
|
64 |
|
65 \lstset{language=Scala, |
|
66 basicstyle=\consolas, |
|
67 keywordstyle=\color{javapurple}\bfseries, |
|
68 stringstyle=\color{javagreen}, |
|
69 commentstyle=\color{javagreen}, |
|
70 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
71 numbers=left, |
|
72 numberstyle=\tiny\color{black}, |
|
73 stepnumber=1, |
|
74 numbersep=10pt, |
|
75 tabsize=2, |
|
76 showspaces=false, |
|
77 showstringspaces=false} |
|
78 |
|
79 % beamer stuff |
28 % beamer stuff |
80 \renewcommand{\slidecaption}{AFL 02, King's College London, 2.~October 2013} |
29 \renewcommand{\slidecaption}{AFL 02, King's College London, 2.~October 2013} |
81 \newcommand{\bl}[1]{\textcolor{blue}{#1}} |
30 \newcommand{\bl}[1]{\textcolor{blue}{#1}} |
82 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions |
31 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions |
83 |
|
84 % The data files, written on the first run. |
|
85 \begin{filecontents}{re-python.data} |
|
86 1 0.029 |
|
87 5 0.029 |
|
88 10 0.029 |
|
89 15 0.032 |
|
90 16 0.042 |
|
91 17 0.042 |
|
92 18 0.055 |
|
93 19 0.084 |
|
94 20 0.136 |
|
95 21 0.248 |
|
96 22 0.464 |
|
97 23 0.899 |
|
98 24 1.773 |
|
99 25 3.505 |
|
100 26 6.993 |
|
101 27 14.503 |
|
102 28 29.307 |
|
103 #29 58.886 |
|
104 \end{filecontents} |
|
105 |
|
106 \begin{filecontents}{re-ruby.data} |
|
107 1 0.00006 |
|
108 2 0.00003 |
|
109 3 0.00001 |
|
110 4 0.00001 |
|
111 5 0.00001 |
|
112 6 0.00002 |
|
113 7 0.00002 |
|
114 8 0.00004 |
|
115 9 0.00007 |
|
116 10 0.00013 |
|
117 11 0.00026 |
|
118 12 0.00055 |
|
119 13 0.00106 |
|
120 14 0.00196 |
|
121 15 0.00378 |
|
122 16 0.00764 |
|
123 17 0.01606 |
|
124 18 0.03094 |
|
125 19 0.06508 |
|
126 20 0.12420 |
|
127 21 0.25393 |
|
128 22 0.51449 |
|
129 23 1.02174 |
|
130 24 2.05998 |
|
131 25 4.22514 |
|
132 26 8.42479 |
|
133 27 16.88678 |
|
134 28 34.79653 |
|
135 \end{filecontents} |
|
136 |
|
137 \begin{filecontents}{re1.data} |
|
138 1 0.00179 |
|
139 2 0.00011 |
|
140 3 0.00014 |
|
141 4 0.00026 |
|
142 5 0.00050 |
|
143 6 0.00095 |
|
144 7 0.00190 |
|
145 8 0.00287 |
|
146 9 0.00779 |
|
147 10 0.01399 |
|
148 11 0.01894 |
|
149 12 0.03666 |
|
150 13 0.07994 |
|
151 14 0.08944 |
|
152 15 0.02377 |
|
153 16 0.07392 |
|
154 17 0.22798 |
|
155 18 0.65310 |
|
156 19 2.11360 |
|
157 20 6.31606 |
|
158 21 21.46013 |
|
159 \end{filecontents} |
|
160 |
|
161 \begin{filecontents}{re2a.data} |
|
162 1 0.00227 |
|
163 5 0.00027 |
|
164 10 0.00075 |
|
165 15 0.00178 |
|
166 20 0.00102 |
|
167 25 0.00028 |
|
168 30 0.00040 |
|
169 35 0.00052 |
|
170 40 0.00075 |
|
171 45 0.00125 |
|
172 50 0.00112 |
|
173 55 0.00099 |
|
174 60 0.00113 |
|
175 65 0.00137 |
|
176 70 0.00170 |
|
177 \end{filecontents} |
|
178 |
|
179 \begin{filecontents}{re2b.data} |
|
180 1 0.00020 |
|
181 51 0.00080 |
|
182 101 0.00678 |
|
183 151 0.01792 |
|
184 201 0.04815 |
|
185 251 0.09648 |
|
186 301 0.23195 |
|
187 351 0.52646 |
|
188 401 0.96277 |
|
189 451 1.57726 |
|
190 501 2.00166 |
|
191 551 2.98341 |
|
192 601 4.81181 |
|
193 651 6.57054 |
|
194 701 9.73973 |
|
195 751 14.25762 |
|
196 801 14.80760 |
|
197 851 19.60958 |
|
198 901 25.43550 |
|
199 951 31.96038 |
|
200 \end{filecontents} |
|
201 |
|
202 \begin{filecontents}{re3.data} |
|
203 1 0.001605 |
|
204 501 0.131066 |
|
205 1001 0.057885 |
|
206 1501 0.136875 |
|
207 2001 0.176238 |
|
208 2501 0.254363 |
|
209 3001 0.37262 |
|
210 3501 0.500946 |
|
211 4001 0.638384 |
|
212 4501 0.816605 |
|
213 5001 1.00491 |
|
214 5501 1.232505 |
|
215 6001 1.525672 |
|
216 6501 1.757502 |
|
217 7001 2.092784 |
|
218 7501 2.429224 |
|
219 8001 2.803037 |
|
220 8501 3.463045 |
|
221 9001 3.609 |
|
222 9501 4.081504 |
|
223 10001 4.54569 |
|
224 10501 6.17789 |
|
225 11001 6.77242 |
|
226 11501 7.95864 |
|
227 \end{filecontents} |
|
228 |
|
229 |
|
230 |
|
231 |
32 |
232 \begin{document} |
33 \begin{document} |
233 |
34 |
234 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
35 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
235 \mode<presentation>{ |
36 \mode<presentation>{ |