<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.if.pw.edu.pl/~lgraczyk/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?action=history&amp;feed=atom&amp;title=KADD_2022_Laboratorium_1_EN</id>
		<title>KADD 2022 Laboratorium 1 EN - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?action=history&amp;feed=atom&amp;title=KADD_2022_Laboratorium_1_EN"/>
		<link rel="alternate" type="text/html" href="http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;action=history"/>
		<updated>2026-04-05T18:48:43Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.5</generator>

	<entry>
		<id>http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;diff=2851&amp;oldid=prev</id>
		<title>Lgraczyk: /* Wynik */</title>
		<link rel="alternate" type="text/html" href="http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;diff=2851&amp;oldid=prev"/>
				<updated>2022-02-28T12:47:32Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Wynik&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:47, 28 February 2022&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* macros can contain more functions - during the macro execution the one which will be run is that which name corresponds to the macro name (the equivalent of the&amp;nbsp; &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in standard C++)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* macros can contain more functions - during the macro execution the one which will be run is that which name corresponds to the macro name (the equivalent of the&amp;nbsp; &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in standard C++)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Wynik &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Results &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Wykresy&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Plots&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;okno &lt;/del&gt;1&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;window &lt;/ins&gt;1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[File:lab1_1.png]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[File:lab1_1.png]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;okno &lt;/del&gt;2&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;window &lt;/ins&gt;2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[File:1_2.png]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[File:1_2.png]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lgraczyk</name></author>	</entry>

	<entry>
		<id>http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;diff=2850&amp;oldid=prev</id>
		<title>Lgraczyk: /* Uwagi */</title>
		<link rel="alternate" type="text/html" href="http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;diff=2850&amp;oldid=prev"/>
				<updated>2022-02-28T12:47:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Uwagi&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:47, 28 February 2022&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 43:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 43:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* draw the graph in a separate window&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* draw the graph in a separate window&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Uwagi &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Attention &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;b&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Uwaga&lt;/del&gt;!&amp;lt;/b&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Aby środowisko &lt;/del&gt;ROOT &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;można było uruchomić na własnym koncie użytkownika w laboratorium&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;należy w pliku &lt;/del&gt;&amp;lt;code&amp;gt;$HOME/.bashrc&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;dopisać następujące linijki &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;jeśli nie były dodane na zajęciach z &lt;/del&gt;PTI):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;b&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Attention&lt;/ins&gt;!&amp;lt;/b&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;In order to run &lt;/ins&gt;ROOT &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;environment on your student account in the laboratory&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;you have to add the following lines (if they were not added already) to the file &lt;/ins&gt;&amp;lt;code&amp;gt;$HOME/.bashrc&amp;lt;/code&amp;gt; (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;they could had been added during the &lt;/ins&gt;PTI &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;class&lt;/ins&gt;):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; export ROOTSYS=/opt/root&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; export ROOTSYS=/opt/root&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; export PATH=$PATH:$ROOTSYS/bin&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; export PATH=$PATH:$ROOTSYS/bin&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;środowisko &lt;/del&gt;ROOT &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;jest zainstalowane lokalnie na każdym komputerze &lt;/del&gt;- &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;nie jest dostępne na serwerze&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/ins&gt;ROOT &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;environment is installed separately on each computer &lt;/ins&gt;- &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;it is not available on the server&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;w środowisku &lt;/del&gt;ROOT &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;piszemy &lt;/del&gt;&amp;lt;b&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;makra&lt;/del&gt;&amp;lt;/b&amp;gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;które mają rozszerzenie &lt;/del&gt;.c, .C, .cpp, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;lub &lt;/del&gt;.cxx&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;in the &lt;/ins&gt;ROOT &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;environment&amp;nbsp; we write &lt;/ins&gt;&amp;lt;b&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;macros&lt;/ins&gt;&amp;lt;/b&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;which have extensions &lt;/ins&gt;.c, .C, .cpp, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;or &lt;/ins&gt;.cxx&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;makro zawiera w sobie kod w języku &lt;/del&gt;C++ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;interpretowany linijka po linijce&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;a macro contains a &lt;/ins&gt;C++ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;code interpreted line-by-line&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;w zasadzie nie musimy załączać żadnych bibliotek &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;in principle, we do not need to include any libraries&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;przykład &lt;/del&gt;1:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;example &lt;/ins&gt;1:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  double x = 5;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  double x = 5;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  cout&amp;lt;&amp;lt;x&amp;lt;&amp;lt;endl;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  cout&amp;lt;&amp;lt;x&amp;lt;&amp;lt;endl;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wywołanie makra&lt;/del&gt;: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;uruchamiamy środowisko &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;komenda &lt;/del&gt;&amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;), &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wpisujemy &lt;/del&gt;&amp;lt;code&amp;gt;.x macro.C&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;execution of a macro&lt;/ins&gt;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;start the environment &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;command &lt;/ins&gt;&amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;), &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;type &lt;/ins&gt;&amp;lt;code&amp;gt;.x macro.C&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;makro może zawierać również &lt;/del&gt;&amp;lt;b&amp;gt;funkcje&amp;lt;/b&amp;gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;przykład &lt;/del&gt;2:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;macro can also contain&amp;nbsp; &lt;/ins&gt;&amp;lt;b&amp;gt;funkcje&amp;lt;/b&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;example &lt;/ins&gt;2:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; int macro()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; int macro()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  return 1;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  return 1;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;nazwa makra musi być taka sama jak nazwa funkcji w makrze &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;by można było je uruchomić komendą &lt;/del&gt;&amp;lt;code&amp;gt;.x macro.C&amp;lt;/code&amp;gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;name of the macro must be the same as the name of the main&amp;nbsp; function in the macro &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;in order to run it with the command &lt;/ins&gt;&amp;lt;code&amp;gt;.x macro.C&amp;lt;/code&amp;gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;w makrach może być więcej funkcji &lt;/del&gt;- &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;przy standardowym uruchomieniu wywołana zawsze będzie ta funkcja, której nazwa zgadza się z nazwą makra &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;odpowiednik funkcji &lt;/del&gt;&amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;w standardowym &lt;/del&gt;C++)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;macros can contain more functions &lt;/ins&gt;- &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;during the macro execution the one which will be run is that which name corresponds to the macro name &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the equivalent of the&amp;nbsp; &lt;/ins&gt;&amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;function in standard &lt;/ins&gt;C++)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Wynik ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Wynik ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lgraczyk</name></author>	</entry>

	<entry>
		<id>http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;diff=2849&amp;oldid=prev</id>
		<title>Lgraczyk: /* Zadanie */</title>
		<link rel="alternate" type="text/html" href="http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;diff=2849&amp;oldid=prev"/>
				<updated>2022-02-28T12:40:01Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Zadanie&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:40, 28 February 2022&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* documentation of the laboratory version (5.32.00): [https://root.cern.ch/root/html532/ https://root.cern.ch/root/html532/] last version with the old C++ interpreter&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* documentation of the laboratory version (5.32.00): [https://root.cern.ch/root/html532/ https://root.cern.ch/root/html532/] last version with the old C++ interpreter&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Zadanie &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Exercise &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;1. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Należy napisać makro&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;które&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;1. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Write a macro&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;which&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tworzy obiekt &lt;/del&gt;&amp;lt;code&amp;gt;fun1&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;typu &lt;/del&gt;&amp;lt;code&amp;gt;TF1&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;reprezentujący funkcję &lt;/del&gt;&amp;lt;code&amp;gt;sin(x)&amp;lt;/code&amp;gt; (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;patrz klasa &lt;/del&gt;&amp;lt;code&amp;gt;TMath&amp;lt;/code&amp;gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;creates an object &lt;/ins&gt;&amp;lt;code&amp;gt;fun1&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;of type &lt;/ins&gt;&amp;lt;code&amp;gt;TF1&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;representing a &lt;/ins&gt;&amp;lt;code&amp;gt;sin(x)&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;function &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;see class &lt;/ins&gt;&amp;lt;code&amp;gt;TMath&amp;lt;/code&amp;gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tworzy obiekt &lt;/del&gt;&amp;lt;code&amp;gt;fun2&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;typu &lt;/del&gt;&amp;lt;code&amp;gt;TF1&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;reprezentujący funkcję &lt;/del&gt;&amp;lt;code&amp;gt;cos(x)&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;creates an object &lt;/ins&gt;&amp;lt;code&amp;gt;fun2&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;of type &lt;/ins&gt;&amp;lt;code&amp;gt;TF1&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;representing a &lt;/ins&gt;&amp;lt;code&amp;gt;cos(x)&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;function&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tworzy okno z &lt;/del&gt;4 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;panelami &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;rozkład paneli &lt;/del&gt;2x2) - &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;patrz klasa &lt;/del&gt;&amp;lt;code&amp;gt;TCanvas&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;i metoda &lt;/del&gt;&amp;lt;code&amp;gt;Divide&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;creates a window with &lt;/ins&gt;4 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;panels &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;panel distribution &lt;/ins&gt;2x2) - &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;see class &lt;/ins&gt;&amp;lt;code&amp;gt;TCanvas&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and method &lt;/ins&gt;&amp;lt;code&amp;gt;Divide&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;rysuje obiekt &lt;/del&gt;&amp;lt;code&amp;gt;fun1&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;na &lt;/del&gt;1 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;panelu&lt;/del&gt;, &amp;lt;code&amp;gt;fun2&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;na &lt;/del&gt;2 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;panelu&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;oraz obie funkcje jednocześnie na &lt;/del&gt;3 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;panelu&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;draws the&amp;nbsp; &lt;/ins&gt;&amp;lt;code&amp;gt;fun1&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;object on panel &lt;/ins&gt;1, &amp;lt;code&amp;gt;fun2&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;on panel &lt;/ins&gt;2, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and two functions simultaneously on panel &lt;/ins&gt;3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;zmieni kolor linii funkcji &lt;/del&gt;&amp;lt;code&amp;gt;fun2&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;na niebieski &lt;/del&gt;- &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;patrz metoda &lt;/del&gt;&amp;lt;code&amp;gt;SetLineColor&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;i klasa &lt;/del&gt;&amp;lt;code&amp;gt;TColor&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;changes the color of the line of function &lt;/ins&gt;&amp;lt;code&amp;gt;fun2&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;to blue &lt;/ins&gt;- &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;see method &lt;/ins&gt;&amp;lt;code&amp;gt;SetLineColor&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and class &lt;/ins&gt;&amp;lt;code&amp;gt;TColor&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;2. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Wyobraźmy sobie, że rzucamy niesymetryczną sześcienną kostką do gry&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Wyniki podsumowuje poniższa tabelka&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;2. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Let's imagine we throw a dice that is asymmetric&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The table below summarizes the results&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;! &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Ilość oczek&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;! &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Number of pips&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 1&amp;nbsp;  &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 1&amp;nbsp;  &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 2&amp;nbsp;  &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 2&amp;nbsp;  &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 29:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 29:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 6&amp;nbsp;  &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 6&amp;nbsp;  &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;! &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Ilość rzutów&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;! &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Number of throws&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 2&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 1&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 12&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;| 12&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Modyfikujemy dalej makro&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;We modify further the macro&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tworzymy &lt;/del&gt;histogram (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;patrz klasa &lt;/del&gt;&amp;lt;code&amp;gt;TH1D&amp;lt;/code&amp;gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wypełniając kolejne biny &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;odpowiadające kolejnym ilościom oczek&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wartościami z tabelki &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ilość rzutów&lt;/del&gt;) - histogram &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;należy narysować na panelu &lt;/del&gt;4&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;let's create a &lt;/ins&gt;histogram (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;see class &lt;/ins&gt;&amp;lt;code&amp;gt;TH1D&amp;lt;/code&amp;gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;by filling each bin &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;which corresponds to each dice facet&lt;/ins&gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;with values from the table &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;number of throws&lt;/ins&gt;) - &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/ins&gt;histogram &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;should be plotted on panel &lt;/ins&gt;4&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;należy stworzyć wykres - graf &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;patrz klasa &lt;/del&gt;&amp;lt;code&amp;gt;TGraph&amp;lt;/code&amp;gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;zgodnie z wartościami z tabelki&lt;/del&gt;. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;create a plot, called graph &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;see class &lt;/ins&gt;&amp;lt;code&amp;gt;TGraph&amp;lt;/code&amp;gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;according to values from the table&lt;/ins&gt;. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;zmienić styl punktów grafu na kółko &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;patrz metoda &lt;/del&gt;&amp;lt;code&amp;gt;SetMarkerStyle&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;oraz klasa &lt;/del&gt;&amp;lt;code&amp;gt;TAttMarker&amp;lt;/code&amp;gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;change the style of graph points &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;see method &lt;/ins&gt;&amp;lt;code&amp;gt;SetMarkerStyle&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and class &lt;/ins&gt;&amp;lt;code&amp;gt;TAttMarker&amp;lt;/code&amp;gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;narysować graf w oddzielnym oknie&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;draw the graph in a separate window&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Uwagi ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Uwagi ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lgraczyk</name></author>	</entry>

	<entry>
		<id>http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;diff=2848&amp;oldid=prev</id>
		<title>Lgraczyk at 12:30, 28 February 2022</title>
		<link rel="alternate" type="text/html" href="http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;diff=2848&amp;oldid=prev"/>
				<updated>2022-02-28T12:30:17Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:30, 28 February 2022&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Dokumentacja &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Documentation &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Dokumentacja środowiska &lt;/del&gt;ROOT:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Documentation of the &lt;/ins&gt;ROOT &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;environment&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;strona główna&lt;/del&gt;: [https://root.cern.ch/ https://root.cern.ch/]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;main page&lt;/ins&gt;: [https://root.cern.ch/ https://root.cern.ch/]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;dokumentacja wersji rozwojowej &lt;/del&gt;(master): [https://root.cern.ch/doc/master/ https://root.cern.ch/doc/master/]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;documentation of the development version &lt;/ins&gt;(master): [https://root.cern.ch/doc/master/ https://root.cern.ch/doc/master/]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;dokumentacja ostatniej wersji stabilnej &lt;/del&gt;(6.22): [https://root.cern/doc/v622/ https://root.cern/doc/v622/]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;documentation of the stable version &lt;/ins&gt;(6.22): [https://root.cern/doc/v622/ https://root.cern/doc/v622/]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;dokumentacja wersji zainstalowanej w laboratorium &lt;/del&gt;(5.32.00): [https://root.cern.ch/root/html532/ https://root.cern.ch/root/html532/] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ostatnia wersja ze starym interpreterem&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;documentation of the laboratory version &lt;/ins&gt;(5.32.00): [https://root.cern.ch/root/html532/ https://root.cern.ch/root/html532/] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;last version with the old C++ interpreter&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Zadanie ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Zadanie ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lgraczyk</name></author>	</entry>

	<entry>
		<id>http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;diff=2845&amp;oldid=prev</id>
		<title>Lgraczyk: Created page with &quot;{| align=&quot;right&quot; | __TOC__ |}  == Dokumentacja == Dokumentacja środowiska ROOT: * strona główna: [https://root.cern.ch/ https://root.cern.ch/] * dokumentacja wersji rozwojowej...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.if.pw.edu.pl/~lgraczyk/wiki/index.php?title=KADD_2022_Laboratorium_1_EN&amp;diff=2845&amp;oldid=prev"/>
				<updated>2022-02-28T12:26:56Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| align=&amp;quot;right&amp;quot; | __TOC__ |}  == Dokumentacja == Dokumentacja środowiska ROOT: * strona główna: [https://root.cern.ch/ https://root.cern.ch/] * dokumentacja wersji rozwojowej...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dokumentacja ==&lt;br /&gt;
Dokumentacja środowiska ROOT:&lt;br /&gt;
* strona główna: [https://root.cern.ch/ https://root.cern.ch/]&lt;br /&gt;
* dokumentacja wersji rozwojowej (master): [https://root.cern.ch/doc/master/ https://root.cern.ch/doc/master/]&lt;br /&gt;
* dokumentacja ostatniej wersji stabilnej (6.22): [https://root.cern/doc/v622/ https://root.cern/doc/v622/]&lt;br /&gt;
* dokumentacja wersji zainstalowanej w laboratorium (5.32.00): [https://root.cern.ch/root/html532/ https://root.cern.ch/root/html532/] ostatnia wersja ze starym interpreterem&lt;br /&gt;
&lt;br /&gt;
== Zadanie ==&lt;br /&gt;
1. Należy napisać makro, które:&lt;br /&gt;
* tworzy obiekt &amp;lt;code&amp;gt;fun1&amp;lt;/code&amp;gt; typu &amp;lt;code&amp;gt;TF1&amp;lt;/code&amp;gt; reprezentujący funkcję &amp;lt;code&amp;gt;sin(x)&amp;lt;/code&amp;gt; (patrz klasa &amp;lt;code&amp;gt;TMath&amp;lt;/code&amp;gt;)&lt;br /&gt;
* tworzy obiekt &amp;lt;code&amp;gt;fun2&amp;lt;/code&amp;gt; typu &amp;lt;code&amp;gt;TF1&amp;lt;/code&amp;gt; reprezentujący funkcję &amp;lt;code&amp;gt;cos(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
* tworzy okno z 4 panelami (rozkład paneli 2x2) - patrz klasa &amp;lt;code&amp;gt;TCanvas&amp;lt;/code&amp;gt; i metoda &amp;lt;code&amp;gt;Divide&amp;lt;/code&amp;gt;&lt;br /&gt;
* rysuje obiekt &amp;lt;code&amp;gt;fun1&amp;lt;/code&amp;gt; na 1 panelu, &amp;lt;code&amp;gt;fun2&amp;lt;/code&amp;gt; na 2 panelu, oraz obie funkcje jednocześnie na 3 panelu&lt;br /&gt;
* zmieni kolor linii funkcji &amp;lt;code&amp;gt;fun2&amp;lt;/code&amp;gt; na niebieski - patrz metoda &amp;lt;code&amp;gt;SetLineColor&amp;lt;/code&amp;gt; i klasa &amp;lt;code&amp;gt;TColor&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2. Wyobraźmy sobie, że rzucamy niesymetryczną sześcienną kostką do gry. Wyniki podsumowuje poniższa tabelka:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Ilość oczek&lt;br /&gt;
| 1   &lt;br /&gt;
| 2   &lt;br /&gt;
| 3   &lt;br /&gt;
| 4   &lt;br /&gt;
| 5   &lt;br /&gt;
| 6   &lt;br /&gt;
|-&lt;br /&gt;
! Ilość rzutów&lt;br /&gt;
| 2&lt;br /&gt;
| 1&lt;br /&gt;
| 5&lt;br /&gt;
| 4&lt;br /&gt;
| 10&lt;br /&gt;
| 12&lt;br /&gt;
|}&lt;br /&gt;
Modyfikujemy dalej makro:&lt;br /&gt;
* tworzymy histogram (patrz klasa &amp;lt;code&amp;gt;TH1D&amp;lt;/code&amp;gt;) wypełniając kolejne biny (odpowiadające kolejnym ilościom oczek) wartościami z tabelki (ilość rzutów) - histogram należy narysować na panelu 4&lt;br /&gt;
* należy stworzyć wykres - graf (patrz klasa &amp;lt;code&amp;gt;TGraph&amp;lt;/code&amp;gt;) zgodnie z wartościami z tabelki. &lt;br /&gt;
* zmienić styl punktów grafu na kółko (patrz metoda &amp;lt;code&amp;gt;SetMarkerStyle&amp;lt;/code&amp;gt; oraz klasa &amp;lt;code&amp;gt;TAttMarker&amp;lt;/code&amp;gt;)&lt;br /&gt;
* narysować graf w oddzielnym oknie&lt;br /&gt;
&lt;br /&gt;
== Uwagi ==&lt;br /&gt;
* &amp;lt;b&amp;gt;Uwaga!&amp;lt;/b&amp;gt; Aby środowisko ROOT można było uruchomić na własnym koncie użytkownika w laboratorium, należy w pliku &amp;lt;code&amp;gt;$HOME/.bashrc&amp;lt;/code&amp;gt; dopisać następujące linijki (jeśli nie były dodane na zajęciach z PTI):&lt;br /&gt;
  export ROOTSYS=/opt/root&lt;br /&gt;
  export PATH=$PATH:$ROOTSYS/bin&lt;br /&gt;
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib &lt;br /&gt;
* środowisko ROOT jest zainstalowane lokalnie na każdym komputerze - nie jest dostępne na serwerze&lt;br /&gt;
* w środowisku ROOT piszemy &amp;lt;b&amp;gt;makra&amp;lt;/b&amp;gt;, które mają rozszerzenie .c, .C, .cpp, lub .cxx&lt;br /&gt;
* makro zawiera w sobie kod w języku C++ interpretowany linijka po linijce&lt;br /&gt;
* w zasadzie nie musimy załączać żadnych bibliotek &lt;br /&gt;
* przykład 1:&lt;br /&gt;
 {&lt;br /&gt;
     double x = 5;&lt;br /&gt;
     cout&amp;lt;&amp;lt;x&amp;lt;&amp;lt;endl;&lt;br /&gt;
 }&lt;br /&gt;
* wywołanie makra: uruchamiamy środowisko (komenda &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;), wpisujemy &amp;lt;code&amp;gt;.x macro.C&amp;lt;/code&amp;gt;&lt;br /&gt;
* makro może zawierać również &amp;lt;b&amp;gt;funkcje&amp;lt;/b&amp;gt;, przykład 2:&lt;br /&gt;
 int macro()&lt;br /&gt;
 {&lt;br /&gt;
     double x = 5;&lt;br /&gt;
     cout&amp;lt;&amp;lt;x&amp;lt;&amp;lt;endl;&lt;br /&gt;
     return 1;&lt;br /&gt;
 }&lt;br /&gt;
* nazwa makra musi być taka sama jak nazwa funkcji w makrze (by można było je uruchomić komendą &amp;lt;code&amp;gt;.x macro.C&amp;lt;/code&amp;gt;)&lt;br /&gt;
* w makrach może być więcej funkcji - przy standardowym uruchomieniu wywołana zawsze będzie ta funkcja, której nazwa zgadza się z nazwą makra (odpowiednik funkcji &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; w standardowym C++)&lt;br /&gt;
&lt;br /&gt;
== Wynik ==&lt;br /&gt;
Wykresy:&lt;br /&gt;
* okno 1&lt;br /&gt;
[[File:lab1_1.png]]&lt;br /&gt;
* okno 2&lt;br /&gt;
[[File:1_2.png]]&lt;/div&gt;</summary>
		<author><name>Lgraczyk</name></author>	</entry>

	</feed>