Mercurial > hg > Members > masakoha > seminar
annotate 2015/0825.html @ 48:1306b24dc707 default tip
fix
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 24 Feb 2016 22:23:31 +0900 |
parents | 18bbb4a5db60 |
children |
rev | line source |
---|---|
28 | 1 <!DOCTYPE html> |
2 <html> | |
3 <head> | |
4 <meta http-equiv="content-type" content="text/html;charset=utf-8"> | |
5 <title>seminar</title> | |
6 | |
7 <!-- | |
8 Notes on CSS media types used: | |
9 | |
10 1) projection -> slideshow mode (display one slide at-a-time; hide all others) | |
11 2) screen -> outline mode (display all slides-at-once on screen) | |
12 3) print -> print (and print preview) | |
13 | |
14 Note: toggle between projection/screen (that is, slideshow/outline) mode using t-key | |
15 | |
16 Questions, comments? | |
17 - send them along to the mailinglist/forum online @ http://groups.google.com/group/webslideshow | |
18 --> | |
19 | |
20 <!-- styles --> | |
21 <style media="screen,projection"> | |
22 | |
23 html, | |
24 body, | |
25 .presentation { margin: 0; padding: 0; } | |
26 | |
27 .slide { display: none; | |
28 position: absolute; | |
29 top: 0; left: 0; | |
30 margin: 0; | |
31 border: none; | |
32 padding: 2% 4% 0% 4%; /* css note: order is => top right bottom left */ | |
33 -moz-box-sizing: border-box; | |
34 -webkit-box-sizing: border-box; | |
35 box-sizing: border-box; | |
36 width: 100%; height: 100%; /* css note: lets use border-box; no need to add padding+border to get to 100% */ | |
37 overflow-x: hidden; overflow-y: auto; | |
38 z-index: 2; | |
39 } | |
40 | |
41 .slide.current { display: block; } /* only display current slide in projection mode */ | |
42 | |
43 .slide .stepcurrent { color: black; } | |
44 .slide .step { color: silver; } /* or hide next steps e.g. .step { visibility: hidden; } */ | |
45 | |
46 .slide { | |
47 /* | |
48 background-image: -webkit-linear-gradient(top, blue, aqua, blue, aqua); | |
49 background-image: -moz-linear-gradient(top, blue, aqua, blue, aqua); | |
50 */ | |
51 } | |
52 </style> | |
53 | |
54 <style media="screen"> | |
55 .slide { border-top: 1px solid #888; } | |
56 .slide:first-child { border: none; } | |
57 </style> | |
58 | |
59 <style media="print"> | |
60 .slide { page-break-inside: avoid; } | |
61 .slide h1 { page-break-after: avoid; } | |
62 .slide ul { page-break-inside: avoid; } | |
63 </style> | |
64 | |
65 | |
66 <!-- add js lib (jquery) --> | |
67 <script src="js/jquery-1.7.min.js"></script> | |
68 | |
69 <!-- S6 JS --> | |
70 <script src="js/jquery.slideshow.js"></script> | |
71 <script src="js/jquery.slideshow.counter.js"></script> | |
72 <script src="js/jquery.slideshow.controls.js"></script> | |
73 <script> | |
74 $(document).ready( function() { | |
75 Slideshow.init(); | |
76 | |
77 // Example 2: Start Off in Outline Mode | |
78 // Slideshow.init( { mode: 'outline' } ); | |
79 | |
80 // Example 3: Use Custom Transition | |
81 // Slideshow.transition = transitionScrollUp; | |
82 // Slideshow.init(); | |
83 | |
84 // Example 4: Start Off in Autoplay Mode with Custom Transition | |
85 // Slideshow.transition = transitionScrollUp; | |
86 // Slideshow.init( { mode: 'autoplay' } ); | |
87 } ); | |
88 </script> | |
89 | |
90 </head> | |
91 <body> | |
92 | |
93 <div class="presentation"> | |
94 | |
95 <div class='slide cover'> | |
96 <table width="90%" height="90%" border="0" align="center"> | |
97 <tr> | |
98 <td><div align="center"> | |
99 <h1>Cerium 上での正規表現の実装</h1> | |
100 </div> | |
101 </td> | |
102 </tr> | |
103 <tr> | |
104 <td><div align="right"> | |
33
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
105 <name>Masataka Kohagura 4th, August , 2015</name> |
28 | 106 </div></td> |
107 </tr> | |
108 </tr> | |
109 </table> | |
110 </div> | |
111 | |
112 <div id="cover"> | |
113 <h1>研究目的</h1> | |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
114 正規表現はオートマトンに変換することができ、 そしてオートマトンの受理の問題は Class NC と呼ばれる問題でもある。<br> |
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
115 この問題は計算機の台数が多ければ多いほど高速化できるという特徴を持ち、並列化に向いている問題といえる。<br> |
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
116 コンピュータの動作やゲームの動作などの多くの問題はオートマトンの受理問題に落としこむことができるので、この問題を解決すれば様々な問題に対応できるようになる。<br> |
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
117 本研究では正規表現を並列処理で実装することによってこの問題を解決し、Class NC に対応するライブラリを作成する。 |
28 | 118 </ul> |
119 </div> | |
120 | |
121 <div id="cover"> | |
33
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
122 <h1>現在していること</h1> |
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
123 <p>正規表現の Subset Constraction の状態の集合を生成するために正規表現の Parser を記述している</p> |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
124 <p>正規表現の二分木が正しく構築できているかどうか確認するために、Tree を表示させるためのプログラムを書いている。</p> |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
125 </div> |
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
126 |
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
127 <div id="cover"> |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
128 <h1>したこと</h1> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
129 <p>二分木を表示するための関数を作成</p> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
130 </div> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
131 |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
132 <div id="cover"> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
133 <h1>正規表現で生成された二分木を表示</h1> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
134 <pre> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
135 <code> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
136 % ./regexParser -regex "test" |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
137 |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
138 t |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
139 + |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
140 s |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
141 + |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
142 e |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
143 + |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
144 t |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
145 |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
146 % ./regexParser -regex "a*bc" |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
147 |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
148 c |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
149 + |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
150 b |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
151 + |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
152 * |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
153 a |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
154 </code> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
155 </pre> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
156 </div> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
157 |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
158 <div id="cover"> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
159 <h1>まだまだバグバグ</h1> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
160 <p>同じ正規表現でも生成される木が違う(正しくもない)</p> |
33
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
161 <pre> |
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
162 <code> |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
163 % ./regexParser -regex "(a*b)" |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
164 + |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
165 b |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
166 + |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
167 * |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
168 a |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
169 |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
170 % ./regexParser -regex "a*b" |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
171 b |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
172 + |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
173 * |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
174 a |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
175 |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
176 理想 |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
177 |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
178 b |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
179 * |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
180 a |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
181 </code> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
182 </pre> |
33
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
183 |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
184 <p>'|'の挙動が正しくない</p> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
185 <pre> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
186 <code> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
187 % ./regexParser -regex "(a|b)c" |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
188 |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
189 c |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
190 + |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
191 b |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
192 | |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
193 a |
33
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
194 |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
195 |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
196 理想 |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
197 c |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
198 + |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
199 b |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
200 | |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
201 a |
33
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
202 |
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
203 </code> |
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
204 </pre> |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
205 <p>'(' ')'まわりと '|' まわりの処理が正しくない</p> |
30 | 206 </div> |
207 | |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
208 <!-- |
30 | 209 <div id="cover"> |
210 <h1>問題点</h1> | |
31 | 211 <p>正規表現 a*b の tree 構造(本当はこうなってほしい)</p> |
30 | 212 |
31 | 213 <object data="images/vector/aastabtrue.svg" type="image/svg+xml"></object><br> |
214 <p>正規表現 a*b の tree 構造(現状)</p> | |
215 <object data="images/vector/aastabfalse.svg" type="image/svg+xml"></object><br> | |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
216 </div> |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
217 --> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
218 |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
219 <div id="cover"> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
220 <pre> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
221 <code> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
222 typedef struct node { |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
223 unsigned char type; |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
224 union value { |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
225 charClass *cc; |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
226 unsigned char character; |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
227 } Value, *ValuePtr; |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
228 struct node *self; |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
229 struct node *left; |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
230 struct node *right; |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
231 } Node, *NodePtr; |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
232 </code> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
233 </pre> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
234 <p>木を表示する際に、右ノード、親ノード、左ノードの順番で表示する。</p> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
235 <p>右ノードから親ノードに移動する際、ノードを遡るための情報が node に持っていない。</p> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
236 <p>親ノードの情報も持たせたほうが良さそう</p> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
237 </div> |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
238 |
33
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
239 <!-- |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
240 <div id="cover"> |
31 | 241 <pre> |
242 <code> | |
243 NodePtr string() { | |
244 char c = *ptr; | |
245 NodePtr n = NULL; | |
246 if (isLiteral(c)) { | |
247 n = createNode(0,literal(),string()); | |
248 } else { | |
249 n = createNode(0,0,0); | |
250 } | |
251 return n; | |
252 } | |
253 </code> | |
254 </pre> | |
255 <p>string なのか literal なのか判断しないで createNode をしてる</p> | |
256 </div> | |
33
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
257 --> |
31 | 258 |
259 | |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
260 <!-- |
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
261 <div id="cover"> |
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
262 <h1>今週のしたこと</h1> |
28 | 263 例題 : ab(ab)+ |
264 <ul> | |
265 <object data="images/vector/abab.svg" type="image/svg+xml"></object><br> | |
266 </ul> | |
267 テキストが abab の途中で分割される場合を考える | |
268 <ul> | |
269 <object data="images/vector/ababautomata.svg" type="image/svg+xml"></object><br> | |
270 </ul> | |
271 分割されたファイルの1コ前の終わりが状態(3)の場合で、分割されたファイルの先頭が b の場合状態(4)に遷移して受理される。(正規表現にマッチする) | |
272 <ul> | |
273 <object data="images/vector/ababtable.svg" type="image/svg+xml"></object><br> | |
274 </ul> | |
275 <ul> | |
276 <object data="images/vector/bitvectorTable.svg" type="image/svg+xml"></object><br> | |
277 </ul> | |
278 </div> | |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
279 --> |
28 | 280 |
281 <!-- | |
282 <div id="cover"> | |
283 <h1>prog</h1> | |
284 <ul> | |
285 <li> | |
286 | |
287 </li> | |
288 | |
289 <pre> | |
290 <code> | |
291 typedef struct SDL_AudioSpec { | |
292 int freq; /** DSP frequency samples per second */ | |
293 Uint16 format; /** Audio data format */ | |
294 Uint8 channels; /** Number of channels: 1 mono, 2 stereo */ | |
295 Uint8 silence; /** Audio buffer silence value (calculated) */ | |
296 Uint16 samples; /** Audio buffer size in samples (power of 2) */ | |
297 Uint16 padding; /** Necessary for some compile environments */ | |
298 Uint32 size; /** Audio buffer size in bytes (calculated) */ | |
299 void (SDLCALL *callback)(void *userdata, Uint8 *stream, int len); | |
300 void *userdata; | |
301 } SDL_AudioSpec; | |
302 </code> | |
30 | 303 </pre> |
304 <img src="./images/sqrWave.png" width="50%" height=""> | |
28 | 305 </ul> |
306 </div> | |
307 | |
308 --> | |
309 | |
310 </div> <!-- presentation --> | |
311 </body> | |
312 </html> |