Mercurial > hg > Members > masakoha > seminar
annotate 2015/1127.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 | 37ae3e675c32 |
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"> | |
44
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
105 <name>Masataka Kohagura</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> |
44
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
117 本研究では正規表現を並列処理で実装することによってこの問題を解決し、Class NC問題 に対応するライブラリを作成する。 |
28 | 118 </ul> |
119 </div> | |
120 | |
121 <div id="cover"> | |
44
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
122 <h1>今日までにしたこと</h1> |
37
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
123 <ul> |
44
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
124 <li>とりあえず動くところまではプログラムを直した(若干バグが)</li> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
125 </ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
126 <ul> |
45
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
127 <li>正規表現木のノード内に一文字のアルファベットだけしか入らなかったが、word をいれれるようにした(一文字のアルファベットも word と見なしている)</li> |
37
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
128 </ul> |
45
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
129 <ul> |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
130 <li>word が含まれているノードだけにノード番号をつけていたが、syntax が含まれているノードにもノード番号をつけた</li> |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
131 </ul> |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
132 |
37
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
133 <p></p> |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
134 </div> |
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
135 |
44
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
136 <div id="cover"> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
137 <h1>実装すること</h1> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
138 <p>正規表現の parser tree から subset constraction に変換するプログラムを書く</p> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
139 <ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
140 <li>Parser Tree のノードに word や CharClass を挿れる(今は一文字のみ)</li> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
141 </ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
142 <p>CharClass を Binary Tree で表現する</p> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
143 <ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
144 <li>正規表現に Character Class (例 : [a-z])が含まれている場合、Character Class を二分木で表現する</li> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
145 </ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
146 <object data="images/vector/CharClassTree0.svg" type="image/svg+xml" style="width:50%"></object><br> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
147 </div> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
148 |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
149 <div id="cover"> |
44
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
150 <h1>Character Class が正規表現内に複数含まれる場合</h1> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
151 <p>複数の Character Class の範囲が重複する場合</p> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
152 <ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
153 <li>Character Class Tree を Merge し再構築する</li> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
154 </ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
155 </ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
156 <object data="images/vector/CharClassTree1.svg" type="image/svg+xml" style="width:50%"></object><br> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
157 <object data="images/vector/CharClassTreeMerge.svg" type="image/svg+xml" style="width:50%"></object><br> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
158 </div> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
159 |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
160 <div id="cover"> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
161 <h1>直しているところ</h1> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
162 <ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
163 <li>'|' が複数含まれていると正しく正規表現木が構築されない</li> |
45
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
164 <li>ab*c の正規表現の場合、ab という Node になる</li> |
44
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
165 <li>'()'や'*'直後の単語の先頭文字が Node に含まれない</li> |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
166 <pre> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
167 <code> |
45
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
168 (現状)% ./regexParser -regex "(ac|b|aa)*ac" |
44
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
169 regex : (ac|b|aa)*ac |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
170 ---Print Node---- |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
171 c(6) |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
172 +(7) |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
173 *(5) |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
174 aa(3) |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
175 |(4) |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
176 b(2) |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
177 |(8) |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
178 ac(1) |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
179 ----------------- |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
180 </code> |
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
181 </pre> |
45
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
182 |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
183 <pre> |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
184 <code> |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
185 (理想)% ./regexParser -regex "(ac|b|aa)*ac" |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
186 regex : (ac|b|aa)*ac |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
187 ---Print Node---- |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
188 ac(7) |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
189 +(8) |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
190 *(6) |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
191 aa(3) |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
192 |(4) |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
193 b(2) |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
194 |(5) |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
195 ac(1) |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
196 ----------------- |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
197 </code> |
37ae3e675c32
add images
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
198 </pre> |
44
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
199 </ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
200 <ul> |
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
201 </ul> |
35
18bbb4a5db60
add 0929.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
34
diff
changeset
|
202 </div> |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
203 |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
204 <div id="cover"> |
37
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
205 <h1>どのようなリスト構造か</h1> |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
206 <pre> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
207 <code> |
37
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
208 typedef struct bitVector { |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
209 int arrayNum; |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
210 unsigned long *bitContainer; |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
211 }BitVector,*BitVectorPtr; |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
212 |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
213 typedef struct bitVectorList { |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
214 bitVectorList *self; |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
215 BitVectorPtr bi; |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
216 bitVectorList* initBvl; |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
217 bitVectorList* next[256]; |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
218 }BitVectorList, *BitVectorListPtr; |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
219 </code> |
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
220 </pre> |
37
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
221 <ul> |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
222 <li>BitVectorPtr->bitContainer に状態を格納する。 </li> |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
223 <li>BitVectorListPtr->next[c] は 'c' という文字が入力されたときの BitVectorListPtr の遷移先(アドレス)を格納している </li> |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
224 <li> </li> |
f9293af3d474
add 1117.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
225 </ul> |
44
b796a4f4c332
add somefiles
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
37
diff
changeset
|
226 <img src="./images/sqrWave.png" width="50%" height=""> |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
227 </div> |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
228 |
33
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
229 <!-- |
34
60a678b8539c
add 0825.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
33
diff
changeset
|
230 <div id="cover"> |
31 | 231 <pre> |
232 <code> | |
233 NodePtr string() { | |
234 char c = *ptr; | |
235 NodePtr n = NULL; | |
236 if (isLiteral(c)) { | |
237 n = createNode(0,literal(),string()); | |
238 } else { | |
239 n = createNode(0,0,0); | |
240 } | |
241 return n; | |
242 } | |
243 </code> | |
244 </pre> | |
245 <p>string なのか literal なのか判断しないで createNode をしてる</p> | |
246 </div> | |
33
8a5b151da414
add 0804.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
247 --> |
31 | 248 |
249 | |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
250 <!-- |
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
251 <div id="cover"> |
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
252 <h1>今週のしたこと</h1> |
28 | 253 例題 : ab(ab)+ |
254 <ul> | |
255 <object data="images/vector/abab.svg" type="image/svg+xml"></object><br> | |
256 </ul> | |
257 テキストが abab の途中で分割される場合を考える | |
258 <ul> | |
259 <object data="images/vector/ababautomata.svg" type="image/svg+xml"></object><br> | |
260 </ul> | |
261 分割されたファイルの1コ前の終わりが状態(3)の場合で、分割されたファイルの先頭が b の場合状態(4)に遷移して受理される。(正規表現にマッチする) | |
262 <ul> | |
263 <object data="images/vector/ababtable.svg" type="image/svg+xml"></object><br> | |
264 </ul> | |
265 <ul> | |
266 <object data="images/vector/bitvectorTable.svg" type="image/svg+xml"></object><br> | |
267 </ul> | |
268 </div> | |
29
39f9309334f9
add 0714.html
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
269 --> |
28 | 270 |
271 <!-- | |
272 <div id="cover"> | |
273 <h1>prog</h1> | |
274 <ul> | |
275 <li> | |
276 | |
277 </li> | |
278 | |
279 <pre> | |
280 <code> | |
281 typedef struct SDL_AudioSpec { | |
282 int freq; /** DSP frequency samples per second */ | |
283 Uint16 format; /** Audio data format */ | |
284 Uint8 channels; /** Number of channels: 1 mono, 2 stereo */ | |
285 Uint8 silence; /** Audio buffer silence value (calculated) */ | |
286 Uint16 samples; /** Audio buffer size in samples (power of 2) */ | |
287 Uint16 padding; /** Necessary for some compile environments */ | |
288 Uint32 size; /** Audio buffer size in bytes (calculated) */ | |
289 void (SDLCALL *callback)(void *userdata, Uint8 *stream, int len); | |
290 void *userdata; | |
291 } SDL_AudioSpec; | |
292 </code> | |
30 | 293 </pre> |
294 <img src="./images/sqrWave.png" width="50%" height=""> | |
28 | 295 </ul> |
296 </div> | |
297 | |
298 --> | |
299 | |
300 </div> <!-- presentation --> | |
301 </body> | |
302 </html> |