Commit 0660017b authored by Victor-M-Gomes's avatar Victor-M-Gomes

Change exo1 module 2

parent 579d405a
# -*- mode: org -*-
# -*- coding: utf-8 -*-
#+STARTUP: overview indent inlineimages logdrawer
#+TITLE: Journal
#+AUTHOR: Victor Martins Gomes
#+LANGUAGE: en
#+TAGS: LIG(L) HOME(H) Europe(E) Blog(B) noexport(n) Stats(S)
#+TAGS: Epistemology(E) Vulgarization(V) Teaching(T) R(R) OrgMode(O) Python(P)
#+EXPORT_SELECT_TAGS: Blog
#+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+COLUMNS: %25ITEM %TODO %3PRIORITY %TAGS
#+SEQ_TODO: TODO(t!) STARTED(s!) WAITING(w@) APPT(a!) | DONE(d!) CANCELLED(c!) DEFERRED(f!)
* 2018
** 2018-02 March
*** 2018-02-12 Monday
**** Demonstrating Emacs/Orgmode shortcuts
These informations were gathered and first demonstrated in my [[https://github.com/alegrand/RR_webinars/blob/master/1_replicable_article_laboratory_notebook/index.org][First
webinar on reproducible research: litterate programming]].
***** Emacs shortcuts
Here are a few convenient emacs shortcuts for those that have never
used emacs. In all of the emacs shortcuts, =C=Ctrl=, =M=Alt/Esc or Cmd with MacOs= and
=S=Shift=. Note that you may want to use two hours to follow the emacs
tutorial (=C-h t=). In the configuration file CUA keys have been
activated and allow you to use classical copy/paste (=C-c/C-v=)
shortcuts. This can be changed from the Options menu.
- =C-x C-c= exit
- =C-x C-s= save buffer
- =C-g= panic mode ;) type this whenever you want to exit an awful
series of shortcuts
- =C-Space= start selection marker although selection with shift and
arrows should work as well
- =C-l= reposition the screen
- =C-_= (or =C-z= if CUA keys have been activated)
- =C-s= search
- =M-%= replace
- =C-x C-h= get the list of emacs shortcuts
- =C-c C-h= get the list of emacs shortcuts considering the mode you are
currently using (e.g., C, Lisp, org, ...)
- With the "/reproducible research/" emacs configuration, ~C-x g~ allows
you to invoke [[https://magit.vc/][Magit]] (provided you installed it beforehand!) which
is a nice git interface for Emacs.
There are a bunch of cheatsheets also available out there (e.g.,
[[http://www.shortcutworld.com/en/linux/Emacs_23.2.1.html][this one for emacs]] and [[http://orgmode.org/orgcard.txt][this one for org-mode]] or this [[http://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png][graphical one]]).
***** Org-mode
Many emacs shortcuts start by =C-x=. Org-mode's shortcuts generaly
start with =C-c=.
- =Tab= fold/unfold
- =C-c c= capture (finish capturing with =C-c C-c=, this is explained on
the top of the buffer that just opened)
- =C-c C-c= do something useful here (tag, execute, ...)
- =C-c C-o= open link
- =C-c C-t= switch todo
- =C-c C-e= export
- =M-Enter= new item/section
- =C-c a= agenda (try the =L= option)
- =C-c C-a= attach files
- =C-c C-d= set a deadl1ine (use =S-arrows= to navigate in the dates)
- =A-arrows= move subtree (add shift for the whole subtree)
***** Org-mode Babel (for literate programming)
- =<s + tab= template for source bloc. You can easily adapt it to get
this:
#+BEGIN_EXAMPLE
#+begin_src shell
ls
#+end_src
#+END_EXAMPLE
Now if you =C-c C-c=, it will execute the block.
#+BEGIN_EXAMPLE
#+RESULTS:
| #journal.org# |
| journal.html |
| journal.org |
| journal.org~ |
#+END_EXAMPLE
- Source blocks have many options (formatting, arguments, names,
sessions,...), which is why I have my own shortcuts =<b + tab= bash
block (or =B= for sessions).
#+BEGIN_EXAMPLE
#+begin_src shell :results output :exports both
ls /tmp/*201*.pdf
#+end_src
#+RESULTS:
: /tmp/2015_02_bordeaux_otl_tutorial.pdf
: /tmp/2015-ASPLOS.pdf
: /tmp/2015-Europar-Threadmap.pdf
: /tmp/europar2016-1.pdf
: /tmp/europar2016.pdf
: /tmp/M2-PDES-planning-examens-janvier2016.pdf
#+END_EXAMPLE
- I have defined many such templates in my configuration. You can
give a try to =<r=, =<R=, =<RR=, =<g=, =<p=, =<P=, =<m= ...
- Some of these templates are not specific to babel: e.g., =<h=, =<l=,
=<L=, =<c=, =<e=, ...
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2020-04-13 lun. 22:23 --> <!-- 2020-04-27 lun. 20:01 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Your title</title> <title>On the computation of pi</title>
<meta name="generator" content="Org mode" /> <meta name="generator" content="Org mode" />
<meta name="author" content="Victor Martins Gomes" /> <meta name="author" content="Victor Martins Gomes" />
<style type="text/css"> <style type="text/css">
...@@ -195,12 +194,6 @@ ...@@ -195,12 +194,6 @@
.org-svg { width: 90%; } .org-svg { width: 90%; }
/*]]>*/--> /*]]>*/-->
</style> </style>
<link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/htmlize.css"/>
<link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/readtheorg.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.js"></script>
<script type="text/javascript" src="http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"></script>
<script type="text/javascript"> <script type="text/javascript">
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&amp;dn=gpl-3.0.txt GPL-v3-or-Later // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&amp;dn=gpl-3.0.txt GPL-v3-or-Later
<!--/*--><![CDATA[/*><!--*/ <!--/*--><![CDATA[/*><!--*/
...@@ -225,123 +218,93 @@ ...@@ -225,123 +218,93 @@
/*]]>*///--> /*]]>*///-->
// @license-end // @license-end
</script> </script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
displayAlign: "center",
displayIndent: "0em",
"HTML-CSS": { scale: 100,
linebreaks: { automatic: "false" },
webFont: "TeX"
},
SVG: {scale: 100,
linebreaks: { automatic: "false" },
font: "TeX"},
NativeMML: {scale: 100},
TeX: { equationNumbers: {autoNumber: "AMS"},
MultLineWidth: "85%",
TagSide: "right",
TagIndent: ".8em"
}
});
</script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML"></script>
</head> </head>
<body> <body>
<div id="content"> <div id="content">
<h1 class="title">Your title</h1> <h1 class="title">On the computation of pi</h1>
<div id="table-of-contents"> <ol class="org-ol">
<h2>Table of Contents</h2> <li>Asking the math library
<div id="text-table-of-contents"> My computer tells me that &pi; is approximatively
<ul> #begin<sub>src</sub> python :results output :exports both
<li><a href="#orgf71d7d2">1. Some explanations</a></li> from math import *
</ul> pi
</div> #end<sub>src</sub></li>
</div>
<div id="outline-container-orgf71d7d2" class="outline-2">
<h2 id="orgf71d7d2"><span class="section-number-2">1</span> Some explanations</h2>
<div class="outline-text-2" id="text-1">
<p>
This is an org-mode document with code examples in Python. Once opened in
Emacs, this document can easily be exported to HTML, PDF, and Office
formats. For more information on org-mode, see
<a href="https://orgmode.org/guide/">https://orgmode.org/guide/</a>.
</p>
<p>
When you type the shortcut <code>C-c C-e h o</code>, this document will be
exported as HTML. All the code in it will be re-executed, and the
results will be retrieved and included into the exported document. If
you do not want to re-execute all code each time, you can delete the #
and the space before <code>#+PROPERTY:</code> in the header of this document.
</p>
<p>
Like we showed in the video, Python code is included as follows (and
is exxecuted by typing <code>C-c C-c</code>):
</p>
<div class="org-src-container">
<pre class="src src-python"><span style="color: #51afef;">print</span>(<span style="color: #98be65;">"Hello world!"</span>)
</pre>
</div>
<pre class="example">
Hello world!
</pre>
<li>* Buffon&rsquo;s needle
<p> Applying the method of <a href="https://en.wikipedia.org/wiki/Buffon%27s_needle_problem">Buffon&rsquo;s needle</a>, we get the <b>approximation</b>
And now the same but in an Python session. With a session, Python&rsquo;s #begin<sub>src</sub> python :results output :exports both
state, i.e. the values of all the variables, remains persistent from import numpy as np
one code block to the next. The code is still executed using <code>C-c np.random.seed(seed=42)
C-c</code>. N = 10000
x = np.random.uniform(size=N, low=0, high=1)
theta = np.random.uniform(size=N, low)0, high=pi/2)
2/(sum((x+np.sin(theta))&gt;1)/N)
#end<sub>src</sub></li>
<li><p>
Using a surface fraction argument
A method that is easier to understand and does not make use of the <code>sin</code> function is based on the fact that if \(X \approx U(0,1)\) and \(Y \approx U(0,1)\), then \(P[X^2 + Y^2 \leq 1] = \pi/4\) (see <a href="https://en.wikipedia.org/wiki/Monte_Carlo_method">&ldquo;Monte Carlo method on Wikipedia&rdquo;</a>). The following code uses this approach:
#begin<sub>src</sub> python :results output :exports both
import matplotlib.pyplot as plt
</p> </p>
<div class="org-src-container">
<pre class="src src-python"><span style="color: #51afef;">import</span> numpy
<span style="color: #dcaeea;">x</span>=numpy.linspace(-<span style="color: #da8548; font-weight: bold;">15</span>,<span style="color: #da8548; font-weight: bold;">15</span>)
<span style="color: #51afef;">print</span>(x)
</pre>
</div>
<pre class="example">
[-15. -14.3877551 -13.7755102 -13.16326531 -12.55102041
-11.93877551 -11.32653061 -10.71428571 -10.10204082 -9.48979592
-8.87755102 -8.26530612 -7.65306122 -7.04081633 -6.42857143
-5.81632653 -5.20408163 -4.59183673 -3.97959184 -3.36734694
-2.75510204 -2.14285714 -1.53061224 -0.91836735 -0.30612245
0.30612245 0.91836735 1.53061224 2.14285714 2.75510204
3.36734694 3.97959184 4.59183673 5.20408163 5.81632653
6.42857143 7.04081633 7.65306122 8.26530612 8.87755102
9.48979592 10.10204082 10.71428571 11.32653061 11.93877551
12.55102041 13.16326531 13.7755102 14.3877551 15. ]
</pre>
<p>
Finally, an example for graphical output:
</p>
<p> <p>
<img src="./cosxsx.png" alt="cosxsx.png" /> np.random.seed(seed=42)
File &ldquo;&lt;stdin&gt;&rdquo;, line 1, in &lt;module&gt; N = 1000
File &ldquo;/tmp/babel-vQxa6K/python-Wy3IOy&rdquo;, line 2, in &lt;module&gt; x = np.random.uniform(size=N, low=0, high=1)
import matplotlib.pyplot as plt y = np.random.uniform(size=N, low=0, high=1)
ModuleNotFoundError: No module named &rsquo;matplotlib&rsquo;]]
</p> </p>
<p> <p>
Note the parameter <code>:exports results</code>, which indicates that the code accept = (x*x+y*y) &lt;= 1
will not appear in the exported document. We recommend that in the reject = np.logical<sub>not</sub>(accept)
context of this MOOC, you always leave this parameter setting as
<code>:exports both</code>, because we want your analyses to be perfectly
transparent and reproducible.
</p> </p>
<p> <p>
Watch out: the figure generated by the code block is <i>not</i> stored in fig, ax = plt.subplots(1)
the org document. It&rsquo;s a plain file, here named <code>cosxsx.png</code>. You have ax.scatter(x[accept], y[accept], c=&rsquo;b&rsquo;, alpha=0.2, edgecolor=None)
to commit it explicitly if you want your analysis to be legible and ax.scatter(x[reject], y[reject], c=&rsquo;r&rsquo;, alpha=0.2, edgecolor=None)
understandable on GitLab. ax.set<sub>aspect</sub>(&rsquo;equal&rsquo;)
</p> </p>
<p> <p>
Finally, don&rsquo;t forget that we provide in the resource section of this plt.savefig(matplot<sub>lib</sub><sub>filename</sub>)
MOOC a configuration with a few keyboard shortcuts that allow you to print(matplot<sub>lib</sub><sub>filename</sub>)
quickly create code blocks in Python by typing <code>&lt;p</code>, <code>&lt;P</code> or <code>&lt;PP</code> #end<sub>src</sub>
followed by <code>Tab</code>.
</p> </p>
<p> <p>
Now it&rsquo;s your turn! You can delete all this information and replace it It is then straightforward to obtain a (not really good) approximation to &pi; by counting how many times, on average, \(X^2 + Y^2\) is smaller than 1:
by your computational document. #begin<sub>src</sub> python :results output :exports both
</p> 4*np.mean(accept)
</div> #end<sub>src</sub>
</div> </p></li>
</ol>
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="date">Date: 2020-04-13 lun. 00:00</p>
<p class="author">Author: Victor Martins Gomes</p> <p class="author">Author: Victor Martins Gomes</p>
<p class="date">Created: 2020-04-13 lun. 22:23</p> <p class="date">Created: 2020-04-27 lun. 20:01</p>
</div> </div>
</body> </body>
</html> </html>
#+TITLE: Your title #+TITLE: On the computation of pi
#+AUTHOR: Victor Martins Gomes
#+DATE: <2020-04-13 lun.>
#+LANGUAGE: en #+LANGUAGE: en
# #+PROPERTY: header-args :eval never-export # #+PROPERTY: header-args :eval never-export
1. Asking the math library
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/htmlize.css"/> My computer tells me that \pi is approximatively
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/readtheorg.css"/> #begin_src python :results output :exports both
#+HTML_HEAD: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> from math import *
#+HTML_HEAD: <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> pi
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.js"></script> #end_src
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"></script>
2. * Buffon's needle
* Some explanations Applying the method of [[https://en.wikipedia.org/wiki/Buffon%27s_needle_problem][Buffon's needle]], we get the *approximation*
#begin_src python :results output :exports both
This is an org-mode document with code examples in Python. Once opened in import numpy as np
Emacs, this document can easily be exported to HTML, PDF, and Office np.random.seed(seed=42)
formats. For more information on org-mode, see N = 10000
https://orgmode.org/guide/. x = np.random.uniform(size=N, low=0, high=1)
theta = np.random.uniform(size=N, low)0, high=pi/2)
When you type the shortcut =C-c C-e h o=, this document will be 2/(sum((x+np.sin(theta))>1)/N)
exported as HTML. All the code in it will be re-executed, and the #end_src
results will be retrieved and included into the exported document. If 3. Using a surface fraction argument
you do not want to re-execute all code each time, you can delete the # A method that is easier to understand and does not make use of the =sin= function is based on the fact that if $X \approx U(0,1)$ and $Y \approx U(0,1)$, then $P[X^2 + Y^2 \leq 1] = \pi/4$ (see [[https://en.wikipedia.org/wiki/Monte_Carlo_method]["Monte Carlo method on Wikipedia"]]). The following code uses this approach:
and the space before ~#+PROPERTY:~ in the header of this document. #begin_src python :results output :exports both
import matplotlib.pyplot as plt
Like we showed in the video, Python code is included as follows (and
is exxecuted by typing ~C-c C-c~): np.random.seed(seed=42)
N = 1000
#+begin_src python :results output :exports both x = np.random.uniform(size=N, low=0, high=1)
print("Hello world!") y = np.random.uniform(size=N, low=0, high=1)
#+end_src
accept = (x*x+y*y) <= 1
#+RESULTS: reject = np.logical_not(accept)
: Hello world!
fig, ax = plt.subplots(1)
And now the same but in an Python session. With a session, Python's ax.scatter(x[accept], y[accept], c='b', alpha=0.2, edgecolor=None)
state, i.e. the values of all the variables, remains persistent from ax.scatter(x[reject], y[reject], c='r', alpha=0.2, edgecolor=None)
one code block to the next. The code is still executed using ~C-c ax.set_aspect('equal')
C-c~.
plt.savefig(matplot_lib_filename)
#+begin_src python :results output :session :exports both print(matplot_lib_filename)
import numpy #end_src
x=numpy.linspace(-15,15)
print(x) It is then straightforward to obtain a (not really good) approximation to \pi by counting how many times, on average, $X^2 + Y^2$ is smaller than 1:
#+end_src #begin_src python :results output :exports both
4*np.mean(accept)
#+RESULTS: #end_src
#+begin_example
[-15. -14.3877551 -13.7755102 -13.16326531 -12.55102041
-11.93877551 -11.32653061 -10.71428571 -10.10204082 -9.48979592
-8.87755102 -8.26530612 -7.65306122 -7.04081633 -6.42857143
-5.81632653 -5.20408163 -4.59183673 -3.97959184 -3.36734694
-2.75510204 -2.14285714 -1.53061224 -0.91836735 -0.30612245
0.30612245 0.91836735 1.53061224 2.14285714 2.75510204
3.36734694 3.97959184 4.59183673 5.20408163 5.81632653
6.42857143 7.04081633 7.65306122 8.26530612 8.87755102
9.48979592 10.10204082 10.71428571 11.32653061 11.93877551
12.55102041 13.16326531 13.7755102 14.3877551 15. ]
#+end_example
Finally, an example for graphical output:
#+begin_src python :results output file :session :var matplot_lib_filename="./cosxsx.png" :exports results
import matplotlib.pyplot as plt
plt.figure(figsize=(10,5))
plt.plot(x,numpy.cos(x)/x)
plt.tight_layout()
plt.savefig(matplot_lib_filename)
print(matplot_lib_filename)
#+end_src
#+RESULTS:
[[file:./cosxsx.png]]
Note the parameter ~:exports results~, which indicates that the code
will not appear in the exported document. We recommend that in the
context of this MOOC, you always leave this parameter setting as
~:exports both~, because we want your analyses to be perfectly
transparent and reproducible.
Watch out: the figure generated by the code block is /not/ stored in
the org document. It's a plain file, here named ~cosxsx.png~. You have
to commit it explicitly if you want your analysis to be legible and
understandable on GitLab.
Finally, don't forget that we provide in the resource section of this
MOOC a configuration with a few keyboard shortcuts that allow you to
quickly create code blocks in Python by typing ~<p~, ~<P~ or ~<PP~
followed by ~Tab~.
Now it's your turn! You can delete all this information and replace it
by your computational document.
This diff is collapsed.
This diff is collapsed.
ARCHIVE=replicable_article
# ARCHIVE_FILES=$(shell git ls-tree -r master --name-only | grep -v -e 'article.pdf')
ARCHIVE_FILES=article.org biblio.bib Makefile
all: article.pdf
# 1st step - convert org to latex
%.tex: %.org
emacs -batch --eval="(package-initialize)" --eval="(setq enable-local-eval t)" --eval="(setq enable-local-variables t)" $^ --funcall=org-latex-export-to-latex
# 2nd step compile latex
%.pdf: %.tex
pdflatex $^
bibtex `basename $^ .tex`
pdflatex $^
pdflatex $^
# Export to html
%.html: %.org
emacs -batch --eval="(package-initialize)" --eval="(setq enable-local-eval t)" --eval="(setq enable-local-variables t)" $^ --funcall=org-html-export-to-html
../$(ARCHIVE).tgz: $(ARCHIVE_FILES)
tar --xform "s|^|$(ARCHIVE)/|" -zcf $@ $^
clean:
rm -f article.aux article.bbl article.blg article.log article.toc article.out *~
distclean: clean
rm -f article.html article.tex article.pdf figure.pdf data.csv measurements.txt IEEEtran.bst IEEEtran.cls \#article.org\#
\relax
\providecommand\hyper@newdestlabel[2]{}
\@nameuse{bbl@beforestart}
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
\global\let\oldcontentsline\contentsline
\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
\global\let\oldnewlabel\newlabel
\gdef\newlabel#1#2{\newlabelxx{#1}#2}
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\ifx\hyper@anchor\@undefined
\let\contentsline\oldcontentsline
\let\newlabel\oldnewlabel
\fi}
\fi}
\global\let\hyper@last\relax
\gdef\HyperFirstAtBeginDocument#1{#1}
\providecommand\HyField@AuxAddToFields[1]{}
\providecommand\HyField@AuxAddToCoFields[2]{}
\citation{qsort}
\citation{qsort}
\citation{schulte11:_activ_docum_org_mode}
\citation{PER-GRA:2007}
\citation{*}
\bibstyle{IEEEtran}
\bibdata{biblio}
\bibcite{qsort}{1}
\bibcite{schulte11:_activ_docum_org_mode}{2}
\bibcite{PER-GRA:2007}{3}
\babel@aux{english}{}
\newlabel{sec:orgc40ffaf}{{}{1}{Introduction}{section*.2}{}}
\newlabel{sec:org241bcea}{{}{1}{Context}{section*.3}{}}
\newlabel{sec:org4e480d3}{{}{1}{Related Work}{section*.4}{}}
\newlabel{sec:org728aeeb}{{}{1}{Methodology}{section*.5}{}}
\newlabel{sec:orgd6f32a7}{{}{1}{Experimental results}{section*.6}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Comparing performances of several implementation of the quicksort algorithm}}{1}{figure.1}\protected@file@percent }
\newlabel{fig.comparison}{{1}{1}{Comparing performances of several implementation of the quicksort algorithm}{figure.1}{}}
\newlabel{sec:org4a36a2b}{{}{1}{Conclusion}{section*.7}{}}
\@writefile{toc}{\contentsline {section}{References}{1}{section*.9}\protected@file@percent }
% Generated by IEEEtran.bst, version: 1.14 (2015/08/26)
\begin{thebibliography}{1}
\providecommand{\url}[1]{#1}
\csname url@samestyle\endcsname
\providecommand{\newblock}{\relax}
\providecommand{\bibinfo}[2]{#2}
\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}
\providecommand{\BIBentryALTinterwordstretchfactor}{4}
\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus
\BIBentryALTinterwordstretchfactor\fontdimen3\font minus
\fontdimen4\font\relax}
\providecommand{\BIBforeignlanguage}[2]{{%
\expandafter\ifx\csname l@#1\endcsname\relax
\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%
\typeout{** loaded for the language `#1'. Using the pattern for}%
\typeout{** the default language instead.}%
\else
\language=\csname l@#1\endcsname
\fi
#2}}
\providecommand{\BIBdecl}{\relax}
\BIBdecl
\bibitem{qsort}
\BIBentryALTinterwordspacing
C.~A.~R. Hoare, ``Algorithm 64: Quicksort,'' \emph{Commun. ACM}, vol.~4, no.~7,
pp. 321--, Jul. 1961. [Online]. Available:
\url{http://doi.acm.org/10.1145/366622.366644}
\BIBentrySTDinterwordspacing
\bibitem{schulte11:_activ_docum_org_mode}
E.~Schulte and D.~Davison, ``Active document with org-mode,'' \emph{Computing
in Science \& Engineering}, vol.~13, no.~3, pp. 66--73, May/June 2011.
\bibitem{PER-GRA:2007}
\BIBentryALTinterwordspacing
F.~P\'erez and B.~E. Granger, ``{IP}ython: a system for interactive scientific
computing,'' \emph{Computing in Science and Engineering}, vol.~9, no.~3, pp.
21--29, May 2007. [Online]. Available: \url{http://ipython.org}
\BIBentrySTDinterwordspacing
\end{thebibliography}
This is BibTeX, Version 0.99d (TeX Live 2019)
Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
The top-level auxiliary file: article.aux
The style file: IEEEtran.bst
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated wiz_functions (elt_size=4) to 6000 items from 3000.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Database file #1: biblio.bib
-- IEEEtran.bst version 1.14 (2015/08/26) by Michael Shell.
-- http://www.michaelshell.org/tex/ieeetran/bibtex/
-- See the "IEEEtran_bst_HOWTO.pdf" manual for usage information.
Done.
You've used 3 entries,
4087 wiz_defined-function locations,
846 strings with 7752 characters,
and the built_in function-call counts, 2584 in all, are:
= -- 231
> -- 39
< -- 26
+ -- 21
- -- 5
* -- 146
:= -- 436
add.period$ -- 6
call.type$ -- 3
change.case$ -- 3
chr.to.int$ -- 51
cite$ -- 3
duplicate$ -- 175
empty$ -- 172
format.name$ -- 7
if$ -- 571
int.to.chr$ -- 0
int.to.str$ -- 3
missing$ -- 26
newline$ -- 36
num.names$ -- 3
pop$ -- 36
preamble$ -- 1
purify$ -- 0
quote$ -- 2
skip$ -- 196
stack$ -- 0
substring$ -- 125
swap$ -- 164
text.length$ -- 9
text.prefix$ -- 0
top$ -- 5
type$ -- 3
warning$ -- 0
while$ -- 15
width$ -- 4
write$ -- 61
This diff is collapsed.
This diff is collapsed.
\BOOKMARK [1][-]{section*.9}{References}{}% 1
\babel@toc {english}{}
\contentsline {section}{References}{1}{section*.9}%
@article{schulte11:_activ_docum_org_mode,
author ={Eric Schulte and Dan Davison},
title ={Active Document with Org-Mode},
journal ={Computing in Science \& Engineering},
year =2011,
volume =13,
number =3,
pages ={66--73},
month ={May/June}
}
@Article{PER-GRA:2007,
Author = {P\'erez, Fernando and Granger, Brian E.},
Title = {{IP}ython: a System for Interactive Scientific Computing},
Journal = {Computing in Science and Engineering},
Volume = {9},
Number = {3},
Pages = {21--29},
month = may,
year = 2007,
url = "http://ipython.org",
ISSN = "1521-9615",
doi = {10.1109/MCSE.2007.53},
publisher = {IEEE Computer Society},
}
@article{qsort,
author = {Hoare, C. A. R.},
title = {Algorithm 64: Quicksort},
journal = {Commun. ACM},
issue_date = {July 1961},
volume = {4},
number = {7},
month = jul,
year = {1961},
issn = {0001-0782},
pages = {321--},
url = {http://doi.acm.org/10.1145/366622.366644},
doi = {10.1145/366622.366644},
acmid = {366644},
publisher = {ACM},
address = {New York, NY, USA},
}
Size, Seq, Par, Libc
100, 0.000010, 0.004024, 0.000013
100, 0.000010, 0.004448, 0.000014
100, 0.000009, 0.003384, 0.000013
100, 0.000010, 0.003738, 0.000012
100, 0.000010, 0.003133, 0.000011
1000, 0.000128, 0.020407, 0.000209
1000, 0.000126, 0.022003, 0.000201
1000, 0.000128, 0.016149, 0.000210
1000, 0.000128, 0.014594, 0.000209
1000, 0.000129, 0.014905, 0.000210
10000, 0.001774, 0.018943, 0.001720
10000, 0.001698, 0.016226, 0.001733
10000, 0.001652, 0.017348, 0.001702
10000, 0.001680, 0.017302, 0.001726
10000, 0.001675, 0.017386, 0.001716
100000, 0.020040, 0.050548, 0.020300
100000, 0.020004, 0.043119, 0.020504
100000, 0.019763, 0.050735, 0.020439
100000, 0.019913, 0.049806, 0.020541
100000, 0.019726, 0.044636, 0.020252
1000000, 0.230648, 0.162221, 0.242869
1000000, 0.235778, 0.162137, 0.241607
1000000, 0.238383, 0.163279, 0.242786
1000000, 0.232921, 0.170237, 0.241583
1000000, 0.230096, 0.153896, 0.242492
Size: 100
Sequential quicksort took: 0.000010 sec.
Parallel quicksort took: 0.004024 sec.
Built-in quicksort took: 0.000013 sec.
Size: 100
Sequential quicksort took: 0.000010 sec.
Parallel quicksort took: 0.004448 sec.
Built-in quicksort took: 0.000014 sec.
Size: 100
Sequential quicksort took: 0.000009 sec.
Parallel quicksort took: 0.003384 sec.
Built-in quicksort took: 0.000013 sec.
Size: 100
Sequential quicksort took: 0.000010 sec.
Parallel quicksort took: 0.003738 sec.
Built-in quicksort took: 0.000012 sec.
Size: 100
Sequential quicksort took: 0.000010 sec.
Parallel quicksort took: 0.003133 sec.
Built-in quicksort took: 0.000011 sec.
Size: 1000
Sequential quicksort took: 0.000128 sec.
Parallel quicksort took: 0.020407 sec.
Built-in quicksort took: 0.000209 sec.
Size: 1000
Sequential quicksort took: 0.000126 sec.
Parallel quicksort took: 0.022003 sec.
Built-in quicksort took: 0.000201 sec.
Size: 1000
Sequential quicksort took: 0.000128 sec.
Parallel quicksort took: 0.016149 sec.
Built-in quicksort took: 0.000210 sec.
Size: 1000
Sequential quicksort took: 0.000128 sec.
Parallel quicksort took: 0.014594 sec.
Built-in quicksort took: 0.000209 sec.
Size: 1000
Sequential quicksort took: 0.000129 sec.
Parallel quicksort took: 0.014905 sec.
Built-in quicksort took: 0.000210 sec.
Size: 10000
Sequential quicksort took: 0.001774 sec.
Parallel quicksort took: 0.018943 sec.
Built-in quicksort took: 0.001720 sec.
Size: 10000
Sequential quicksort took: 0.001698 sec.
Parallel quicksort took: 0.016226 sec.
Built-in quicksort took: 0.001733 sec.
Size: 10000
Sequential quicksort took: 0.001652 sec.
Parallel quicksort took: 0.017348 sec.
Built-in quicksort took: 0.001702 sec.
Size: 10000
Sequential quicksort took: 0.001680 sec.
Parallel quicksort took: 0.017302 sec.
Built-in quicksort took: 0.001726 sec.
Size: 10000
Sequential quicksort took: 0.001675 sec.
Parallel quicksort took: 0.017386 sec.
Built-in quicksort took: 0.001716 sec.
Size: 100000
Sequential quicksort took: 0.020040 sec.
Parallel quicksort took: 0.050548 sec.
Built-in quicksort took: 0.020300 sec.
Size: 100000
Sequential quicksort took: 0.020004 sec.
Parallel quicksort took: 0.043119 sec.
Built-in quicksort took: 0.020504 sec.
Size: 100000
Sequential quicksort took: 0.019763 sec.
Parallel quicksort took: 0.050735 sec.
Built-in quicksort took: 0.020439 sec.
Size: 100000
Sequential quicksort took: 0.019913 sec.
Parallel quicksort took: 0.049806 sec.
Built-in quicksort took: 0.020541 sec.
Size: 100000
Sequential quicksort took: 0.019726 sec.
Parallel quicksort took: 0.044636 sec.
Built-in quicksort took: 0.020252 sec.
Size: 1000000
Sequential quicksort took: 0.230648 sec.
Parallel quicksort took: 0.162221 sec.
Built-in quicksort took: 0.242869 sec.
Size: 1000000
Sequential quicksort took: 0.235778 sec.
Parallel quicksort took: 0.162137 sec.
Built-in quicksort took: 0.241607 sec.
Size: 1000000
Sequential quicksort took: 0.238383 sec.
Parallel quicksort took: 0.163279 sec.
Built-in quicksort took: 0.242786 sec.
Size: 1000000
Sequential quicksort took: 0.232921 sec.
Parallel quicksort took: 0.170237 sec.
Built-in quicksort took: 0.241583 sec.
Size: 1000000
Sequential quicksort took: 0.230096 sec.
Parallel quicksort took: 0.153896 sec.
Built-in quicksort took: 0.242492 sec.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment