slides/slides03.tex
author Christian Urban <urbanc@in.tum.de>
Tue, 16 Jan 2018 10:47:29 +0000
changeset 168 03530cb87cd0
parent 158 94b11ac19b41
child 217 e689375abcc1
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
\documentclass[dvipsnames,14pt,t,xelatex]{beamer}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
\usepackage{../slides}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
\usepackage{../graphics}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
\usepackage{../langs}
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
     5
%%\usepackage{../data}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
     6
\usepackage[export]{adjustbox}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
\hfuzz=220pt 
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
%\setmonofont[Scale=.88]{Consolas}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
%\newfontfamily{\consolas}{Consolas}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
\lstset{language=Scala,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
        style=mystyle,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
        numbersep=0pt,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
        numbers=none,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
        xleftmargin=0mm}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
\newcommand{\bl}[1]{\textcolor{blue}{#1}}     
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
% beamer stuff 
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
    22
\renewcommand{\slidecaption}{PEP (Scala) 03, King's College London}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    24
\begin{filecontents}{re3a.data}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    25
1 0.00003
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    26
500001 0.22527
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    27
1000001 0.62752
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    28
1500001 0.88485
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    29
2000001 1.39815
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    30
2500001 1.68619
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    31
3000001 1.94957
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    32
3500001 2.15878
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    33
4000001 2.59918
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    34
4500001 5.90679
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    35
5000001 13.11295
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    36
5500001 19.15376
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    37
6000001 40.16373
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    38
\end{filecontents}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    39
\begin{filecontents}{re-python2.data}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    40
1 0.033
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    41
5 0.036
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    42
10 0.034
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    43
15 0.036
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    44
18 0.059
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    45
19 0.084
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    46
20 0.141
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    47
21 0.248
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    48
22 0.485
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    49
23 0.878
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    50
24 1.71
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    51
25 3.40
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    52
26 7.08
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    53
27 14.12
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    54
28 26.69
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    55
\end{filecontents}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    56
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    57
\begin{filecontents}{re-java.data}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    58
5  0.00298
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    59
10  0.00418
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    60
15  0.00996
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    61
16  0.01710
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    62
17  0.03492
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    63
18  0.03303
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    64
19  0.05084
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    65
20  0.10177
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    66
21  0.19960
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    67
22  0.41159
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    68
23  0.82234
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    69
24  1.70251
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    70
25  3.36112
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    71
26  6.63998
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    72
27  13.35120
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    73
28  29.81185
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    74
\end{filecontents}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
\begin{document}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
\begin{frame}[t]
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
\frametitle{%
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
  \begin{tabular}{@ {}c@ {}}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
  \\[5mm]
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
    82
  \huge PEP Scala (3) 
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
  \end{tabular}}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
  \normalsize
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
  \begin{center}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
  \begin{tabular}{ll}
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    88
    Email:  & christian.urban at kcl.ac.uk\\
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    89
    Office: & N7.07 (North Wing, Bush House)\\
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    90
    Slides \& Code: & KEATS\medskip\\
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    91
    Scala Office & \\
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    92
    Hours: &  Thursdays 11 -- 13\\
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  \end{tabular}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
  \end{center}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
\end{frame}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   102
\begin{frame}[c,fragile]
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   103
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   104
\begin{textblock}{6}(0.5,0.5)
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   105
\begin{bubble}[11.5cm]
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   106
\footnotesize
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   107
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   108
import java.util.concurrent._
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   109
import java.util.concurrent.atomic._
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   110
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   111
  def collatz(input:Int){
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   112
          CollatzConjecture(input);
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   113
          println(count.get());
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   114
      }
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   115
      def collatz_max(input:Int){
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   116
          val List = new Array[Int](input)
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   117
            for (i <- 0 to input-1){
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   118
                CollaĵConjecture(i);
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   119
                List(i)=count.get();
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   120
                count.set(0);
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   121
            }
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   122
            val max = new AtomicInteger();
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   123
            max.set(List(0));
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   124
            val index = new AtomicInteger();
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   125
            index.set(1);
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   126
 
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   127
\end{lstlisting}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   128
\end{bubble}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   129
\end{textblock}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   130
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   131
\end{frame}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   132
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   133
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   134
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   135
\begin{frame}[c,fragile]
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   136
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   137
\begin{textblock}{6}(0.5,0.5)
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   138
\begin{bubble}[11.5cm]
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   139
\footnotesize
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   140
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   141
             for(i<-0 to input-1){
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   142
                val temp :Int=max.get();
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   143
                if (temp < List(i)){
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   144
                    max.set(List(i));
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   145
                    index.set(i);
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   146
                }
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   147
            }
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   148
            println("("+max.get() +","+ index.get()+ ")");
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   149
      }
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   150
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   151
      def CollatzConjecture(n: Long): Long = {
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   152
        count.incrementAndGet();
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   153
        if (n <= 1)
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   154
            1
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   155
        else if (n\%2 ==0)
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   156
            CollatzConjecture(n/2);
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   157
            else
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   158
               CollatzConjecture((3*n)+1);
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   159
   }
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   160
 }
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   161
\end{lstlisting}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   162
\end{bubble}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   163
\end{textblock}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   164
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   165
\end{frame}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   166
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   167
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   168
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   169
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   170
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   171
\begin{frame}[c]
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   172
  \frametitle{CW3 (1 Part): Regexes}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   173
  
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   174
\begin{center}
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   175
  Graphs: $(a^*)^* b$ and strings $\underbrace{\;a\ldots a\;}_{n}$\bigskip
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   176
  
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   177
\begin{tabular}[t]{@{\hspace{-8mm}}c@{\hspace{-4mm}}c@{}}
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   178
\raisebox{6mm}{\begin{tikzpicture}
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   179
\begin{axis}[
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   180
    xlabel={$n$},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   181
    x label style={at={(1.05,0.0)}},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   182
    ylabel={time in secs},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   183
    enlargelimits=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   184
    xtick={0,5,...,30},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   185
    xmax=33,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   186
    ymax=35,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   187
    ytick={0,5,...,30},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   188
    scaled ticks=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   189
    axis lines=left,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   190
    width=5.5cm,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   191
    height=5cm, 
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents: 155
diff changeset
   192
    legend entries={Python,  Java 8},  
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   193
    legend pos=north west,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   194
    legend cell align=left]
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   195
\addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data};  
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   196
\addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data};
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   197
\end{axis}
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   198
\end{tikzpicture}}
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   199
  &
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   200
\onslide<2>{\begin{tikzpicture}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   201
  \begin{axis}[
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   202
    xlabel={$n$},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   203
    x label style={at={(1.05,0.0)}},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   204
    ylabel={time in secs},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   205
    enlargelimits=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   206
    ymax=35,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   207
    ytick={0,5,...,30},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   208
    axis lines=left,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   209
    %%scaled ticks=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   210
    width=5.5cm, 
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   211
    height=5cm]
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   212
%%\addplot[green,mark=square*,mark options={fill=white}] table {re2a.data};    
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   213
\addplot[red,mark=square*,mark options={fill=white}] table {re3a.data};
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   214
\end{axis}
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   215
\end{tikzpicture}}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   216
\end{tabular}
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   217
\end{center}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   218
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   219
\hfill\small\url{https://vimeo.com/112065252}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   220
\end{frame}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   221
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   222
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   223
\begin{frame}[c]
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   224
\frametitle{Where to go on from here?}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   225
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   226
\begin{itemize}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   227
\item Martin Odersky (EPFL)\ldots he is currently throwing out everything
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   228
  and starts again with the dotty compiler for Scala\medskip
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   229
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   230
\item Elm (\url{http://elm-lang.org})\ldots web applications with style\medskip   
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   231
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   232
\item Haskell, Ocaml, Standard ML, Scheme, \ldots 
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   233
\end{itemize}  
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   234
\end{frame}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   235
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   236
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   237
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   238
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   239
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   240
\begin{frame}[c,fragile]
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   241
\frametitle{\alert{Questions?}}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   242
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   243
{\tiny
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   244
\begin{verbatim}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   245
                               *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   246
                              * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   247
                             *   *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   248
                            * * * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   249
                           *       *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   250
                          * *     * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   251
                         *   *   *   *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   252
                        * * * * * * * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   253
                       *               *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   254
                      * *             * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   255
                     *   *           *   *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   256
                    * * * *         * * * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   257
                   *       *       *       *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   258
                  * *     * *     * *     * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   259
                 *   *   *   *   *   *   *   *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   260
                * * * * * * * * * * * * * * * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   261
               *                               *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   262
              * *                             * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   263
             *   *                           *   *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   264
            * * * *                         * * * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   265
           *       *                       *       *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   266
          * *     * *                     * *     * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   267
         *   *   *   *                   *   *   *   *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   268
        * * * * * * * *                 * * * * * * * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   269
       *               *               *               *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   270
      * *             * *             * *             * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   271
     *   *           *   *           *   *           *   *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   272
    * * * *         * * * *         * * * *         * * * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   273
   *       *       *       *       *       *       *       *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   274
  * *     * *     * *     * *     * *     * *     * *     * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   275
 *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   276
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   277
\end{verbatim}}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   278
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   279
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   280
\begin{textblock}{6}(8.5,3.5)
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   281
\begin{bubble}[5cm]
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   282
\footnotesize
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   283
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   284
++++++++[>+>++++<<-]>++>>
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   285
+<[-[>>+<<-]+>>]>+[-<<<[-
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   286
>[+[-]+>++>>>-<<]<[<]>>++
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   287
++++[<<+++++>>-]+<<++.[-]
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   288
<<]>.>+[>>]>+]
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   289
\end{lstlisting}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   290
\end{bubble}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   291
\end{textblock}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   292
  
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   293
\end{frame}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   294
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   295
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   296
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   297
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   298
\begin{frame}[c]
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   299
\frametitle{Marks for CW6 (Part 1 + 2)}
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   300
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   301
Raw marks:
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   302
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   303
\begin{itemize}
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents: 155
diff changeset
   304
\item 6\%: 154 students
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents: 155
diff changeset
   305
\item 5\%: 66
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents: 155
diff changeset
   306
\item 4\%: 18
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   307
\item 3\%: 13
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents: 155
diff changeset
   308
\item 2\%: 2
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents: 155
diff changeset
   309
\item 1\%: 1
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents: 155
diff changeset
   310
\item 0\%: 21 
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   311
\end{itemize}  
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   312
\end{frame}
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   313
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   314
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   315
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   316
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   317
\end{document}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   318
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   319
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   320
\end{document}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   321
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   322
%%% Local Variables:  
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   323
%%% mode: latex
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   324
%%% TeX-master: t
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   325
%%% End: 
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   326