20 \usetikzlibrary{calc} |
17 \usetikzlibrary{calc} |
21 \usetikzlibrary{fit} |
18 \usetikzlibrary{fit} |
22 \usetikzlibrary{plotmarks} |
19 \usetikzlibrary{plotmarks} |
23 \usetikzlibrary{backgrounds} |
20 \usetikzlibrary{backgrounds} |
24 \usepackage{graphicx} |
21 \usepackage{graphicx} |
25 |
22 \usepackage{../langs} |
26 \definecolor{javared}{rgb}{0.6,0,0} % for strings |
23 \usepackage{../data} |
27 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments |
|
28 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords |
|
29 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc |
|
30 |
24 |
31 \makeatletter |
25 \makeatletter |
32 \lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}} |
26 \lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}} |
33 \@empty\z@\@empty |
27 \@empty\z@\@empty |
34 \makeatother |
28 \makeatother |
35 |
29 |
36 \lstset{language=Java, |
30 |
37 basicstyle=\consolas, |
|
38 keywordstyle=\color{javapurple}\bfseries, |
|
39 stringstyle=\color{javagreen}, |
|
40 commentstyle=\color{javagreen}, |
|
41 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
42 numbers=left, |
|
43 numberstyle=\tiny\color{black}, |
|
44 stepnumber=1, |
|
45 numbersep=10pt, |
|
46 tabsize=2, |
|
47 showspaces=false, |
|
48 showstringspaces=false} |
|
49 |
|
50 \lstdefinelanguage{scala}{ |
|
51 morekeywords={abstract,case,catch,class,def,% |
|
52 do,else,extends,false,final,finally,% |
|
53 for,if,implicit,import,match,mixin,% |
|
54 new,null,object,override,package,% |
|
55 private,protected,requires,return,sealed,% |
|
56 super,this,throw,trait,true,try,% |
|
57 type,val,var,while,with,yield}, |
|
58 otherkeywords={=>,<-,<\%,<:,>:,\#,@,->}, |
|
59 sensitive=true, |
|
60 morecomment=[l]{//}, |
|
61 morecomment=[n]{/*}{*/}, |
|
62 morestring=[b]", |
|
63 morestring=[b]', |
|
64 morestring=[b]""" |
|
65 } |
|
66 |
|
67 \lstset{language=Scala, |
|
68 basicstyle=\consolas, |
|
69 keywordstyle=\color{javapurple}\bfseries, |
|
70 stringstyle=\color{javagreen}, |
|
71 commentstyle=\color{javagreen}, |
|
72 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
73 numbers=left, |
|
74 numberstyle=\tiny\color{black}, |
|
75 stepnumber=1, |
|
76 numbersep=10pt, |
|
77 tabsize=2, |
|
78 showspaces=false, |
|
79 showstringspaces=false} |
|
80 |
|
81 % beamer stuff |
|
82 \renewcommand{\slidecaption}{AFL 04, King's College London, 16.~October 2013} |
31 \renewcommand{\slidecaption}{AFL 04, King's College London, 16.~October 2013} |
83 \newcommand{\bl}[1]{\textcolor{blue}{#1}} |
32 \newcommand{\bl}[1]{\textcolor{blue}{#1}} |
84 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions |
33 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions |
85 |
|
86 % The data files, written on the first run. |
|
87 \begin{filecontents}{re-python.data} |
|
88 1 0.029 |
|
89 5 0.029 |
|
90 10 0.029 |
|
91 15 0.032 |
|
92 16 0.042 |
|
93 17 0.042 |
|
94 18 0.055 |
|
95 19 0.084 |
|
96 20 0.136 |
|
97 21 0.248 |
|
98 22 0.464 |
|
99 23 0.899 |
|
100 24 1.773 |
|
101 25 3.505 |
|
102 26 6.993 |
|
103 27 14.503 |
|
104 28 29.307 |
|
105 #29 58.886 |
|
106 \end{filecontents} |
|
107 |
|
108 \begin{filecontents}{re-ruby.data} |
|
109 1 0.00006 |
|
110 2 0.00003 |
|
111 3 0.00001 |
|
112 4 0.00001 |
|
113 5 0.00001 |
|
114 6 0.00002 |
|
115 7 0.00002 |
|
116 8 0.00004 |
|
117 9 0.00007 |
|
118 10 0.00013 |
|
119 11 0.00026 |
|
120 12 0.00055 |
|
121 13 0.00106 |
|
122 14 0.00196 |
|
123 15 0.00378 |
|
124 16 0.00764 |
|
125 17 0.01606 |
|
126 18 0.03094 |
|
127 19 0.06508 |
|
128 20 0.12420 |
|
129 21 0.25393 |
|
130 22 0.51449 |
|
131 23 1.02174 |
|
132 24 2.05998 |
|
133 25 4.22514 |
|
134 26 8.42479 |
|
135 27 16.88678 |
|
136 28 34.79653 |
|
137 \end{filecontents} |
|
138 |
|
139 \begin{filecontents}{nfa.data} |
|
140 0 0.00099 |
|
141 5 0.01304 |
|
142 10 0.05350 |
|
143 15 0.10152 |
|
144 20 0.10876 |
|
145 25 0.06984 |
|
146 30 0.09693 |
|
147 35 0.04805 |
|
148 40 0.07512 |
|
149 45 0.07624 |
|
150 50 0.10451 |
|
151 55 0.13285 |
|
152 60 0.15748 |
|
153 65 0.19982 |
|
154 70 0.24075 |
|
155 75 0.28963 |
|
156 80 0.35734 |
|
157 85 0.43735 |
|
158 90 0.49692 |
|
159 95 0.59551 |
|
160 100 0.72236 |
|
161 \end{filecontents} |
|
162 |
|
163 \begin{filecontents}{nfasearch.data} |
|
164 0 0.00009 |
|
165 1 0.00147 |
|
166 2 0.00030 |
|
167 3 0.00062 |
|
168 4 0.00132 |
|
169 5 0.00177 |
|
170 6 0.00487 |
|
171 7 0.00947 |
|
172 8 0.01757 |
|
173 9 0.02050 |
|
174 10 0.02091 |
|
175 11 0.04002 |
|
176 12 0.08662 |
|
177 13 0.17269 |
|
178 14 0.37255 |
|
179 15 0.81935 |
|
180 16 1.76254 |
|
181 17 3.89442 |
|
182 18 8.42263 |
|
183 19 17.89661 |
|
184 20 38.21481 |
|
185 \end{filecontents} |
|
186 |
34 |
187 \begin{document} |
35 \begin{document} |
188 |
36 |
189 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
37 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
190 \mode<presentation>{ |
38 \mode<presentation>{ |