Annotation of OpenXM/src/asir-doc/exp/exp-ja.texi, Revision 1.29
1.29 ! nakayama 1: %% $OpenXM: OpenXM/src/asir-doc/exp/exp-ja.texi,v 1.28 2008/11/19 03:25:38 ohara Exp $
1.1 takayama 2: \input texinfo
3: @iftex
4: @catcode`@#=6
5: @def@fref#1{@xrefX[#1,,@code{#1},,,]}
6: @def@b#1{{@bf@gt #1}}
7: @catcode`@#=@other
8: @end iftex
9: @overfullrule=0pt
10: @c -*-texinfo-*-
11: @comment %**start of header
12: @comment --- $B$*$^$8$J$$=*$j(B ---
13:
14: @comment --- GNU info $B%U%!%$%k$NL>A0(B ---
15: @setfilename xyzman
16:
17: @comment --- $B%?%$%H%k(B ---
18: @settitle $B<B83E*;EMM$N4X?t(B
19:
20: @comment %**end of header
21: @comment %@setchapternewpage odd
22:
23: @comment --- $B$*$^$8$J$$(B ---
24: @ifinfo
25: @macro fref{name}
26: @ref{\name\,,@code{\name\}}
27: @end macro
28: @end ifinfo
29:
30: @iftex
31: @comment @finalout
32: @end iftex
33:
34: @titlepage
35: @comment --- $B$*$^$8$J$$=*$j(B ---
36:
37: @comment --- $B%?%$%H%k(B, $B%P!<%8%g%s(B, $BCx<TL>(B, $BCx:n8"I=<((B ---
38: @title $B<B83E*;EMM$N4X?t(B
39: @subtitle Risa/Asir $B<B83E*;EMM4X?t@bL@=q(B
40: @subtitle 1.0 $BHG(B
1.25 takayama 41: @subtitle 2008 $BG/(B 1 $B7n(B
1.1 takayama 42:
1.16 ohara 43: @author by Risa/Asir committers
1.1 takayama 44: @page
45: @vskip 0pt plus 1filll
46: Copyright @copyright{} Risa/Asir committers
47: 2004. All rights reserved.
48: @end titlepage
49:
50: @comment --- $B$*$^$8$J$$(B ---
51: @synindex vr fn
52: @comment --- $B$*$^$8$J$$=*$j(B ---
53:
54: @comment --- @node $B$O(B GNU info, HTML $BMQ(B ---
55: @comment --- @node $B$N0z?t$O(B node-name, next, previous, up ---
56: @node Top,, (dir), (dir)
57:
58: @comment --- @menu $B$O(B GNU info, HTML $BMQ(B ---
59: @comment --- chapter $BL>$r@53N$KJB$Y$k(B ---
60: @comment --- $B$3$NJ8=q$G$O(B chapter XYZ, Chapter Index $B$,$"$k(B.
61: @comment --- Chapter XYZ $B$K$O(B section XYZ$B$K$D$$$F(B, section XYZ$B$K4X$9$k4X?t$,$"$k(B.
62: @menu
63: * Experimental Functions::
64: * Index::
65: @end menu
66:
67: @comment --- chapter $B$N3+;O(B ---
68: @comment --- $B?F(B chapter $BL>$r@53N$K(B. $B?F$,$J$$>l9g$O(B Top ---
69: @node $B<B83E*;EMM$N4X?t(B,,, Top
70: @chapter $B<B83E*;EMM$N4X?t(B
71:
72: @comment --- section $BL>$r@53N$KJB$Y$k(B. ---
73: @menu
74: * $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B::
75: * $B<B83E*;EMM$N4X?t(B::
76: @end menu
77:
78: @comment --- section ``XYZ$B$K$D$$$F(B'' $B$N3+;O(B --- section XYZ$B$K$D$$$F$N?F$O(B chapter XYZ
79: @node $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B,,, XYZ
80: @section $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B
81:
82: @comment --- $B=qBN;XDj$K$D$$$F(B ---
83: @comment --- @code{} $B$O%?%$%W%i%$%?BNI=<((B ---
84: @comment --- @var{} $B$O<P;zBNI=<((B ---
85: @comment --- @b{} $B$O%\!<%k%II=<((B ---
86: @comment --- @samp{} $B$O%U%!%$%kL>$J$I$NI=<((B ---
87:
88: $B$3$N@bL@=q$G$O(B
89: @b{Asir} $B$KF3F~$5$l$?<B83E*;EMM$N4X?t$K$D$$$F@bL@$9$k(B.
90: $B@5<0$J4X?t$H$7$FF3F~$5$l$?$b$N$N5-=R$O(B Risa/Asir $B%^%K%e%"%k(B
91: $B$K0\F0$5$l$k(B.
92: ChangeLog $B$N9`L\$O(B www.openxm.org $B$N(B cvsweb $B$G(B
93: $B%=!<%9%3!<%I$rFI$`;~$N=u$1$K$J$k>pJs$,=q$+$l$F$$$k(B.
94:
95: @comment --- section ``$B<B83E*4X?t(B'' $B$N3+;O(B ---
96: @node $B<B83E*;EMM$N4X?t(B,,, $B<B83E*;EMM$N4X?t(B
97: @section $B<B83E*;EMM$N4X?t(B
98:
99: @comment --- section ``$B<B83E*4X?t(B'' $B$N(B subsection xyz_abc
100: @comment --- subsection xyz_pqr xyz_stu $B$,$"$k(B.
101: @menu
1.2 takayama 102: * quotetotex::
103: * quotetotex_env::
104: * objtoquote::
1.3 takayama 105: * copyright::
1.2 takayama 106: * string_to_tb::
107: * tb_to_string::
108: * write_to_tb::
1.3 takayama 109: * dp_gr_main::
1.4 takayama 110: * asir-port.sh::
111: * asir-install.sh::
112: * get_struct_name::
113: * get_element_names::
114: * get_element_at::
115: * put_element_at::
1.6 takayama 116: * dp_initial_term::
117: * dp_order::
118: * dp_weyl_gr_main::
1.8 takayama 119: * list::
120: * mapat::
1.9 takayama 121: * set_print_function::
1.12 takayama 122: * small_jacobi::
1.13 takayama 123: * flatten_quote::
1.27 ohara 124: * printf::
1.28 ohara 125: * fprintf::
1.15 takayama 126: * sprintf::
127: * quote_to_funargs::
128: * funargs_to_quote::
1.19 takayama 129: * get_function_name::
1.15 takayama 130: * remove_paren::
1.17 takayama 131: * set_secure_mode::
132: * set_secure_flag::
1.22 takayama 133: * initialize_static_variable::
1.23 takayama 134: * eval_quote::
135: * nqt_match::
136: * nqt_match_rewrite::
137: * qt_normalize::
138: * qt_set_coef::
139: * qt_set_ord::
140: * qt_set_weight::
141: * nqt_comp::
142: * qt_is_var::
143: * qt_is_ceof::
144: * qt_rewrite::
1.24 takayama 145: * asirgui.hnd::
1.25 takayama 146: * noro_matrix.rr:
1.26 takayama 147: * f_res::
1.27 ohara 148: * chdir::
149: * pwd::
150: * dcurrenttime::
151:
1.23 takayama 152:
1.1 takayama 153: @end menu
154:
1.3 takayama 155: @comment --- $B"~"~"~"~(B $B4X?t(B quotetotex, quotetotex_env $B$N@bL@(B $B"~"~"~"~(B
1.1 takayama 156: @comment --- $B8D!9$N4X?t$N@bL@$N3+;O(B ---
157: @comment --- section $BL>$r@53N$K(B ---
1.2 takayama 158: @node quotetotex quotetotex_env,,, $B<B83E*;EMM$N4X?t(B
159: @subsection @code{quotetotex}, @code{quotetotex_env}
1.1 takayama 160: @comment --- $B:w0zMQ%-!<%o!<%I(B
1.2 takayama 161: @findex quotetotex
162: @findex quotetotex_env
1.1 takayama 163:
164: @comment --- $B4X?t$N4JC1$J@bL@(B ---
165: @table @t
1.2 takayama 166: @item quotetotex(@var{q})
167: :: @var{q} $B$r(B latex $B7A<0$GI=8=$7$?J8;zNs$KJQ49$9$k(B.
168: @item quotetotex_env(@var{key},@var{value})
169: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$rJQ99$9$k(B.
170: @item quotetotex_env()
171: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$N8=:_CM$rLa$9(B.
172: @item quotetotex_env(0)
173: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$r%G%U%)!<%k%HCM$KLa$9(B.
1.1 takayama 174: @end table
175:
176: @comment --- $B0z?t$N4JC1$J@bL@(B ---
177: @table @var
178: @item return
1.2 takayama 179: $BJ8;zNs(B(quotetotex) $B$^$?$O(B $B%j%9%H$^$?$O%*%V%8%'%/%H(B(quotetotex_env)
180: @item q
181: quote
182: @item key
183: $BJ8;zNs(B
184: @item value
185: $B%*%V%8%'%/%H(B
1.1 takayama 186: @end table
187:
188: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
189: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
190: @comment --- @bullet $B$O9uE@IU$-(B ---
191: @itemize @bullet
192: @item
1.2 takayama 193: quotetotex $B$O(B @var{q} $B$r(B latex $B7A<0$GI=8=$7$?J8;zNs$KJQ49$9$k(B.
194: @item
195: $B0J2<(B quotetotex_env $B$N%Q%i%a!<%?$N0UL#$r@bL@$9$k(B.
196: @item
197: conv_rule: 3 $B%S%C%H$rMQ$$$FJQ49%k!<%k$r;XDj$9$k(B.
198: 0$B%S%C%HL\$O(B symbol_table $B$K$h$kJQ49$r9T$&$+(B,
199: 1$B%S%C%HL\$OE:;zJQ49$r9T$&$+(B,
1.3 takayama 200: 2$B%S%C%HL\$O(B d $B$+$i;O$^$kJQ?tL>$rHyJ,:nMQAG$H$_$J$7$F=hM}$9$k$+(B,
1.2 takayama 201: $B$r0UL#$9$k(B.
202: $B$?$H$($P(B conv_rule $B$H$7$F(B 3 $B$r;XDj$9$k$H(B,
203: 0$B%S%C%HL\(B, 1 $B%S%C%HL\$,(B 1 $B$H$J$k$N$G(B
204: symbol_table $B$K$h$kJQ49$r9T$$(B, $BE:;zJQ49$r$*$3$J$&(B.
205: $BE:;zJQ49$O?t;z$H1Q;z$N6-L\$*$h$S(B _ $B5-9f$r6h@Z$j$H$9$k(B.
206: symbol_table $B$K$h$kJQ49$,:G=i$KE,MQ$5$l$k(B.
207: alpha, beta, $BEy$O<+F0E*$r%.%j%7%cJ8;z$KJQ49$9$k%F!<%V%k$O(B
208: $BFbB"$:$_(B.
209: @item
1.5 takayama 210: dp_vars_prefix: $BJ,;6I=8=B?9`<0$O(B
211: @tex
212: $x_0, x_1, \cdots$
213: @end tex
214: $B$NB?9`<0$H$7$F(B latex $B7A<0$KJQ49$5$l$k$,$3$N(B
215: x $B$NItJ,$rJQ99$9$k(B.
216: @item
217: dp_vars_origin: $B%$%s%G%C%/%9$N;O$^$j$NCM$r;XDj$9$k(B.
218: $B%G%U%)!<%k%H$O(B 0.
1.1 takayama 219: @item
1.2 takayama 220: dp_vars_hweyl: $BJ,;6I=8=B?9`<0$r%o%$%kBe?t$N85$H$_$J$7$F(B
1.3 takayama 221: latex $B7A<0$KJQ49$9$k(B.
1.2 takayama 222: $B6v?t8DJQ?t$,$"$k$H$-$O(B $B:G=i$NH>J,$r(B
223: @tex
224: $x_0, x_1, \cdots$
225: @end tex
226: $B$K(B
227: $B8eH>$NH>J,$r(B
228: @tex
229: $\partial_0, \partial_1, \cdots$
230: @end tex
231: $B$KJQ49$9$k(B.
232: $B4q?t8D$N>l9g$O:G8e$NJQ?t$,F1;~2=JQ?t$H$7$F(B h $B$GI=<($5$l$k(B.
1.5 takayama 233: @item
234: dp_dvars_prefix: dp_vars_hweyl $B$,(B 1 $B$N;~$K8eH>ItJ,$N(B prefix $B$r;XDj$9$k(B.
235: $B%G%U%)!<%k%H$O(B @tex $\partial$ @end tex
236: @item
237: dp_dvars_origin: dp_vars_hweyl $B$,(B 1 $B$N;~$N%$%s%G%C%/%9$N;O$^$j$NCM(B.
1.2 takayama 238: @item
239: conv_func: $B%f!<%6Dj5A$NJQ494X?t$r$h$V(B.
240: @item
241:
1.1 takayama 242: @end itemize
243:
244: @comment --- @example$B!A(B@end example $B$O<B9TNc$NI=<((B ---
245: @example
1.2 takayama 246: [3] quotetotex(quote(1/(x+1)));
247: \frac@{ 1@} @{ ( @{x@}+ 1)@}
248: [4] quotetotex(objtoquote(diff(x^x,x)));
249: @{x@}^@{ @{x@}- 1@} @{x@}+ \log( @{x@}) @{x@}^@{ @{x@}@}
250: [5] quotetotex_env("conv_rule",3);
251: [6] quotetotex(objtoquote( (alpha2beta+x_i_j)^2));
252: @{\alpha@}_@{2,\beta@}^@{ 2@} + 2 @{x@}_@{i,j@} @{\alpha@}_@{2,\beta@}+ @{x@}_@{i,j@}^@{ 2@}
1.1 takayama 253: @end example
254:
255: @comment --- $B;2>H(B($B%j%s%/(B)$B$r=q$/(B ---
256: @table @t
257: @item $B;2>H(B
1.2 takayama 258: @ref{objtoquote}
1.3 takayama 259: print_tex_form(contrib)
1.1 takayama 260: @end table
261:
262: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
263: @noindent
264: ChangeLog
265: @itemize @bullet
1.5 takayama 266: @item
267: $B$3$N4X?t$O(B 2004$BG/(B2$B7nKv$+$i(B3$B7n$K$+$1$F(B asir $B$r(B
268: knoppix $BHG(B texmacs $B$KBP1~$5$;$k$?$a$K=q$+$l$?(B.
269: Asir-contrib $B$N(B print_tex_form $B$,$=$N867?$G$"$j(B, $B$=$l$r8zN(2=$7$^$?(B
270: $B=PNO7A<0$r2~A1$7$?(B.
271: OpenXM/src/kxx/ox_texmacs.c, OpenXM/src/texmacs $B$b;2>H(B.
272: @item
273: OpenXM/src/asir-contrib/packages/src/noro_print.rr 1.1--1.8,
274: noro_print_default.rr 1.1--1.3 $B$b;2>H(B.
275: @item
276: $BJQ99$r<u$1$?%U%!%$%k$O(B OpenXM_contrib2/asir2000 $B$N2<$N<!$N%U%!%$%k(B.
1.3 takayama 277: builtin/strobj.c 1.14--1.43,
278: include/ca.h 1.46, io/cexpr.c 1.18, io/pexpr.c 1.32, io.sexpr.c 1.29,
279: parse/arith.c 1.12, parse/parse.h 1.28--1.29,
280: parse/quote.c 1.7--1.8, 1.12.
281: @item
282: knoppix/math $B$O(B $BJ!2,Bg3X$N_@ED$5$s$,Cf?4$H$J$j3+H/$5$l$F$$$k(B.
1.5 takayama 283: @item
284: dp_dvars_prefix, *_origin $B$O(B builtin/strobj.c 1.46 $B$GF3F~$5$l$?(B.
285: @item
286: Todo: quotetoterminalform ($BJ,;6I=8=B?9`<0$N8+0W$$=PNO(B).
1.3 takayama 287: @end itemize
288:
289:
290:
291: @comment --- $B"~"~"~"~(B $B4X?t(B objtoquote $B$N@bL@(B $B"~"~"~"~(B
292: @node objtoquote,,, $B<B83E*;EMM$N4X?t(B
293: @subsection @code{objtoquote}
294: @findex objtoquote
295:
296: @comment --- $B4X?t$N4JC1$J@bL@(B ---
297: @table @t
298: @item objtoquote(@var{ob})
299: :: $B%*%V%8%'%/%H$H(B quote $B7?$N%G!<%?$KJQ49$9$k(B.
300: @end table
301:
302: @table @var
303: @item return
304: quote
305: @item ob
306: $B%*%V%8%'%/%H(B
307: @end table
308:
309: @itemize @bullet
310: @item
311: @code{objtoquote(ob)} $B$O(B, @var{ob} $B$r(B quote $B7?$N%G!<%?$KJQ49$9$k(B.
312: @end itemize
313:
314: @example
315: [1150] quotetolist(quote(1+2));
316: [b_op,+,[internal,1],[internal,2]]
317: [1151] quotetolist(objtoquote(1+x));
318: [b_op,+,[internal,x],[internal,1]]3
319: @end example
320:
321: @table @t
322: @item $B;2>H(B
323: @ref{quotetotex} @ref{quotetolist}
324: @end table
325:
326: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
327: @noindent
328: ChangeLog
329: @itemize @bullet
330: @item $B$3$N4X?t$O(B quotetotex $B$NA0=hM}$r$9$k$?$a$K=q$+$l$?(B.
331: @item asir-contrib $B$N4X?t(B quote_to_quote $B$b;2>H(B.
332: @item OpenXM_contrib2/asir2000/builtin/print.c 1.16.
333: @end itemize
334:
335:
336: @comment --- $B"~"~"~"~(B $B4X?t(B copyright $B$N@bL@(B $B"~"~"~"~(B
337: @node copyright,,, $B<B83E*;EMM$N4X?t(B
338: @subsection @code{copyright}
339: @findex copyright
340:
341: @comment --- $B4X?t$N4JC1$J@bL@(B ---
342: @table @t
343: @item copyright()
344: :: Risa/Asir $B$N(B copyright $BI=<($rJ8;zNs$H$7$FLa$9(B.
345: @end table
346:
347: @table @var
348: @item return
349: $BJ8;zNs(B
350: @end table
351:
352: @itemize @bullet
353: @item
354: Risa/Asir $B$N(B copyright $BI=<($rJ8;zNs$H$7$FLa$9(B.
355: @end itemize
356:
357: @example
358: [1150] copyright();
359: This is Risa/Asir, Version 20040312 (Kobe Distribution).
360: Copyright (C) 1994-2000, all rights reserved, FUJITSU LABORATORIES LIMITED.
361: Copyright 2000-2003, Risa/Asir committers, http://www.openxm.org/.
362: GC 6.2(alpha6) copyright 1988-2003, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.
363: PARI 2.0.17, copyright 1989-1999, C. Batut, K. Belabas, D. Bernardi,
364: H. Cohen and M. Olivier.
365: @end example
366:
367: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
368: @noindent
369: ChangeLog
370: @itemize @bullet
371: @item $B$3$N4X?t$O(B texmacs $BMQ$K=q$+$l$?(B (2004-03).
372: @item OpenXM_contrib2/asir2000 $B$N2<$N0J2<$N%U%!%$%k$r$_$h(B. builtin/miscf.c 1.21,
373: parse/glob.c 1.47.
374: @end itemize
375:
376:
377:
378: @comment --- $B"~"~"~"~(B $B4X?t(B string_to_tb, ... $B$N@bL@(B $B"~"~"~"~(B
379: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
380: @node string_to_tb tb_to_string write_to_tb,,, $B<B83E*;EMM$N4X?t(B
381: @subsection @code{string_to_tb}, @code{tb_to_string}, @code{write_to_tb}
382: @findex string_to_tb
383: @findex tb_to_string
384: @findex write_to_tb
385:
386: @comment --- $B4X?t$N4JC1$J@bL@(B ---
387: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
388: @table @t
389: @item string_to_tb(@var{s})
390: @itemx tb_to_string(@var{tb})
391: @itemx write_to_tb(@var{s},@var{tb})
392: :: $BJ8;zNs2DJQD9G[Ns7?(B(text buffer)$B$N%G!<%?$N=hM}(B
393: @end table
394:
395: @table @var
396: @item return
397: $BJ8;zNs2DJQD9G[Ns7?(B(string_to_tb), $BJ8;zNs7?(B(tb_to_string)
398: @item s
399: $BJ8;zNs(B
400: @item tb
401: $BJ8;zNs2DJQD9G[Ns7?(B
402: @end table
403:
404: @itemize @bullet
405: @item
406: @code{string_to_tb(@var{s})} $B$O(B, $BJ8;zNs(B @var{s} $B$r$O$8$a$NMWAG$H$9$k(B
407: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H$r@8@.$9$k(B.
408: @item
409: @code{tb_to_string_(@var{tb})} $B$O(B,
410: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H(B @var{tb} $B$+$iDL>o$NJ8;zNs%*%V%8%'%/%H$r@8@.$9$k(B.
411: @item
412: @code{write_to_tb(@var{s},@var{tb})} $B$O(B, $BJ8;zNs(B @var{s} $B$r(B
413: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H(B @var{tb} $B$X=q$-=P$9(B.
414: @item @var{SS} $B$rJ8;zNsJQ?t$H$9$k$H$-(B,
415: @var{SS} += "$BJ8;zNs(B" $B$G(B @var{SS} $B$XJ8;zNs$r=q$-B-$7$F$$$/$3$H$,$G$-$k$,(B,
416: $BL5BL$J%a%b%j$rBgNL$K>CHq$9$k(B.
417: $BBe$j$K4X?t(B @code{write_to_tb} $B$rMQ$$$k$Y$-$G$"$k(B.
418: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H$OJ8;zNs$N2DJQD9$NG[Ns$G$"$j%a%b%j4IM}$KM%$7$$(B
419: $B%G!<%?9=B$$G$"$k(B.
420: @end itemize
421:
422: @example
423: [219] T=string_to_tb("");
424:
425: [220] write_to_tb("Hello",T);
426: 0
427: [221] write_to_tb(" world!",T);
428: 0
429: [222] tb_to_string(T);
430: Hello world!
431: @end example
432:
433:
434: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
435: @noindent
436: ChangeLog
437: @itemize @bullet
1.5 takayama 438: @item
439: $B$3$N4X?t$O(B 2004-3 $B$K(B print_tex_form $B$r8zN(2=$9$k$?$a$K=q$+$l$?(B.
440: @item
441: OpenXM_contrib2/asir2000 $B$N2<$N0J2<$N%U%!%$%k$r8+$h(B.
1.3 takayama 442: io/ox_asir.c 1.52, builtin/strobj.c 1.12--1.13, 1.16,
443: engine/str.c 1.5, parse/quote.c 1.9.
1.5 takayama 444: @item
445: rtostr $B$,(B text buffer $B7?$N%G!<%?$K4X$7$F$*$=$+$C$?(B. $BB.EY$N2~A1$O(B
446: asir2000/io/pexpr_body.c 1.2, asir2000/parse/lex.c 1.32.
1.3 takayama 447: @end itemize
448:
449:
450:
451: @comment --- $B"~"~"~"~(B $B4X?t(B dp_gr_main $B$N@bL@(B $B"~"~"~"~(B
452: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
453: @node dp_gr_main,,, $B<B83E*;EMM$N4X?t(B
454: @subsection @code{dp_gr_main}
455: @findex dp_gr_main
456:
457: @comment --- $B4X?t$N4JC1$J@bL@(B ---
458: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
459: @table @t
460: @item dp_gr_main(@var{f} | v=@var{vv}, order=@var{oo}, homo=@var{n}, matrix=@var{m}, block=@var{b}, sugarweight=@var{sw})
461: :: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9(B.
462: @end table
463:
464: @table @var
465: @item return
466: $B%j%9%H(B ($B%0%l%V%J4pDl(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
467: @item f
468: $B%j%9%H(B ($BF~NOB?9`<07O(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
469: @item vv
470: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
471: @item oo
472: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
473: @item n
474: 0 $B$+(B1 (homogenization $B$r$9$k$+(B)
475: @item m
476: $B=g=x$r(B matrix $B$GI=8=$9$k>l9g(B (cf. dp_ord).
477: @item b
478: ???
479: @item sw
1.5 takayama 480: Sugar strategy $B$rE,MQ$9$k$H$-$N(B weight vector. $BA4$F$NMWAG$OHsIi(B.
1.3 takayama 481: @end table
482:
483: @itemize @bullet
484: @item
485: @code{dp_gr_main(@var{f})} $B$O(B, @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
486: $B%0%l%V%J4pDl$O=g=x$rJQ$($k$H$=$N7A$,JQ$o$k(B. asir $B$G$O$$$^$^$G=g=x$N;XDjJ}K!$,(B
487: $B7OE}$@$C$F$$$J$+$C$?(B.
488: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
489: @comment ~taka/this03/misc-2003/A2/dp
490: @item $B=g=x(B order $B$O<!$NJ8K!$GDj5A$9$k(B. @{, @} $B$O(B 0 $B2s0J>e$N7+$jJV$7$r0UL#$9$k(B.
1.11 ohara 491: @example
1.3 takayama 492: order : '[' orderElement { ',' orderElement } ']'
1.5 takayama 493: orderElement : weightVec | builtinOrder
1.3 takayama 494: weightVec : '[' weightElement { ',' weightElement } ']'
495: builtiniOrder : '[' orderName ',' setOfVariables ']'
496: weightElement : NUMBER | setOfVariables ',' NUMBER
497: setOfVariables: V | range(V,V)
1.11 ohara 498: orderName : @@grlex | @@glex | @@lex
499: @end example
1.3 takayama 500: $B$3$3$G(B @code{V} $B$O(B $BJQ?tL>(B, @code{NUMBER} $B$O@0?t$r$"$o$i$9(B.
501: $BNc(B1: @code{v=[x,y,z,u,v], order=[[x,10,y,5,z,1],[@@grlex,range(x,v)]]}
502: $B$O(B @code{x},@code{y},@code{z} $B$,$=$l$>$l(B weight 10, 5, 1 $B$r$b$D(B
503: $B=g=x$GHf3S$7$?$"$H(B, @code{[x,y,z,u,v]} $B$K$D$$$F$N(B
504: graded reverse lexicographic order $B$r(B tie-breaker $B$H$7$FMQ$$$k$3$H$r0UL#$9$k(B.
1.5 takayama 505: $B;29M=q(B: B.Sturmfels: Gr\"obner Bases and Convex Polytopes (1995).
506: M.Saito, B.Sturmfels, N.Takayama:
507: Gr\"obner Deformations of Hypergeometric Differential Equations (2000).
508: @item
509: $B=g=xMWAG(B (orderElement) $B$N;XDjJ}K!$O(B
510: (1) $BJQ?tL>$^$?$O(B range$B$G;XDj$5$l$?JQ?t$N=89g$H=E$_$NCM$N7+$jJV$7(B
511: (2) $B=E$_$NCM$rJQ?t%j%9%H$N=gHV$KJB$Y$kJ}K!(B
512: (3) $BJQ?tL>$^$?$O(B range$B$G;XDj$5$l$?JQ?t$N=89g$H=g=xL>$NAH(B
513: $B$N;0DL$j$N4pACE*J}K!$,$"$k(B.
514: $B;w$?;XDjJ}K!$,(B Macaulay, Singular, CoCoA, Kan/sm1 $BEy$N4DO@%7%9%F%`$G(B
515: $B;HMQ$5$l$F$$$?(B. Risa/Asir $B$N;XDjJ}K!$O$3$l$i$N%7%9%F%`$N;XDjJ}K!$r;29M$K(B
516: $B$5$i$K2~NI$r2C$($?$b$N$G=@Fp@-$,9b$$(B.
1.3 takayama 517: @item
518: order $B$N(B tie-breaker $B$O(B grlex $B$,%G%U%)!<%k%H(B.
519: @item
520: $BJ,;6I=8=B?9`<0$r0z?t$H$7$?$H$-$O7k2L$bJ,;6I=8=B?9`<0$H$7$FLa$k(B.
521: order $B;XDj$K$b$A$$$k%G%U%)!<%k%H$NJQ?tL>$O$3$N$H$-(B x0, x1, x2, ... $B$H$J$k(B.
1.5 takayama 522: @item
523: $B%*%W%7%g%s$NCM$O(B option_list $B%-!<%o!<%I$rMQ$$$F%j%9%H$GM?$($F$b$h$$(B.
524: $B2<$NNc$r;2>H(B.
1.3 takayama 525: @end itemize
526:
527: @example
528: [218] load("cyclic");
529: [219] V=vars(cyclic(4));
530: [c0,c1,c2,c3]
531: [220]dp_gr_main(cyclic(4) | v=V, order=[[c0,10,c1,1],[c2,5],[@@grlex,range(c0,c3)]]);
532: [ 10 1 0 0 ]
533: [ 0 0 5 0 ]
534: [ R R R R ]
535: [(-c3^6+c3^2)*c2^2+c3^4-1,c3^2*c2^3+c3^3*c2^2-c2-c3,
536: (c3^4-1)*c1+c3^5-c3,(c2-c3)*c1+c3^4*c2^2+c3*c2-2*c3^2,-c1^2-2*c3*c1-c3^2,
537: c0+c1+c2+c3]
538:
539: [1151] F=map(dp_ptod,katsura(4), vars(katsura(4)));
540: [(1)*<<1,0,0,0,0>>+(2)*<<0,1,0,0,0>>+ ... ]
541: [1152] dp_gr_main(F | order=[[range(x0,x3),1]]);
542: [ 1 1 1 1 0 ]
543: [ R R R R R ]
544: [(47774098944)*<<0,0,0,0,13>>+ ... ]
1.5 takayama 545:
546: [1153] Opt=[["v",[x,y]], ["order",[[x,5,y,1]]]];
547: [[v,[x,y]],[order,[[x,5,y,1]]]]
548: [1154] dp_gr_main([x^2+y^2-1,x*y-1] | option_list=Opt);
549: [ 5 1 ]
550: [ R R ]
551: [-y^4+y^2-1,x+y^3-y]
1.3 takayama 552: @end example
553:
554: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
555: @noindent
556: ChangeLog
557: @itemize @bullet
558: @item $B$3$N4X?t$O(B 2003-12 $B$+$i(B 2004-2 $B$N;O$a$KBg$-$J=$@5$,9T$o$l$?(B.
559: @item
560: @code{setOfVariables}$B$NI=8=$N$?$a$K(B range $B%*%V%8%'%/%H$,F3F~$5$l$?(B.
561: @item
562: $B%0%l%V%J4pDl$O=g=x$rJQ$($k$H$=$N7A$,JQ$o$k(B. asir $B$G$O$$$^$^$G=g=x$N;XDjJ}K!$,(B
563: $B7OE}$@$C$F$$$J$+$C$?(B.
564: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
565: @item
566: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
567: builtin/gr.c 1.56--1.57,
568: builtin/dp-supp.c 1.27--1.31 (create_composite_order_spec),
569: builtin/dp.c 1.46--1.48 (parse_gr_option),
570: engine/Fgfs.c 1.20,
571: engine/dist.c 1.27--1.28
572: engine/nd.c 1.89,
573: include/ca.h 1.42--1.43,
574: io/pexpr.c 1.28,
575: io/sexpr.c 1.26,
576: parse/arith.c 1.11,
577: parse/glob.c 1.44-1.45,
578: parse/lex.c 1.29,
579: parse/parse.h 1.23--1.26
1.5 takayama 580: @item
581: Todo: return $B%-!<%o!<%I$GLa$jCM$N%G!<%?$r(B quote $B$N%j%9%H$K$G$-$k$h$&$K(B.
582: attribute, ring $B9=B$BN(B.
1.1 takayama 583: @end itemize
584:
585: @comment --- $B"~"~"~"~(B $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B
586: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
1.3 takayama 587: @node asir-install.sh,,, $B<B83E*;EMM$N4X?t(B
588: @subsection @code{asir-port.sh}, @code{asir-install.sh}
589: @findex asir-port.sh
590: @findex asir-install.sh
1.1 takayama 591:
592: @comment --- $B4X?t$N4JC1$J@bL@(B ---
593: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
594: @table @t
1.3 takayama 595: @item asir-install.sh
596: @itemx asir-port.sh
597: :: $B$3$l$O(B asir $B$NFbIt%3%^%s%I$G$O$J$$(B. asir $B$r%M%C%H%o!<%/$+$i%@%&%s%m!<%I$+$D<B9T$9$k%7%'%k%9%/%j%W%H(B
598: @end table
599:
600:
601: @itemize @bullet
602: @item
603: asir-port.sh $B$O(B knoppix $B@lMQ$G$"$k(B.
1.10 ohara 604: $B$3$N%3%^%s%I$O(B asir $B$N%P%$%J%j$*$h$S(B FLL $B$GG[I[$G$-$J$$ItJ,$r(B
1.3 takayama 605: ftp.math.kobe-u.ac.jp $B$h$j%@%&%s%m!<%I$7$F(B
606: /home/knoppix/.asir-tmp $B$X%;!<%V$7$F(B, $B<B9T$9$k(B.
607: .asirrc $B$*$h$S(B .TeXmacs/plugins/ox/progs/init-ox.scm $B$b%@%&%s%m!<%I$9$k(B.
608: @item
609: asir-install.sh $B$O(B Debian GNU Linux / openxm-binary*.deb $B@lMQ$G$"$k(B.
610: asir-install.sh $B$O(B asir $B$r%@%&%s%m!<%I$7$F(B /usr/local/OpenXM/bin $B$*$h$S(B
611: /usr/local/OpenXM/lib/asir $B$X%$%s%9%H!<%k$9$k(B.
612: @end itemize
613:
614:
615: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
616: @noindent
617: ChangeLog
618: @itemize @bullet
619: @item
620: $B$3$l$i$N%7%'%k%9%/%j%W%H$O(B knoppix/math $B$N$?$a$K(B 2004/2, 3 $B7n$K=q$+$l$?(B.
621: @item
622: knoppix/math $B$OJ!2,Bg3X$N_@ED$5$s$,Cf?4$H$J$j3+H/$5$l$F$$$k(B.
623: @item
624: OpenXM/misc/packages/Linux/Debian $B$N2<$NA4$F$N%U%!%$%k(B (2004-2-22 $B$+$i(B
625: 2004-3 $B$NKv$^$G(B). ( ~taka/this03/misc-2003/A3/knoppix-03-05 ($B%W%i%$%Y!<%H%U%!%$%k(B) $B$b8+$h(B.)
626: OpenXM/src/asir-port $B$N2<$N<!$N3F%U%!%$%k(B.
627: Makefile 1.1--1.8, asir-install.sh 1.1--1.2, asir-port.sh 1.1--1.6.
628: @end itemize
629:
1.4 takayama 630:
631: @node get_struct_name,,, $B<B83E*;EMM$N4X?t(B
632: @subsection @code{get_struct_name}, @code{get_element_names}, @code{get_element_at}, @code{put_element_at}
633: @findex get_struct_name
634: @findex get_element_names
635: @findex get_element_at
636: @findex put_element_at
637:
638: @comment --- $B4X?t$N4JC1$J@bL@(B ---
639: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
640: @table @t
641: @item get_struct_name(@var{s})
642: @itemx get_element_names(@var{s})
643: @itemx get_element_at(@var{s},@var{key})
644: @itemx put_element_at(@var{s},@var{key},@var{obj})
645: :: $B9=B$BN(B @var{s} $B$KBP$9$kA`:n(B
646: @end table
647:
648: @table @var
649: @item return
650: $BJ8;zNs(B (get_struct_name),
651: $BJ8;zNs$N%j%9%H(B (get_element_names),
652: $B%*%V%8%'%/%H(B (get_element_at),
653: $B%*%V%8%'%/%H(B (put_element_at)
654: @item s
655: $B9=B$BN(B
656: @item key
657: $BJ8;zNs(B
658: @item obj
659: $B%*%V%8%'%/%H(B
660: @end table
661:
662: @itemize @bullet
663: @item
664: @code{get_struct_name(s)} $B$O(B, $B9=B$BN(B @var{s} $B$NL>A0$rLa$9(B.
665: @item
666: @code{get_element_names(s)} $B$O(B, $B9=B$BN$N%a%s%P!<$NL>A0$N%j%9%H$rLa$9(B.
667: @item
668: @code{get_element_at(s,key)} $B$O9=B$BN(B s $B$N%a%s%P!<(B key $B$NCM$rLa$9(B.
669: @item
670: @code{put_element_at(s,key,obj)} $B$O9=B$BN(B s $B$N%a%s%P!<(B key $B$NCM$r(B obj $B$K@_Dj$9$k(B.
671: @end itemize
672:
673: @example
674: [219] struct point { x, y, color};
675: [220] P = newstruct(point);
676: {0,0,0}
677: [221] P->x = 10$ P->y=5$ P->color="red"$
678: [222] get_element_names(P);
679: [x,y,color]
680: [223] put_element_at(P,"color","blue");
681: blue
682: [224] P->color;
683: bule
684: @end example
685:
686: @table @t
687: @item $B;2>H(B
688: @ref{newstruct}, @ref{struct}
689: @end table
690:
691: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
692: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
693: @noindent
694: ChangeLog
695: @itemize @bullet
696: @item $B9=B$BN$NDj5A$rCN$i$:$K9=B$BN$r07$&%f!<%64X?t$r=q$/$H$-$KJXMx(B.
697: asir-contrib $B$N(B noro_print.rr $B$r8+$h(B.
698: @item OpenXM_contrib2/asir2000/builtin/compobj.c 1.8.
699: @end itemize
700:
1.6 takayama 701: @comment --- $B"~"~"~"~(B $B4X?t(B dp_gr_main $B$N@bL@(B $B"~"~"~"~(B
702: @node dp_weyl_gr_main,,, $B<B83E*;EMM$N4X?t(B
703: @subsection @code{dp_weyl_gr_main}
704: @findex dp_weyl_gr_main
705:
706: @comment --- $B4X?t$N4JC1$J@bL@(B ---
707: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
708: @table @t
709: @item dp_weyl_gr_main(@var{f} | v=@var{vv}, order=@var{oo}, homo=@var{n}, matrix=@var{m}, block=@var{b}, sugarweight=@var{sw})
710: :: dp_weyl_gr_main $B$N?7$7$$%$%s%?%U%'!<%9(B. dp_gr_main $B$HF1$87A<0$G$"$k(B.
711: @end table
712:
713: @table @var
714: @item return
715: $B%j%9%H(B ($B%0%l%V%J4pDl(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
716: @item f
717: $B%j%9%H(B ($BF~NOB?9`<07O(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
718: @item vv
719: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
720: @item oo
721: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
722: @item n
723: 0 $B$+(B1 (homogenization $B$r$9$k$+(B). [$B%F%9%H$^$@(B]
724: @item m
725: $B=g=x$r(B matrix $B$GI=8=$9$k>l9g(B (cf. dp_ord). [$B%F%9%H$^$@(B]
726: @item b
727: ???
728: @item sw
729: Sugar strategy $B$rE,MQ$9$k$H$-$N(B weight vector. $BA4$F$NMWAG$OHsIi(B. [$B%F%9%H$^$@(B]
730: @end table
731:
732: @itemize @bullet
733: @item
734: @code{dp_weyl_gr_main(@var{f})} $B$O(B, @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
735: $B%0%l%V%J4pDl$O=g=x$rJQ$($k$H$=$N7A$,JQ$o$k(B. asir $B$G$O$$$^$^$G=g=x$N;XDjJ}K!$,(B
736: $B7OE}$@$C$F$$$J$+$C$?(B.
737: dp_weyl_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
738: $B;XDjJ}K!$K$D$$$F$O(B dp_gr_main $B$N%^%K%e%"%k$r;2>H(B.
739: @item
740: $BJ,;6I=8=B?9`<0$N3F%b%N%_%"%k$ND9$5$,6v?t$N$H$-$O%o%$%kBe?t(B
741: K[x_1, ..., x_n, d_1, ..., d_n]
742: $B$G7W;;$,$*$3$J$o$l$k(B. $B%o%$%kBe?t$G$O(B x_i $B$H(B d_i $B$OHs2D49$J3]$1;;5,B'(B
743: d_i x_i = x_i d_i +1 $B$r$_$?$7(B, x_i $B$H(B x_j $B$d(B d_i $B$H(B d_j $B$O2D49$G$"$k(B.
744: $B$^$?(B i $B$H(B j $B$,0[$J$k>l9g$O(B x_i $B$H(B d_j $B$b2D49$G$"$k(B.
745: @item
746: $BJ,;6I=8=B?9`<0$N3F%b%N%_%"%k$ND9$5$,4q?t$N$H$-$OF1<!2=%o%$%kBe?t(B
747: K[x_1, ..., x_n, d_1, ..., d_n, h]
748: $B$G7W;;$,$*$3$J$o$l$k(B. $BF1<!2=%o%$%kBe?t$G$O(B x_i $B$H(B d_i $B$OHs2D49$J3]$1;;5,B'(B
749: d_i x_i = x_i d_i + h^2
750: $B$r$_$?$7(B, h $B$OG$0U$N85$H2D49(B, $B$=$NB>$NJQ?t$b%o%$%kBe?t$HF1MM$J2D49@-$N5,B'$r$_$?$9(B.
751: $B>\$7$/$O(B dp_gr_main $B$G;2>H$7$?(B Saito, Sturmfels, Takayama $B$N652J=q$r$_$h(B.
752: @end itemize
753:
754: @example
755: [1220] F=sm1.gkz([ [[1,1,1,1],[0,1,3,4]], [0,0]]); /* Command in asir-contrib*/
756: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2,-dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],[x1,x2,x3,x4]]
757: [1221] V=[x1,x2,x3,x4,dx1,dx2,dx3,dx4]$
1.7 takayama 758: [1222] dp_weyl_gr_main(F[0] | v=V, order=[[dx1,1,dx2,1,dx3,1,dx4,1]]);
759: ...
1.6 takayama 760: [1238] FF=map(dp_ptod,F[0],V);
761: [(1)*<<1,0,0,0,1,0,0,0>>+(1)*<<0,1,0,0,0,1,0,0>>+(1)*<<0,0,1,0,0,0,1,0>>+(1)*<<0,0,0,1,0,0,0,1>>,(1)*<<0,1,0,0,0,1,0,0>>+(3)*<<0,0,1,0,0,0,1,0>>+(4)*<<0,0,0,1,0,0,0,1>>,0,0,0,0]
762:
763: [1244] FF=map(dp_ptod,F[0],V);
764: [(1)*<<1,0,0,0,1,0,0,0>>+(1)*<<0,1,0,0,0,1,0,0>>+(1)*<<0,0,1,0,0,0,1,0>>+(1)*<<0,0,0,1,0,0,0,1>>,(1)*<<0,1,0,0,0,1,0,0>>+(3)*<<0,0,1,0,0,0,1,0>>+(4)*<<0,0,0,1,0,0,0,1>>,(1)*<<0,0,0,0,0,1,1,0>>+(-1)*<<0,0,0,0,1,0,0,1>>,(1)*<<0,0,0,0,1,0,2,0>>+(-1)*<<0,0,0,0,0,2,0,1>>,(-1)*<<0,0,0,0,0,3,0,0>>+(1)*<<0,0,0,0,2,0,1,0>>,(1)*<<0,0,0,0,0,0,3,0>>+(-1)*<<0,0,0,0,0,1,0,2>>]
765:
766: dp_weyl_gr_main(FF | v=V, order=[[0,0,0,0,1,1,1,1]]);
767:
1.7 takayama 768: [1246] dp_weyl_gr_main(FF | v=V, order=[[dx1,1,dx2,1,dx3,1,dx4,1]]);
1.6 takayama 769: [ 0 0 0 0 1 1 1 1 ]
770: [ R R R R R R R R ]
1.7 takayama 771: ...
1.6 takayama 772:
773: @end example
774:
775: @table @t
776: @item $B;2>H(B
777: @ref{dp_gr_main}
778: @end table
779:
780: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
781: @noindent
782: ChangeLog
783: @itemize @bullet
784: @item dp_gr_main $B$N%$%s%?%U%'!<%9$,(B dp_weyl_gr_main $B$X$bF3F~$5$l$?(B.
785: @item
786: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
787: builtin/dp-supp.c 1.32--1.33
788: builtin/dp.c 1.49--1.50
789: @end itemize
790:
791: @comment --- $B"~"~"~"~(B $B4X?t(B dp_initial_term $B$N@bL@(B $B"~"~"~"~(B
792: @node dp_initial_term,,, $B<B83E*;EMM$N4X?t(B
793: @subsection @code{dp_initial_term}
794: @findex dp_initial_term
795:
796: @comment --- $B4X?t$N4JC1$J@bL@(B ---
797: @table @t
798: @item dp_initial_term(@var{f} | v=@var{vv}, order=@var{oo})
799: :: dp_initial_term $B$OM?$($i$l$?(B weight $B$KBP$9$k@hF,9`$NOB$rLa$9(B.
800: @end table
801:
802: @table @var
803: @item return
804: $BJ,;6I=8=B?9`<0$^$?$OJ,;6I=8=B?9`<0$N%j%9%H(B.
805: @item f
806: $BJ,;6I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B.
807: @item vv
808: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
809: @item oo
810: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
811: @end table
812:
813: @itemize @bullet
814: @item
815: dp_initial_term $B$OM?$($i$l$?(B weight w $B$KBP$9$k@hF,9`$NOB$rLa$9(B.
816: $B$3$l$OB?$/$N652J=q$G(B @tex ${\rm in}_w(f)$ @end tex
817: $B$H=q$+$l$F$$$k(B.
818: @item
819: $B=g=x$rI=$9%j%9%H$O(B dp_gr_main $B$GDj5A$7$?J8K!$K=>$&(B.
820: $B$3$N%j%9%H$N@hF,$,(B weight vector $B$GL5$$>l9g$O%(%i!<$H$J$k(B.
821: $B$?$H$($P(B order=[[@@lex,...]] $B$O%(%i!<$H$J$k(B.
822: @item
823: $B7k2L$OM?$($i$l$?=g=x$K4X$7$F%=!<%H$5$l$F$k$o$1$G$O$J$$(B.
824: @end itemize
825:
826: @example
827: [1220] F=<<2,0,0>>+<<1,1,0>>+<<0,0,1>>;
828: (1)*<<2,0,0>>+(1)*<<1,1,0>>+(1)*<<0,0,1>>
829: [1220] dp_initial_term(F | order=[[1,1,1]]);
830: [ 1 1 1 ]
831: [ R R R ]
832: (1)*<<2,0,0>>+(1)*<<1,1,0>>
833: [1221] dp_initial_term(F | v=[x,y,z], order=[[x,1]]);
834: [ 1 0 0 ]
835: [ R R R ]
836: (1)*<<2,0,0>>
837: @end example
838:
839: @table @t
840: @item $B;2>H(B
841: @ref{dp_gr_main}, @ref{dp_weyl_gr_main}, @ref{dp_order}, @ref{dp_hm}
842: @end table
843:
844: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
845: @noindent
846: ChangeLog
847: @itemize @bullet
848: @item
849: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
850: builtin/dp-supp.c 1.32
851: builtin/dp.c 1.49
852: @end itemize
853:
854: @comment --- $B"~"~"~"~(B $B4X?t(B dp_order $B$N@bL@(B $B"~"~"~"~(B
855: @node dp_order,,, $B<B83E*;EMM$N4X?t(B
856: @subsection @code{dp_order}
857: @findex dp_order
858:
859: @comment --- $B4X?t$N4JC1$J@bL@(B ---
860: @table @t
861: @item dp_order(@var{f} | v=@var{vv}, order=@var{oo})
862: :: dp_order $B$OM?$($i$l$?(B weight $B$KBP$9$k<!?t$N:GBgCM$rLa$9(B.
863: @end table
864:
865: @table @var
866: @item return
867: $B?t$+?t$N%j%9%H(B
868: @item f
869: $BJ,;6I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B.
870: @item vv
871: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
872: @item oo
873: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
874: @end table
875:
876: @itemize @bullet
877: @item
878: $B=g=x$rI=$9%j%9%H$O(B dp_gr_main $B$GDj5A$7$?J8K!$K=>$&(B.
879: $B$3$N%j%9%H$N@hF,$,(B weight vector $B$GL5$$>l9g$O%(%i!<$H$J$k(B.
880: $B$?$H$($P(B order=[[@@lex,...]] $B$O%(%i!<$H$J$k(B.
881: @item
882: dp_order $B$OM?$($i$l$?(B weight w $B$KBP$9$k<!?t$N:GBgCM$rLa$9(B.
883: $B$3$l$r(B @tex ${\rm ord}_w(f)$ @end tex
884: $B$H=q$/O@J8$d652J=q$b$"$k(B.
885: @item
886: $B0z?t$,%j%9%H$N>l9g3FMWAG$N<!?t$,7W;;$5$l$k(B.
887: @end itemize
888:
889: @example
890: [1220] F=<<2,0,0>>+<<1,1,0>>+<<0,0,1>>;
891: (1)*<<2,0,0>>+(1)*<<1,1,0>>+(1)*<<0,0,1>>
892: [1222] dp_order(F | order=[[1,1,1]]);
893: [ 1 1 1 ]
894: [ R R R ]
895: 2
896: [1223] dp_order(F | v=[x,y,z], order=[[x,1]]);
897: [ 1 0 0 ]
898: [ R R R ]
899: @end example
900:
901: @table @t
902: @item $B;2>H(B
903: @ref{dp_gr_main}, @ref{dp_weyl_gr_main}, @ref{dp_initial_term}, @ref{dp_hm}
904: @end table
905:
906: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
907: @noindent
908: ChangeLog
909: @itemize @bullet
910: @item
911: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
912: builtin/dp-supp.c 1.32
913: builtin/dp.c 1.49
914: @end itemize
915:
1.8 takayama 916:
917: @comment mapat
918: @node mapat,,, $B<B83E*;EMM$N4X?t(B
919: @subsection @code{mapat}
920: @findex mapat
921:
922: @table @t
923: @item mapat(@var{fname},@var{pos}[,@var{arg0}, @var{arg1}, ...])
924: :: @var{pos} $B$KBP$9$k(B map $B4X?t(B
925: @end table
926:
927: @table @var
928: @item return
929: $B%*%V%8%'%/%H(B
930: @item pos
931: $B@0?t(B
932: @item arg0, arg1, arg2, ...
933: $B%*%V%8%'%/%H(B
934: @end table
935:
936: @itemize @bullet
937: @item
938: @code{map} $B4X?t$O(B 0 $BHVL\$N0z?t$KBP$7$F$7$+F0:n$7$J$$$,(B, @code{mapat}
939: $B4X?t$O;XDj$7$?HV9f$N0z?t$KBP$7$F(B @code{map} $B4X?t$r<B9T$9$k(B.
940: @item
941: @code{mapat(fname,0,A0,A1,...)} $B$O(B
942: @code{map(fname,A0,A1,...)} $B$KEy2A$G$"$k(B.
943: @item
944: $B<!$NI{:nMQ$,$"$k(B. $B$^$@=q$$$F$J$$(B.
945: @end itemize
946:
947: @example
948: [219] mapat(deg,1,x^2+y^3+x+y,[x,y]);
949: [2,3]
1.10 ohara 950: [220] mapat(subst,1,x+y+z,[x,y,z],2);
951: [y+z+2,x+z+2,x+y+2]
1.8 takayama 952: @end example
953:
954: @table @t
955: @item $B;2>H(B
956: @ref{map}
957: @end table
958:
959: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
960: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
961: @noindent
962: ChangeLog
963: @itemize @bullet
964: @item $B$3$N4X?t$O(B 2004-6-22 $B$K%3%_%C%H$5$l$?(B.
965: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/pf.c, subst.c $B$G$"$k(B.
966: @end itemize
967:
968: @comment list
969: @node list,,, $B<B83E*;EMM$N4X?t(B
970: @subsection @code{list}
971: @findex list
972:
973: @table @t
974: @item list([@var{arg0}, @var{arg1}, ...])
975: :: list $B$r@8@.$9$k(B.
976: @end table
977:
978: @table @var
979: @item return
980: $B%j%9%H(B
981: @item arg0, arg1, arg2, ...
982: $B%*%V%8%'%/%H(B
983: @end table
984:
985: @itemize @bullet
986: @item
987: @var{arg0}, @var{arg1}, ... $B$rMWAG$H$9$k%j%9%H$r@8@.$9$k(B.
988: @end itemize
989:
990: @example
991: [219] list(1,2,3);
992: [1,2,3]
993: [220] list(1,2,[3,4]);
994: [1,2,[3,4]]
995: @end example
996:
997: @table @t
998: @item $B;2>H(B
999: @ref{cons}
1000: @end table
1001:
1002: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1003: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1004: @noindent
1005: ChangeLog
1006: @itemize @bullet
1007: @item $B$3$N4X?t$O(B 2004-6-22 $B$K%3%_%C%H$5$l$?(B.
1008: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/list.c $B$G$"$k(B.
1009: @end itemize
1010:
1.9 takayama 1011:
1012: @node set_print_function,,, $B<B83E*;EMM$N4X?t(B
1013: @subsection @code{set_print_function}
1014: @findex set_print_function
1015:
1016: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1017: @table @t
1018: @item set_print_function([@var{fname}])
1019: :: $B2hLLI=<(MQ$N4X?t$rEPO?(B
1020: @end table
1021:
1022: @table @var
1023: @item return
1024: $B@0?t(B
1025: @item fname
1026: $BJ8;zNs(B
1027: @end table
1028:
1029: @itemize @bullet
1030: @item
1031: @code{set_print_function} $B$O(B @code{fname(F)} $B$rDL>o$N2hLLI=<(4X?t$NBe$o$j$K$h$V(B.
1032: @code $B0z?t$,$J$$>l9g$O2hLLI=<(4X?t$r%G%U%)!<%k%H$XLa$9(B.
1033: @code Asir-contrib $B$O$3$N4X?t$rMQ$$$F=PNO4X?t$r(B Asir-contrib $BMQ$KJQ99$7$F$$$k(B.
1034: @end itemize
1035:
1036: @example
1037: [219] def my_output(F) {
1038: print("Out: ",0); print(rtostr(F));
1039: }
1040: [220] set_print_function("my_output");
1041: Out: 0
1042: [221] 1+2;
1043: Out: 3
1044: @end example
1045:
1046: @table @t
1047: @item $B;2>H(B
1048: @ref{rtostr}
1049: @end table
1050:
1051: @noindent
1052: ChangeLog
1053: @itemize @bullet
1054: @item $B$3$N4X?t$O(B 2001-9-4 $B$K(B asir-contrib $B$N$?$a$KF3F~$5$l$?(B.
1055: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/print.c 1.11 $B$G$"$k(B.
1056: @end itemize
1.8 takayama 1057:
1058:
1.12 takayama 1059: @node small_jacobi,,, $B<B83E*;EMM$N4X?t(B
1060: @subsection @code{small_jacobi}
1061: @findex small_jacobi
1062:
1063: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1064: @table @t
1065: @item small_jacobi(@var{a},@var{m})
1066: :: Jacobi $B5-9f$N7W;;(B
1067: @end table
1068:
1069: @table @var
1070: @item return
1071: $B@0?t(B
1072: @item arg1, arg2
1073: $B@0?t(B
1074: @end table
1075:
1076: @itemize @bullet
1077: @item
1078: @var{m} $B$,AG?t$N$H$-$O(B Legendre $B5-9f$H$h$P$l(B,
1079: x^2 = @var{a} mod @var{m} $B$K2r$,$"$k$H$-(B 1, $B2r$,$J$$$H$-(B -1 $B$r$b$I$9(B.
1080: @item
1081: Jacobi $B5-9f$O(B Legendre $B5-9f$N@Q$GDj5A$5$l$k(B ($B=iEy@0?tO@$NK\;2>H(B).
1082: @item
1083: $B$3$N4X?t$O(B machine int $B$NHO0O$G(B jacobi $B5-9f$r7W;;$9$k(B.
1084: @end itemize
1085:
1086: @example
1087: [1286] small_jacobi(2,3);
1088: -1
1089: [1287] small_jacobi(2,7);
1090: 1
1091: @end example
1092:
1093: @table @t
1094: @item $B;2>H(B
1095: http://members.jcom.home.ne.jp/yokolabo/asirlib/
1096: $B$b8+$F$M(B.
1097: @end table
1098:
1099: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1100: @noindent
1101: ChangeLog
1102: @itemize @bullet
1.13 takayama 1103: @item $B$3$N4X?t$NM3Mh$OITL@(B.
1104: @end itemize
1105:
1106:
1.20 takayama 1107: @node flatten_quote,,, $B<B83E*;EMM$N4X?t(B
1108: @subsection @code{flatten_quote}
1109: @findex flatten_quote
1.13 takayama 1110:
1111: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1112: @table @t
1.20 takayama 1113: @item flatten_quote(@var{q},@var{op})
1.13 takayama 1114: :: quote $B$N3g8L$r$H$j$5$k(B.
1115: @end table
1116:
1117: @table @var
1118: @item return
1119: Quote
1120: @item q
1121: Quote
1122: @item op
1123: $B1i;;;R$rI=$9J8;zNs(B.
1124: @end table
1125:
1126: @itemize @bullet
1127: @item
1128: Quote $B7?$N%G!<%?$OLZ9=B$$r$7$F$$$k(B
1129: ( quotetolist $B;2>H(B ).
1130: @code{quote_flatten()} $B$O(B, @var{q} $B$NCf$K$"$i$l$k1i;;;R(B @var{op}
1131: $B$N;R6!%N!<%I$rJ?Ey$K$9$k(B.
1132: $B$D$^$j1i;;;R(B @var{op} $B$K4X$9$k3g8L$E$1$,$"$C$?>l9g$=$l$r$9$Y$F$H$j$5$k(B.
1133: $B$?$H$($P(B (1+2)+(3+4) $B$H$$$&I=8=$r(B 1+2+3+4 $B$KJQ49$9$k(B.
1134: @item
1135: $B8=:_$N<BAu$G$O(B n-ary $B$N1i;;;R$ODj5A$5$l$F$$$J$$$N$G(B,
1.20 takayama 1136: 1+2+3 $B$O<B$O(B 1+(2+3) $B$HI=8=$5$l$F$$$k(B.
1137: $B$D$^$j(B + $B1i;;;R$O1&7k9gE*$G$"$k(B.
1138: @item R=0; for (I=0; I<N; I++) R = R+ P[I]; $B$J$kB-$7;;$r7+$jJV$9$H(B,
1139: + $B$O:87k9gE*$K$J$k(B. $B1&7k9gE*$KJQ49$9$k$K$O(B flatten_quote $B$r8F$V(B.
1140: @item $BL>A0$O(B quote_flatten $B$G$J$/(B flatten_quote $B$G$"$k(B.
1.13 takayama 1141: @end itemize
1142:
1143: @example
1144: [1288] flatten_quote(quote((1+2)+(3+4*(x+3))),"+");
1145: quote(1+2+3+4*(x+3))
1146: [1289] flatten_quote(quote( (x*y)*(p*3)-(x*y)*z),"*");
1147: quote(x*y*p*3-x*y*z)
1148: [1290] quotetolist(quote(1+2+3));
1149: [b_op,+,[b_op,+,[internal,1],[internal,2]],[internal,3]]
1150: @end example
1151:
1152: @table @t
1153: @item $B;2>H(B
1154: @ref{quotetolist}, @ref{print_tex_form}(contrib)
1155: @end table
1156:
1157: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1158: @noindent
1159: ChangeLog
1160: @itemize @bullet
1161: @item
1162: $B$3$N4X?t$O(B 2004-7-7 $B$+$i(B 2004-7-8 $B$K$+$1$F(B
1163: quote $B$K4X$9$kA`:n$r8&5f$9$k$?$a$K<B83E*$K=q$+$l$?(B.
1164: OpenXM/fb $B$GC_@Q$5$l$?8x<0$NITMW$J3g8L$r$H$j$O$:$7(B, tex $B7A<0$KJQ49$9$k$N$K(B
1165: $B1~MQ(B.
1166: @item
1167: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B
1168: builtin/strobj.c 1.47,
1.14 takayama 1169: parse/eval.c 1.35,
1170: parse/parse.h 1.31,
1171: parse/quote.c 1.14--1.16.
1172: @end itemize
1173:
1174: @node assoc,,, $B<B83E*;EMM$N4X?t(B
1175: @subsection @code{assoc}
1176: @findex assoc
1177:
1178: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1179: @table @t
1180: @item assoc(@var{a},@var{b})
1181: :: $BO"A[%j%9%H$r$D$/$k(B
1182: @end table
1183:
1184: @table @var
1185: @item return
1186: List
1187: @item a
1188: List
1189: @item b
1190: List
1191: @end table
1192:
1193: @itemize @bullet
1194: @item $B%j%9%H(B @var{a}, @var{b} $B$h$j(B
1195: [[@var{a}[0],@var{b}[0]], [@var{a}[1],@var{b}[1]], ...]
1196: $B$J$k?7$7$$%j%9%H$r@8@.$9$k(B.
1197: @end itemize
1198:
1199: $B2<$NNc$G$O(B @code{A} $B$KF0J*$NL>A0$,(B,
1200: @code{B} $B$KB-$NK\?t$,F~$C$F$$$k(B.
1201: @code{assoc(A,B)} $B$GF0J*$HB-$NK\?t$r%Z%"$K$7$?%j%9%H$r@8@.$9$k(B.
1202:
1203: @example
1204: [1192] A=["dog","cat","snake"];
1205: [dog,cat,snake]
1206: [1193] B=[4,4,0];
1207: [4,4,0]
1208: [1194] assoc(A,B);
1209: [[dog,4],[cat,4],[snake,0]]
1210: @end example
1211:
1212: @table @t
1213: @item $B;2>H(B
1214: @ref{cons}, @ref{append}
1215: @end table
1216:
1217: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1218: @noindent
1219: ChangeLog
1220: @itemize @bullet
1221: @item
1222: $B$3$N4X?t$O(B 2004-6-28 $B$K=q$+$l$?(B.
1223: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B
1224: builtin/list.c 1.9
1.13 takayama 1225: parse/eval.c 1.35,
1226: parse/parse.h 1.31,
1227: parse/quote.c 1.14--1.16.
1.12 takayama 1228: @end itemize
1.13 takayama 1229:
1.15 takayama 1230:
1231: @node sprintf,,, $B<B83E*;EMM$N4X?t(B
1.28 ohara 1232: @subsection @code{printf}, @code{fprintf}, @code{sprintf}
1.15 takayama 1233: @findex sprintf
1234:
1235: @table @t
1.27 ohara 1236: @item printf(@var{format}[,@var{args}])
1.28 ohara 1237: @item fprintf(@var{fd},@var{format}[,@var{args}])
1.15 takayama 1238: @item sprintf(@var{format}[,@var{args}])
1239: :: C $B$K;w$?%W%j%s%H4X?t(B
1240: @end table
1241:
1242: @table @var
1243: @item return
1.28 ohara 1244: $B@0?t(B(printf,fprintf), $BJ8;zNs(B(sprintf)
1.15 takayama 1245: @item format
1246: $BJ8;zNs(B
1.28 ohara 1247: @item fd
1248: $BHsIi@0?t(B($B%U%!%$%k5-=R;R(B)
1.15 takayama 1249: @item args
1250: $B%*%V%8%'%/%H(B
1251: @end table
1252:
1253: @itemize @bullet
1254: @item
1.27 ohara 1255: @code{printf} $B$O=q<0J8;zNs(B @var{format } $B$K$7$?$,$$(B, $B%*%V%8%'%/%H(B @var{args} $B$rI8=`=PNO$K=q$-=P$9(B.
1.15 takayama 1256: @item
1.28 ohara 1257: @code{fprintf} $B$O7k2L$r(B, $B%U%!%$%k5-=R;R(B @var{fd} $B$N;X$9%U%!%$%k$K=q$-=P$9(B.
1258: @item
1.27 ohara 1259: @code{sprintf} $B$O7k2L$rJ8;zNs$GJV$7(B, $BI8=`=PNO$K$O=q$-=P$5$J$$(B.
1260: @item
1261: $B=q<0J8;zNs$NCf$G(B @code{%a} (any) $B$,MxMQ2DG=(B.
1262: @var{args} $B$N8D?t$O=q<0J8;zNs$NCf$N(B @code{%a} $B$N8D?t$KEy$7$/$9$k$3$H(B.
1.28 ohara 1263: @item
1264: $B%U%!%$%k5-=R;R$O(B, @code{open_file} $B4X?t$rMQ$$$FF@$k$3$H(B.
1.15 takayama 1265: @end itemize
1266:
1267: @example
1.27 ohara 1268: [0] printf("%a: rat = %a\n",10,x^2-1)$
1269: 10: rat = x^2-1
1270: [1] S=sprintf("%a: rat = %a",20,x^2-1)$
1271: [2] S;
1272: 20: rat = x^2-1
1.28 ohara 1273: [3] Fd=open_file("hoge.txt","w");
1274: 0
1275: [4] fprintf(Fd,"Poly=%a\n",(x-1)^3)$
1276: [5] close_file(Fd)$
1277: [6] quit;
1278:
1279: $ cat hoge.txt
1280: Poly=x^3-3*x^2+3*x-1
1.15 takayama 1281: @end example
1282:
1283: @table @t
1284: @item $B;2>H(B
1.28 ohara 1285: @ref{rtostr},@ref{open_file},@ref{close_file}
1.15 takayama 1286: @end table
1287:
1288: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1289: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1290: @noindent
1291: ChangeLog
1292: @itemize @bullet
1293: @item
1.27 ohara 1294: $B4X?t(B sprintf$B$O(B 2004-7-13 $B$K%3%_%C%H$5$l$?(B.
1.15 takayama 1295: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/strobj (1.50) $B$G$"$k(B.
1296: @item
1.27 ohara 1297: $B4X?t(B printf$B$O(B 2007-11-8 $B$K%3%_%C%H$5$l$?(B.
1298: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/print.c (1.23) $B$G$"$k(B.
1299: @item
1.28 ohara 1300: $B4X?t(B fprintf$B$O(B 2008-11-18 $B$K%3%_%C%H$5$l$?(B.
1301: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/file.c (1.25) $B$G$"$k(B.
1302: @item
1.15 takayama 1303: @code{%a} $B$O(B Maple $B$N(B sprintf $B$N??;w$+(B.
1304: @end itemize
1305:
1306:
1307: @node quote_to_funargs,,, $B<B83E*;EMM$N4X?t(B
1308: @subsection @code{quote_to_funargs}, @code{funargs_to_quote}, @code{remove_paren}
1309: @findex quote_to_funargs
1310: @findex funargs_to_quote
1311: @findex remove_paren
1312:
1313: @table @t
1314: @item quote_to_funargs(@var{q})
1315: :: quote $B$r(B funarg $B7A<0(B($B%j%9%H(B) $B$X(B.
1316: @item funargs_to_quote(@var{f})
1317: :: funarg $B7A<0$r(B quote $B$X(B.
1.19 takayama 1318: @item get_function_name(@var{f})
1319: :: funarg $B7A<0$N(B op $B$rJ8;zNs$X(B.
1.15 takayama 1320: @item remove_paren(@var{q})
1321: :: $B>e$N4X?t$rMQ$$$F=q$+$l$?M>J,$J3g8L$r<h$j5n$k(B simplifier (asir-contrib $B%^%K%e%"%k$X(B: todo)
1322: @end table
1323:
1324: @table @var
1325: @item return
1326: quote(funargs_to_quote, remove_paren) $B$+(B $B%j%9%H(B(quote_to_funargs)
1327: @item q
1328: quote
1329: @item f
1330: $B%j%9%H(B
1331: @end table
1332:
1333: @itemize @bullet
1334: @item
1335: @code{quote_to_funargs} $B$O(B quote $B7?$N%G!<%?(B ($BFbItE*$K$O(B FNODE) $B$r(B
1336: quote $B$X$NI|852DG=$J7A$G%j%9%H$XJQ49$9$k(B.
1337: @code{quotetolist} $B$O(B quote $B$r%j%9%H$XJQ49$9$k$,(B, $B0lIt$N>pJs$r<N$F$k$?$a(B
1338: $B$b$H$N(B quote $B$NI|85$O$G$-$J$$(B.
1339: @item
1.19 takayama 1340: @code{quote_to_funargs} $B$NLa$jCM$O(B [fid, op, arg1, arg2, ...]
1341: $B$J$k7A<0$r$7$F$$$k(B.
1342: $B$3$3$G(B op $B$O(B node $B$NL>A0$G$"$j(B,
1343: $B4X?t(B @code{get_function_name} $B$rMQ$$$F?M4V$,FI$a$k7A<0(B
1344: $B$G<h$j$@$;$k(B.
1345: $B$?$H$($P(B @code{get_function_name(quote_to_funargs(quote(1+2))[1])}
1346: $B$O(B "+" $B$rLa$9(B.
1347: @item
1348: $BL>A0(B@code{get_function_name} $B$O$=$N$&$AJQ99$5$l$k$@$m$&(B.
1.15 takayama 1349: @item
1350: $B2<$NNc$G(B
1351: quote_to_funargs(FA[2]);
1352: [34,[b_op,+,[internal,x],[internal,1]]]
1.19 takayama 1353: $B$H$J$k(B.
1354: 34 $B$O(B @code{I_PAREN} $B$r0UL#$9$k(B.
1355: $B?t$H0UL#$NBP1~I=$O(B @code{OpenXM/src/asir-contrib/packages/src/noro_simplify.rr}
1356: $B$^$?$O(B @code{OpenXM_contrib2/asir2000/parse/parse.h} $B$r8+$h(B.
1357: $B0J2<$N(B fid $B$,(B 0, 1, 2, ... $B$KBP1~$E$1$i$l$F$$$k(B.
1358: I_BOP, I_COP, I_AND, I_OR, I_NOT, I_CE,
1359: I_PRESELF, I_POSTSELF,
1360: I_FUNC, I_FUNC_OPT, I_IFUNC, I_MAP, I_RECMAP, I_PFDERIV,
1361: I_ANS, I_PVAR, I_ASSPVAR,
1362: I_FORMULA, I_LIST, I_STR, I_NEWCOMP, I_CAR, I_CDR, I_CAST,
1363: I_INDEX, I_EV, I_TIMER, I_GF2NGEN, I_GFPNGEN, I_GFSNGEN,
1364: I_LOP, I_OPT, I_GETOPT, I_POINT, I_PAREN, I_MINUS,
1365: I_NARYOP
1.15 takayama 1366: @end itemize
1367:
1368: $B<!$NNc$G$O(B (x+1)+(x+2) $B$N3g8L$r$O$:$7$F(B x+1+x+2 $B$KJQ49$7$F$$$k(B.
1369: @example
1370: [0] ctrl("print_quote",1) $
1371:
1372: [1] Q=quote((x+1)+(x+2));
1373: [b_op,+,[u_op,(),[b_op,+,[internal,x],[internal,1]]],
1374: [u_op,(),[b_op,+,[internal,x],[internal,2]]]]
1375:
1376: [2] FA=quote_to_funargs(Q);
1377: [0,<...quoted...>,
1378: [u_op,(),[b_op,+,[internal,x],[internal,1]]],
1379: [u_op,(),[b_op,+,[internal,x],[internal,2]]]]
1380:
1381: [3] FA2=quote_to_funargs(FA[2])[1];
1382: [b_op,+,[internal,x],[internal,1]]
1383:
1384: [4] FA3=quote_to_funargs(FA[3])[1];
1385: [b_op,+,[internal,x],[internal,2]]
1386:
1387: [5] funargs_to_quote([FA[0],FA[1],FA2,FA3]);
1388: [b_op,+,[b_op,+,[internal,x],[internal,1]],
1389: [b_op,+,[internal,x],[internal,2]]]
1390: @end example
1391:
1392: $B<!$NNc$O(B OpenXM/asir-contrib $BHG$N(B asir $B$G<B9T(B.
1393: @example
1394: [1287] load("noro_simplify.rr");
1395: 1
1396: [1293] noro_simplify.remove_paren(quote( f(1-(x))));
1397: quote(f(1-x))
1398: @end example
1399:
1.19 takayama 1400: funargs_to_quote $B$rMQ$$$F4{B8$N(B quote $B$N;R6!$rCV$-49$($F(B
1401: $B?7$7$$(B quote $B$r$D$/$j=P$;$k(B.
1402: @example
1403: [1184] R=quote_to_funargs(quote(a+(b+c)));
1404: [0,<...quoted...>,<...quoted...>,<...quoted...>]
1405: [1185] T=quote_to_funargs(quote(1+2));
1406: [0,<...quoted...>,<...quoted...>,<...quoted...>]
1407: [1186] funargs_to_quote([0,R[1],R[2],T[2]]);
1408: quote(a+1)
1409: @end example
1410:
1.15 takayama 1411: @table @t
1412: @item $B;2>H(B
1413: @ref{quotetolist}
1414: @end table
1415:
1.17 takayama 1416:
1.15 takayama 1417: @noindent
1418: ChangeLog
1419: @itemize @bullet
1420: @item
1421: $B$3$l$i$N4X?t$O(B 2004-7-8 $B$+$i3+H/$N$O$8$^$C$F$$$k(B quote $B$N(B simplification $B4XO"(B
1422: $B$N<B83E*4X?t$G$"$k(B.
1423: $BJQ99$r$&$1$?%=!<%9%3!<%I$OB?4t$K$o$?$k$N$G$^$@=q$+$J$$(B.
1424: @item
1425: $B3g8L$r<h$j5n$kLdBj$O(B OpenXM/fb $B$,C_$($F$$$k8x<0$r(B tex $B$Ge:No$KI=<($9$k$N$,F05!$N0l$D(B.
1426: @item
1427: 2004-6-26 $B$N7W;;Be?t%;%_%J!<$K$*$$$F(B, $BCf@n$5$s$,(B simplifier $B$K$D$$$F$$$m$$$mLdBjDs5/(B
1428: $B$r$7$?(B ($B7W;;Be?t%;%_%J!<%S%G%*;2>H(B).
1.19 takayama 1429: @item parse/quote.c $B$N(B {\tt strcut fid_spec fid_spec_tab[] }
1430: $B$NItJ,$K=q$$$F$"$k7A<0$K(B @code{funargs_to_quote} $B$OJQ49$9$k(B.
1.17 takayama 1431: @end itemize
1432:
1433: @node set_secure_flag,,, $B<B83E*;EMM$N4X?t(B
1434: @subsection @code{set_secure_flag}, @code{set_secure_mode}
1435: @findex set_secure_flag
1436: @findex set_secure_mode
1437:
1438: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1439: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1440: @table @t
1441: @item set_secure_flag(@var{fname},@var{m})
1442: @itemx set_secure_mode(@var{m})
1443: :: $B4X?t$N<B9T8"8B$r@_Dj$9$k(B. (web $B%5!<%S%9MQ(B)
1444: @end table
1445:
1446: @table @var
1447: @item return
1448: $B@0?t(B
1449: @item fname
1450: $BJ8;zNs(B
1451: @item m
1452: $B@0?t(B
1453: @end table
1454:
1455: @itemize @bullet
1.18 takayama 1456: @item @code{set_secure_flag}, @code{set_secure_mode} $B$O(B
1457: asir $B$r(B web $B%5!<%PEy$G8x3+$9$k$?$a$K2C$($i$l$?4X?t(B.
1458: @code{set_secure_flag} $B$G8x3+$9$k4X?t$r;XDj$9$k(B.
1.17 takayama 1459: @code{secure_mode} $B$,(B 1 $B$N>l9g$O(B @code{set_secure_flag} $B$G;XDj$5$l$?(B
1460: $B4X?t$7$+<B9T$G$-$J$$(B.
1.18 takayama 1461: $B4X?t$N<B9TESCf$G$O(B @code{secure_mode} $B$,(B 0 $B$H$J$C$F$$$k$N$G(B,
1.17 takayama 1462: $BG$0U$N4X?t$r<B9T$G$-$k(B.
1463: $B$^$?%(%i!<$N;~Ey$O(B, @code{secure_mode} $B$O(B 1 $B$K<+F0E*$KI|5"$9$k(B.
1464: $B$?$@$7(B @code{def} $B$O<B9T$G$-$J$$(B.
1465: $B8x3+$9$k4X?t$G$O(B, $B$=$N=hM}Cf$OG$0U$N4X?t$,<B9T$G$-$k$N$G(B,
1466: security $B$K==J,Cm0U$7$?<BAu$r$9$kI,MW$,$"$k(B.
1467: @item
1468: @code{set_secure_flag} $B$O(B, @var{fname} $B$N(B secure flag $B$r(B @var{m}
1469: $B$K$9$k(B.
1.18 takayama 1470: $B8x3+$9$kL?Na$O(B 1 $B$K@_Dj$9$k(B.
1.17 takayama 1471: @item
1472: @var{set_secure_mode(1)} $B$G(B @code{secure_mode} $B$,(B 1 $B$H$J$j(B,
1473: $B8x3+$5$l$?4X?t$7$+<B9T$G$-$J$/$J$k(B.
1474: quit $BEy$b<B9T$G$-$J$$$N$GCm0U(B.
1.18 takayama 1475: @item @code{ timer } $B$N0z?t$H$7$F(B secure_flag $B$r@_Dj$7$F$$$J$$4X?t$r(B
1476: $B;XDj$7$F<B9T$7$F$b%(%i!<$,I=<($5$l$J$$(B.
1477: $B$3$N$H$-$O(B, @code{ ctrl("error_in_timer",1) } $B$r<B9T$7$F$*$/(B.
1.17 takayama 1478: @end itemize
1479:
1480: @example
1481: [1194] set_secure_flag("print_input_form_",1);
1482: 1
1483: [1195] set_secure_flag("fctr",1);
1484: 1
1485: [220] set_secure_mode(1);
1486: 1
1487: [1197] fctr((x-1)^3);
1488: [[1,1],[x-1,3]]
1489: [1198] fctr(shell("ls"));
1490: evalf : shell not permitted
1491: return to toplevel
1492: @end example
1493:
1494: @table @t
1495: @item $B;2>H(B
1496: @ref{timer}
1497: @end table
1498:
1499: @noindent
1500: ChangeLog
1501: @itemize @bullet
1.18 takayama 1502: @item @code{set_secure_flag}, @code{set_secure_mode} $B$O(B asir $B$r(B
1503: web $B%5!<%PEy$G8x3+$9$k$?$a$K2C$($i$l$?4X?t(B.
1504: sm1 $B$NF1MM$J4X?t(B RestrictedMode $B$G:NMQ$5$l$?J}K!$rMQ$$$F$$$k(B.
1505: $B$D$^$j(B, @code{set_secure_flag} $B$G8x3+$9$k4X?t$r;XDj$9$k(B.
1506: @code{secure_mode} $B$,(B 1 $B$N>l9g$O(B @code{set_secure_flag} $B$G;XDj$5$l$?(B
1507: $B4X?t$7$+<B9T$G$-$J$$(B.
1508: v$B4X?t$N<B9TESCf$G$O(B @code{secure_mode} $B$,(B 0 $B$H$J$C$F$$$k$N$G(B,
1509: $BG$0U$N4X?t$r<B9T$G$-$k(B.
1.17 takayama 1510: @item $B$3$N4X?t$O(B 2004-10-27 $B$+$i(B 2004-11-22 $B$K$+$1$F3+H/$5$l$?(B.
1511: @item cgiasir.sm1, cgi-asir.sh $B$HAH$_9g$o$;$F(B cgi $B%5!<%S%9$rDs6!$9$k$?$a$K(B
1512: $BMxMQ$9$k(B.
1513: cgi-asir.sh $B$G$O(B
1514: @code{CGI_ASIR_ALLOW} $B4D6-JQ?t$G8x3+$9$k%3%^%s%I$r;XDj$9$k(B.
1515: @item
1516: 1.24--1.25 OpenXM_contrib2/asir2000/builtin/miscf.c
1517: @item
1518: 1.36--1.38 OpenXM_contrib2/asir2000/parse/eval.c
1519: @item
1520: 1.6--1.7 OpenXM_contrib2/asir2000/parse/function.c
1521: @item
1522: 1.33 OpenXM_contrib2/asir2000/parse/parse.h
1.15 takayama 1523: @end itemize
1.21 takayama 1524:
1.22 takayama 1525: @node initialize_static_variable,,, $B<B83E*;EMM$N4X?t(B
1526: @subsection @code{initialize_static_variable}
1527: @findex initialize_static_variable
1.21 takayama 1528:
1529:
1530: @comment --- $B@bL@(B ---
1531: @table @t
1.22 takayama 1532: @item static $BJQ?t$N=i4|2=$NLdBjE@(B. $B=i4|2=$N;~$K(B segmentation fault $B$,$*$-$k(B.
1.21 takayama 1533: @end table
1534:
1535:
1536: @itemize @bullet
1537: @item static $BJQ?t$N<h07(B.
1538: $B2<$NNc$r;2>H$N$3$H(B.
1539: @end itemize
1540:
1541:
1542: @example
1543: if (1) @{
1544: module abc;
1545: static A;
1546: A=1;
1547: endmodule;
1548: @} else @{ @};
1549:
1550: end$
1551: $B$r(B t.rr $B$H$9$k$H$-(B,
1552:
1553: [6] load("./t.rr");
1554: 1
1555: internal error (SEGV)
1556: $B$H$J$k(B.
1557:
1558: t.rr $B$r(B
1559: if (1) @{
1560: module abc;
1561: static A;
1562: localf initA;
1563: localf foo;
1564: def initA() @{
1565: A=1;
1566: @}
1567: initA();
1568: def foo() @{
1569: return A;
1570: @}
1571: endmodule;
1572: @} else @{ @};
1573:
1574: end$
1575: $B$H$9$k$H@5$7$/=i4|2=$5$l$k(B.
1576: @end example
1577:
1578: @comment --- ChangeLog
1579: @noindent
1580: ChangeLog
1581: @itemize @bullet
1582: @item oxasir-win.rr $B$N<h07$GLdBjE@$H$7$FIb>e(B. 2005.07.25.
1.22 takayama 1583: @item oxasir-win.rr $B$N<h07$G(B double quote $B$N<h$j07$$$KLdBj$,$"$C$?$,(B, $B$3$l$O(B asir2000/io/ox_asir.c, 1.58, $B$GLdBjE@2r7h(B.
1.21 takayama 1584: @item ox_asir $B$K7W;;$r0MMj$9$k;~$O(B if (1) @{ ... @}$B$G0O$`(B.
1585: @end itemize
1586:
1.23 takayama 1587: @node eval_quote,,, $B<B83E*;EMM$N4X?t(B
1588: @subsection @code{eval_quote}
1589: @findex eval_quote
1590:
1591: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1592: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1593: @table @t
1594: @item eval_quote(@var{Q});
1595: :: quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B.
1596: @end table
1597:
1598: @table @var
1599: @item return
1600: $B%*%V%8%'%/%H(B
1601: @item Q
1602: quote$B7?(B
1603: @end table
1604:
1605: @itemize @bullet
1606: @item quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B.
1607: @item $B5U4X?t$O(B @code{objtoquote}
1608: @end itemize
1609:
1610: @example
1611: ctrl("print_quote",2);
1612: A=quote((x-1)^2+(x-1)+3);
1613: $B=PNO(B: ((((x)-(1))^(2))+((x)-(1)))+(3)
1614: eval_quote(A);
1615: $B=PNO(B: x^2-x+3
1616: print_input_form(A); /* asir-contrib */
1617: $B=PNO(B: quote((x-1)^2+(x-1)+3)
1618: @end example
1619:
1620: @table @t
1621: @item $B;2>H(B
1622: @ref{objtoquote}, @ref{quotetolist}, @ref{eval_string},
1623: @ref{quote_to_funargs}, @ref{funargs_to_quote}
1624: @end table
1625:
1626: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1627: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1628: @noindent
1629: ChangeLog
1630: @itemize @bullet
1631: @item -----$B$^$@=q$$$F$J$$(B.
1632: @end itemize
1633:
1634:
1635: @node nqt_match,,, $B<B83E*;EMM$N4X?t(B
1636: @subsection @code{nqt_match}
1637: @findex nqt_match
1638:
1639: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1640: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1641: @table @t
1642: @item nqt_match(@var{Expr},@var{Pattern}[,@var{Mode}])
1643: :: @var{Expr} $B$,(B @var{Pattern} $B$K%^%C%A(B($BE,9g(B)$B$9$k$H(B 1 $B$rLa$9(B. $B$7$J$$$H(B 0 $B$rLa$9(B.
1644: @end table
1645:
1646: @table @var
1647: @item return
1648: $B@0?t(B
1649: @item Expr
1650: quote$B7?(B
1651: @item Pattern
1652: quote$B7?(B
1653: @item Mode
1654: $B@0?t(B
1655: @end table
1656:
1657: @itemize @bullet
1658: @item @var{Expr} $B$,(B @var{Pattern} $B$K%^%C%A(B($BE,9g(B)$B$9$k$H(B 1 $B$rLa$9(B. $B$7$J$$$H(B 0 $B$rLa$9(B.
1659: @item $BE,9g$7$?>l9g(B, $BI{:nMQ$H$7$F(B, @var{Pattern} $B$K4^$^$l$k%W%m%0%i%`JQ?t(B($BBgJ8;z$G$O$8$^$kJQ?t(B)$B$KE,9g$7$?CM$,BeF~$5$l$k(B.
1660: @item nqt $B$O(B normalized quote $B$NN,$G$"$j(B fnode$BI8=`7A$KJQ49$7$F$+$iE,9g8!::$r$9$k(B. fnode$BI8=`7A$K$D$$$F$O(B @ref{qt_normalize} $B$r8+$h(B.
1661: @item @var{Mode} $B$K$h$jE83+J}K!$r;XDj$7(B, $B$=$NE83+J}K!$K$h$jF@$i$l$?(B @var{Expr} $B$N(B
1662: fnode$BI8=`7A$H(B @var{Pattern} $B$rHf3S$9$k(B.
1663: @end itemize
1664:
1665: @example
1666: ctrl("print_quote",2);
1667: A=quote((x-y)*(x+y));
1668: nqt_match(A,quote(P*Q));
1669: [P,Q]
1670: $B=PNO(B: [x-y, x+y]
1671: nqt_match(A,quote(P*Q),1);
1672: $B%^%C%A$7$J$$(B.
1673: nqt_match(A,quote(P*Q),2);
1674: $B%^%C%A$7$J$$(B.
1675: qt_normalize(A,1);
1676: $B=PNO(B: ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x))
1677: qt_normalize(A,2);
1678: $B=PNO(B: ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y))
1679: @end example
1680:
1681: @table @t
1682: @item $B;2>H(B
1683: @ref{nqt_match_rewrite},
1684: @ref{qt_rewrite}
1685: @end table
1686:
1687: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1688: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1689: @noindent
1690: ChangeLog
1691: @itemize @bullet
1692: @item ----- $B$^$@=q$$$F$J$$(B.
1693: @end itemize
1694:
1695:
1696: @node nqt_match_rewrite,,, $B<B83E*;EMM$N4X?t(B
1697: @subsection @code{nqt_match_rewrite}
1698: @findex nqt_match_rewrite
1699:
1700: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1701: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1702: @table @t
1703: @item nqt_match_rewrite(@var{Expr},@var{Rule},@var{Mode})
1704: :: @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B.
1705: @end table
1706:
1707: @table @var
1708: @item return
1709: quote$B7?(B
1710: @item Expr
1711: quote$B7?(B
1712: @item Rule
1713: [@var{Pattern},@var{Action}] $B$+$^$?$O(B
1714: [@var{Pattern},@var{Condition},@var{Action}].
1715: $B$3$l$i$NMWAG$O$9$Y$F(B quote$B7?(B.
1716: @item Mode
1717: $B@0?t(B
1718: @end table
1719:
1720: @itemize @bullet
1721: @item @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B. @var{Pattern} $B$KE,9g$7$J$$>l9g$O(B
1722: @var{Exprt} $B<+BN$rLa$9(B.
1723: @item nqt $B$O(B normalized quote $B$NN,$G$"$j(B fnode$BI8=`7A$KJQ49$7$F$+$iE,9g8!::$r$9$k(B. fnode$BI8=`7A$K$D$$$F$O(B @ref{qt_normalize} $B$r8+$h(B.
1724: @end itemize
1725:
1726: @comment %%Doc: cfep/tests/2006-03-12-qt.rr
1727: @example
1728: ctrl("print_quote",2);
1729: nqt_match_rewrite(`x*y*z,[`X*Y,`X+Y],1);
1730: $B=PNO(B: (x)+((y)*(z))
1731: A=`x*x;
1732: nqt_match_rewrite(A,[`X*Y,`X+Y],1);
1733: $B=PNO(B: x^2 ($B%^%C%A$7$F$$$J$$(B)
1734: nqt_match_rewrite(A,[`X*Y,`X+Y],2);
1735: $B=PNO(B: 2*x
1736:
1737: $BE,9g$K$D$$$F$N%b!<%I$N0c$$$rM}2r$9$k$?$a$K<!$NNc$*$h$S(B fnode$BI8=`7A(B(qt_normalize) $B$r;2>H(B.
1738: quotetolist(qt_normalize(`x*x,0));
1739: $B=PNO(B: [b_op,^,[internal,x],[internal,2]]
1740: quotetolist(qt_normalize(`x*x,1));
1741: $B=PNO(B: [b_op,^,[internal,x],[internal,2]]
1742: quotetolist(qt_normalize(`x*x,2));
1743: $B=PNO(B: [n_op,*,[internal,x],[internal,x]]
1744: @end example
1745:
1746: @table @t
1747: @item $B;2>H(B
1748: @ref{nqt_match},
1749: @ref{qt_rewrite},
1750: @ref{qt_normalize}
1751: @end table
1752:
1753: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1754: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1755: @noindent
1756: ChangeLog
1757: @itemize @bullet
1758: @item -----$B$^$@=q$$$F$J$$(B.
1759: @end itemize
1760:
1761:
1762:
1763: @node qt_normalize,,, $B<B83E*;EMM$N4X?t(B
1764: @subsection @code{qt_normalize}
1765: @findex qt_normalize
1766:
1767: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1768: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1769: @table @t
1770: @item qt_normalize(@var{Expr}[,@var{Mode}])
1771: :: @var{Expr} $B$r(B fnode$BI8=`7A$KJQ49$9$k(B. @var{Mode}$B$K$h$jI8=`7A$X$NE83+%"%k%4%j%:%`$r;XDj$G$-$k(B.
1772: @end table
1773:
1774: @table @var
1775: @item return
1776: quote$B7?(B
1777: @item Expr
1778: quote$B7?(B
1779: @item Mode
1780: $B@0?t(B
1781: @end table
1782:
1783: fnode$B$O(B quote$B7?$N<BBN$G$"$k(B.
1784: fnode $B$OLZ$G$"$j(B, $B7?(B id $B$*$h$S;R6!$+$i$J$k(B.
1785: $B7?$*$h$S;R6!$r<h$j=P$94X?t$,(B funargs_to_quote $B$G$"$k(B.
1786: $B$^$?(B fnode $B$r%j%9%H$KJQ49$9$k4X?t$,(B quotetolist $B$G$"$k(B.
1787:
1788: fnode $B$NI8=`7A$O%Q%?!<%s%^%C%A%s%0(B, $B=q$-49$($rMF0W$K$*$3$J$&$?$a$KF3F~$5$l$?(B.
1789: fnode $B$NI8=`7A$r(B fn $B$H=q$/$H$-(B, $BI8=`7A$N(B BNF$BIwI=8=$G$NDj5A$O0J2<$N$H$*$j(B.
1790: @example
1791: fn = formula | functor(nf [,...]) | sum_of_monom
1792: fnode $B$NI8=`7A(B. functor $B$O4X?t$h$S$@$7$_$?$$$J$b$N(B.
1793: sum_of_monom = monom [+ ...]
1794: $B%b%N%_%"%k$NOB(B
1795: monom = [formula *] nfpow [* ...]
1796: $B%b%N%_%"%k(B
1797: nfpow = nf | nf^(nf)
1798: $BQQ>hItJ,$NI8=`7A(B
1799: formula = Risa object
1800: @end example
1801:
1802:
1803: @itemize @bullet
1804: @item @var{Expr} $B$r(B fnode$BI8=`7A$KJQ49$9$k(B. @var{Mode}$B$K$h$jI8=`7A$X$NE83+%"%k%4%j%:%`$r;XDj$G$-$k(B.
1805: @item $BE83+$O:F5"E*$G$"$k(B.
1806: @item $BF~NO$,(B fnode $B$KJQ49$5$l$?=i4|>uBV$G$O(B + $B$d(B * $B$O;R6!$,(B2$B?M$N(B binary operator
1807: (b_op) $B$G$"$k$,(B, qt_normalize $B$r:nMQ$5$;$k$3$H$K$h$j(B, + $B$d(B * $B$OG$0U?M?t$N(B
1808: $B;R6!$r;}$F$k(B n-ary operator $B$KJQ49$5$l$k(B.
1809: @item n-ary operator $B$r4pAC$H$7$?(B fnode$BI8=`7A$rMQ$$$k$3$H$K$h$j(B, $B%Q%?!<%s%^%C%AMQ$N%Q%?!<%s$N?t$r8:$i$;$k$3$H$,7P83E*$K$o$+$C$F$$$k(B.
1810: @item @var{Mode}=0. $BE83+$7$J$$(B. $B$3$l$,4{Dj$NF0:n(B.
1811: @item @var{Mode}=1. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49(B
1812: @item @var{Mode}=2. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49$7$J$$(B.
1813: @end itemize
1814:
1815: @var{Mode} $B$N0c$$$K$D$$$F$O0J2<$NNc$b;29M$K(B.
1816: @comment %%cfep/tests/2006-03-12-qt.rr
1817: @example
1818: ctrl("print_quote",2);
1819: A=quote((x-y)*(x+y));
1820: $B=PNO(B: ((x)-(y))*((x)+(y))
1821: B=qt_normalize(A,0);
1822: $B=PNO(B: ((x)+((-1)*(y)))*((x)+(y)) Mode=0. $BE83+$O$5$l$J$$(B. +, * $B$O(B n_op (nary-op) $B$X(B.
1823: quotetolist(B);
1824: $B=PNO(B: [n_op,*,[n_op,+,[internal,x],[n_op,*,[internal,-1],[internal,y]]],[n_op,+,[internal,x],[internal,y]]]
1825:
1826: B=qt_normalize(A,1);
1827: $B=PNO(B: ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x))
1828: Mode=1. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$r$^$H$a$k(B.
1829: quotetolist(B);
1830: $B=PNO(B: [n_op,+,[b_op,^,[internal,x],[internal,2]],[n_op,*,[internal,x],[internal,y]],[n_op,*,[internal,-1],[b_op,^,[internal,y],[internal,2]]],[n_op,*,[internal,-1],[internal,y],[internal,x]]]
1831:
1832: qt_normalize(A,2);
1833: $B=PNO(B: ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y))
1834: Mode=2. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$O;H$o$J$$(B.
1835: quotetolist(B);
1836: $B=PNO(B: [n_op,+,[b_op,^,[internal,x],[internal,2]],[n_op,*,[internal,x],[internal,y]],[n_op,*,[internal,-1],[b_op,^,[internal,y],[internal,2]]],[n_op,*,[internal,-1],[internal,y],[internal,x]]]
1837:
1838: qt_normalize(`x^2,2);
1839: $B=PNO(B: (x)*(x)
1840: Mode=2. $B6R$O;H$o$J$$(B. n-ary $B$N(B * $B$X(B.
1841: @end example
1842:
1843: @table @t
1844: @item $B;2>H(B
1845: @ref{nqt_match},
1846: @ref{nqt_match_rewrite},
1847: @ref{quotetolist},
1848: @ref{quote_to_funargs}
1849: @end table
1850:
1851: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1852: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1853: @noindent
1854: ChangeLog
1855: @itemize @bullet
1856: @item
1857: @end itemize
1858:
1859:
1860: @node qt_set_coef,,, $B<B83E*;EMM$N4X?t(B
1861: @subsection @code{qt_set_coef}
1862: @findex qt_set_coef
1863:
1864: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1865: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1866: @table @t
1867: @item qt_set_coef(@var{ParamList})
1868: :: $B0J2<(B @var{ParamList} $B$K8=$l$kB?9`<0JQ?t$rJQ?t$H$9$kM-M}4X?tBN$r78?t$H$9$k(B
1869: $BHs2D49B?9`<0$r07$&(B.
1870: @end table
1871:
1872: @table @var
1873: @item return
1874: $B%j%9%H(B
1875: @item ParamList
1876: $B%j%9%H(B
1877: @end table
1878:
1879: @itemize @bullet
1880: @item $B0J2<(B @var{ParamList} $B$K8=$l$kB?9`<0JQ?t$rJQ?t$H$9$kM-M}4X?tBN$r78?t$H$9$k(B
1881: $BHs2D49B?9`<0$r07$&(B.
1882: @item $B$3$N@k8@$r$7$J$$$H78?tBN$r?t$H$9$kHs2D49B?9`<0$H$7$F7W;;$9$k(B.
1883: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1884: @item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1885: @end itemize
1886:
1887: @example
1888: ctrl("print_quote",2);
1889: qt_set_coef([a]);
1890: B=qt_normalize(quote((a*x+a)^2),2);
1891: $B=PNO(B: ((a^2)*(x)*(x))+((2*a^2)*(x))+(a^2)
1892: qt_normalize(B+B,2);
1893: $B=PNO(B: ((2*a^2)*(x)*(x))+((4*a^2)*(x))+(2*a^2)
1894: @end example
1895:
1896: @table @t
1897: @item $B;2>H(B
1898: @ref{qt_normalize}
1899: @end table
1900:
1901: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1902: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1903: @noindent
1904: ChangeLog
1905: @itemize @bullet
1906: @item -----$B$^$@=q$$$F$J$$(B.
1907: @end itemize
1908:
1909:
1910: @node qt_set_ord,,, $B<B83E*;EMM$N4X?t(B
1911: @subsection @code{qt_set_ord}
1912: @findex qt_set_ord
1913:
1914: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1915: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1916: @table @t
1917: @item qt_set_ord(@var{VarList})
1918: :: @var{VarList} $B$rJQ?t=g=x$H$9$k(B.
1919: @end table
1920:
1921: @table @var
1922: @item return
1923: $B%j%9%H(B
1924: @item VarList
1925: $B%j%9%H(B
1926: @end table
1927:
1928: @itemize @bullet
1929: @item @var{VarList} $B$r<-=q<0$KMQ$$$?JQ?t=g=x$r0J2<;HMQ$9$k(B.
1930: @item $B$3$N@k8@$r$7$J$$$H$"$kITDj85$K$D$$$F$N4{Dj$N<-=q<0=g=x(B-----$B$^$@=q$$$F$J$$(B---$B$rMQ$$$F9`$rHf3S$9$k(B.
1931: @var{VarList} $B$K8=$l$J$$JQ?t$K$D$$$F$O$3$N=g=x$,E,MQ$5$l$k(B.
1932: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1933: @item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1934: @end itemize
1935:
1936: @example
1937: ctrl("print_quote",2);
1938: qt_normalize(quote(x+y),2);
1939: $B=PNO(B: (x)+(y)
1940: qt_set_ord([y,x]);
1941: $B=PNO(B: [y,x,z,u,v,w,p,q,r,s,t,a,b,c,d,e,f,g, $B0J2<>JN,(B ]
1942: qt_normalize(quote(x+y),2);
1943: $B=PNO(B: (y)+(x)
1944: @end example
1945:
1946: @table @t
1947: @item $B;2>H(B
1948: @ref{qt_normalize},
1949: @ref{nqt_comp}
1950: @end table
1951:
1952: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1953: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1954: @noindent
1955: ChangeLog
1956: @itemize @bullet
1957: @item -----$B$^$@=q$$$F$J$$(B.
1958: @end itemize
1959:
1960:
1961: @node qt_set_weight,,, $B<B83E*;EMM$N4X?t(B
1962: @subsection @code{qt_set_weight}
1963: @findex qt_set_weight
1964:
1965: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1966: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1967: @table @t
1968: @item qt_set_weight(@var{WeightVector})
1969: :: $BJQ?t$K$D$$$F(B weight $B%Y%/%H%k$r@_Dj$9$k(B.
1970: @end table
1971:
1972: @table @var
1973: @item return
1974: $B%j%9%H(B
1975: @item WeightVector
1976: $B%j%9%H(B
1977: @end table
1978:
1979: fnode f $B$N(B weight w(f) $B$O<!$N<0$G7W;;$9$k(B.
1980: @example
1981: f $B$,MU$N>l9g$O86B'(B 0. qt_weight_vector $B$G(B weight $B$,M?$($i$l$F$$$kITDj85$K(B
1982: $B$D$$$F$O$=$NCM(B.
1983:
1984: f $B$,(Bnode$B$N>l9g$O<!$N5,B'$G:F5"E*$K$-$a$k(B.
1985: w(f+g) = max(w(f),w(g))
1986: w(f g) = w(f) + w(g)
1987: w(f^n) = n w(f)
1988: $B4X?t$K$D$$$F$O(B? -----$B$^$@=q$$$F$J$$(B.
1989: @end example
1990:
1991: @itemize @bullet
1992: @item @var{WeightVector} $B$G$^$:=g=x$NHf3S$r$7$F(B, $B$=$l$+$i(B qt_set_order $B$K$h$k=g=x(B, $B:G8e$K4{Dj$N=g=x$GHf3S$9$k(B.
1993: @var{WeightVector} $B$K8=$l$J$$JQ?t$K$D$$$F$N(B weight $B$O(B 0 $B$H$J$k(B.
1994: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1995: qt_normalize $B$G$NE83+$G$O(B, $B$3$N=g=x$rMQ$$$F9`$,%=!<%H$5$l$k(B.
1996: @item qt_comp $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1997: @item weight $B%Y%/%H%k$K$h$k=g=xHf3S$K$D$$$F$O%0%l%V%J4pDl$N@a(B@ref{dp_gr_main}$B$b;2>H(B.
1998: @end itemize
1999:
2000: @example
2001: ctrl("print_quote",2);
2002: qt_set_weight([[x,-1],[y,-1]]);
2003: $B7k2L(B: [[x,-1],[y,-1]]
2004: qt_normalize(quote( 1+(x+y)+(x+y)^2),1);
2005: $B7k2L(B: (1)+(y)+(x)+((y)^(2))+((y)*(x))+((x)^(2))+((x)*(y))
2006: @end example
2007:
2008: @table @t
2009: @item $B;2>H(B
2010: @ref{qt_normalize},
2011: @ref{qt_set_ord},
2012: @ref{qt_set_weight},
2013: @ref{dp_gr_main}
2014: @end table
2015:
2016: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2017: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2018: @noindent
2019: ChangeLog
2020: @itemize @bullet
2021: @item
2022: @end itemize
2023:
2024:
2025: @node nqt_comp,,, $B<B83E*;EMM$N4X?t(B
2026: @subsection @code{nqt_comp}
2027: @findex nqt_comp
2028:
2029: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2030: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2031: @table @t
2032: @item nqt_cmp(@var{Expr1},@var{Exprt2})
2033: :: @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B.
2034: @end table
2035:
2036: @table @var
2037: @item return
2038: $B@0?t(B
2039: @item Expr1, Expr2
2040: quote$B7?(B
2041: @end table
2042:
2043: @itemize @bullet
2044: @item @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B.
2045: @item @var{Expr1} > @var{Exprt2} $B$J$i(B 1.
2046: @item @var{Expr1} < @var{Exprt2} $B$J$i(B -1.
2047: @item @var{Expr1} = @var{Exprt2} ($B$*$J$8=g=x(B) $B$J$i(B 0.
2048: @end itemize
2049:
2050: @example
2051: ctrl("print_quote",2);
2052: qt_set_ord([y,x]); qt_set_weight([[x,-1],[y,-1]]);
2053: [nqt_comp(`x,`y), nqt_comp(`y,`x), nqt_comp(`x,`x)];
2054: $B=PNO(B: [-1,1,0]
2055: @end example
2056:
2057: @table @t
2058: @item $B;2>H(B
2059: @ref{qt_normalize},
2060: @ref{qt_set_ord},
2061: @ref{qt_set_weight}
2062: @end table
2063:
2064: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2065: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2066: @noindent
2067: ChangeLog
2068: @itemize @bullet
2069: @item $B$^$@=q$$$F$J$$(B.
2070: @end itemize
2071: @comment ****************************************************************
2072:
2073: @node qt_is_var,,, $B<B83E*;EMM$N4X?t(B
2074: @subsection @code{qt_is_var}, @code{qt_is_coef}
2075: @findex qt_is_var
2076: @findex qt_is_coef
2077:
2078: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2079: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2080: @table @t
2081: @item qt_is_var(@var{Expr})
2082: :: @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B.
2083: @item qt_is_coef(@var{Expr})
2084: :: @var{Expr} $B$,78?t$NM-M}4X?tBN$KB0$9$k$H$-(B 1 $B$rLa$9(B.
2085: @end table
2086:
2087: @table @var
2088: @item return
2089: $B@0?t(B
2090: @item Expr
2091: quote$B7?(B
2092: @end table
2093:
2094: @itemize @bullet
2095: @item @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B.
2096: $B$=$&$G$J$$$H$-(B 0 $B$rLa$9(B.
2097: @end itemize
2098:
2099: @example
2100: [qt_is_var(quote(x)), qt_is_var(quote(3/2))];
2101: $B=PNO(B: [1,0]
2102: @end example
2103:
2104: @table @t
2105: @item $B;2>H(B
2106: @ref{qt_rewrite},
2107: @ref{nqt_match_rewrite}
2108: @end table
2109:
2110: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2111: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2112: @noindent
2113: ChangeLog
2114: @itemize @bullet
2115: @item -----$B$^$@=q$$$F$J$$(B.
2116: @end itemize
2117: @comment ****************************************************************
2118:
2119: @node qt_rewrite,,, $B<B83E*;EMM$N4X?t(B
2120: @subsection @code{qt_rewrite}
2121: @findex qt_rewrite
2122:
2123: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2124: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2125: @table @t
2126: @item qt_rewrite(@var{Expr},@var{Rules},@var{Mode})
2127: :: @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B.
2128: @end table
2129:
2130: @table @var
2131: @item return
2132: quote$B7?(B
2133: @item Expr
2134: quote$B7?(B
2135: @item Rules
2136: $B%j%9%H(B
2137: @item Mode
2138: $B@0?t(B
2139: @end table
2140:
2141: @itemize @bullet
2142: @item $B%f!<%68@8l$rMQ$$$FDj5A$5$l$?4X?t(B.
2143: @code{import("noro_rewrite.rr")} $B$7$F$*$/$3$H(B.
2144: (noro_rewrite.rr $B$,(B OpenXM/lib/asir-contrib $B$KB8:_$7$J$$>l9g(B
2145: $B%=!<%9$N(B OpenXM/src/asir-contrib/testing/noro/new_rewrite.rr $B$r%3%T!<(B)
2146: @item @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B.
2147: @item $B5,B'$NE,MQ$O(B fnode$BLZ$KBP$7$F:F5"E*$G$"$k(B.
2148: $B0lJ}(B @code{nqt_match_rewrite} $B$G$O%H%C%W%l%Y%k$N$_$K5,B'$,E,MQ$5$l$k(B.
2149: @item $B5,B'=89g(B @var{Rules} $B$N3FMWAG$N=q$-J}$O(B @code{nqt_match()} $B$N(B
2150: @var{Pattern} $B$HF1$8=q$-J}(B.
2151: $B$D$^$j(B [$B%Q%?!<%s(B, $B=q$-49$(7k2L(B] $B$^$?$O(B
2152: [$B%Q%?!<%s(B, $B>r7o(B, $B=q$-49$(7k2L(B].
2153: @item @var{Mode} $B$N0UL#$O(B @ref{qt_normalize} $B$N(B @var{Mode} $B$HF1MM(B.
2154: $B%Q%?!<%s%^%C%A(B, $B=q$-49$($O(B @var{Mode} $B$G(B @code{qt_normalize()}
2155: $B$5$l$F$+$i?k9T$5$l$k(B.
2156: @end itemize
2157:
2158: $BCm0U(B: $B?t3XE*$K$O(B X*Y=Y*X $B$,2D49@-$rM?$($k5,B'$@$,(B, $B$3$l$r$=$N$^$^5,B'$H$7$F(B
2159: $BM?$($k$H=q$-49$($,Dd;_$7$J$$(B. $B<!$NNc$G$O(B, $B>e$NNc$N$h$&$K=g=xHf3S$7(B, $B$?$H$($P(B,
2160: $B=g=x$,Bg$-$/$J$k>l9g$N$_$K=q$-49$($k$Y$-$G$"$k(B.
2161: @example
2162: import("noro_rewrite.rr");
2163: R=[[`X*Y,`nqt_comp(Y*X,X*Y)>0, `Y*X]];
2164: qt_rewrite(`(x-y)^2,R,2);
2165: $B=PNO(B: quote(x*x+-2*x*y+y*y)
2166: @end example
2167:
2168: $B30@QBe?t$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B).
2169: @example
2170: import("noro_rewrite.rr");
2171: Rext0=[quote(X*Y),quote(qt_is_var(X) && qt_is_var(Y) && nqt_comp(Y,X)>0),
2172: quote(-Y*X)];
2173: Rext1=[quote(X^N),quote(eval_quote(N)>=2),quote(0)];
2174: Rext2=[quote(X*X),quote(0)];
2175: Rext=[Rext0,Rext1,Rext2];
2176: qt_rewrite(quote( (x+2*y)*(x+4*y) ), Rext,1);
2177: $B=PNO(B: 2*x*y
2178:
2179: qt_set_coef([a,b,c,d]);
2180: qt_rewrite(quote((a*x+b*y)*(c*x+d*y)), Rext,1);
2181: $B=PNO(B: (d*a-c*b)*x*y
2182:
2183: @end example
2184:
2185: $BHyJ,$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B).
2186: @example
2187: import("noro_rewrite.rr");
2188: qt_set_coef([a,b]);
2189: Rd1=[`d(X+Y), `d(X)+d(Y)];
2190: Rd2=[`d(X*Y),`d(X)*Y+X*d(Y)];
2191: Rd3=[`d(N), `qt_is_coef(N), `0];
2192: Rd4=[`d(x),`1];
2193: Rd=[Rd1,Rd2,Rd3,Rd4];
2194: B=qt_rewrite( `d( (a*x+b)^3),Rd,2);
2195: $B=PNO(B: quote(3*a^3*x*x+6*b*a^2*x+3*b^2*a)
2196: fctr(eval_quote(B));
2197: $B=PNO(B: [[3,1],[a,1],[a*x+b,2]]
2198: @end example
2199:
2200: @table @t
2201: @item $B;2>H(B
2202: @ref{nqt_match},
2203: @ref{nqt_match_rewrite},
2204: @ref{qt_normalize}
2205: @end table
2206:
2207: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2208: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2209: @noindent
2210: ChangeLog
2211: @itemize @bullet
2212: @item qt $B7O$N4X?t$N867?$O(B OpenXM/src/asir-contrib/testing/tr.rr $B$G$"$k(B.
2213: $B$3$N%f!<%68@8l$K$h$k3+H/$,(B 2005$BG/$N=U$^$G9T$o$l(B, $B$=$N$"$HAH$_9~$_4X?t<gBN$N(B
2214: qt $B7O$N4X?t$,3+H/$5$l$?(B.
2215: @item qt $B7O$N4X?t$K$D$$$F$N$=$NB>$N;29MJ88%(B:
2216: OpenXM/doc/Papers/2005-rims-noro.tex $B$*$h$S(B
2217: OpenXM/doc/Papers/2005-rims-noro.tm (TeXmacs$B$N5-;v(B).
2218: @item Todo: qt $B7O$N4X?t$rMQ$$$?$*$b$7$m$$7W;;$r(B Risa/Asir $B%8%c!<%J%k$N5-;v$H$7$F=q$/(B.
2219: @end itemize
2220: @comment ****************************************************************
1.13 takayama 2221:
1.24 takayama 2222:
2223: @comment ****************************************************************
2224: @node asirgui.hnd,,, $B<B83E*;EMM$N4X?t(B
2225: @subsection @code{asirgui.hnd}
2226: @findex asirgui.hnd
2227:
2228: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2229: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2230: @table @t
2231: @item asirguid.hnd
2232: :: asirgui $B$N(B main window $B$N%O%s%I%kHV9f$rJ];}$9$k%U%!%$%k(B
2233: @end table
2234:
2235:
2236: @itemize @bullet
2237: @item asirgui (Windows $BHG(B) $B$r5/F0$9$k$H(B asirgui.exe $B$N$"$k%U%)%k%@$*$h$S(B $B4D6-JQ?t(B TEMP $B$,Dj5A$5$l$F$$$l$P$3$N%U%!%$%k$,:n@.$5$l$k(B.
2238: @item $BCf?H$O#1#0?J@0?t$G(B, asirgui $B$N(B main winodw $B$N%O%s%I%k$G$"$k(B. $B$3$N%O%s%I%k$"$F$K(B PostMessage $B$r$9$l$P(B, asuirgui $B$K%-!<%\!<%I$+$iF~NO$7$?$N$HF1MM$J8z2L$,F@$i$l$k(B.
2239: @item text editor $B$G:n@.(B, $BJ]B8$7$?%U%!%$%k$r(B text editor $BB&$+$i(B asirgui $B$KFI$_9~$^$;$?$j$9$k$?$a$KMxMQ2DG=(B.
2240: @end itemize
2241:
2242: @example
2243: // Visual C++ $BMQ$N%F%9%H%W%m%0%i%`(B. $BI8=`F~NO$r(B asirgui $B$XAw$j9~$`(B.
2244: // test.cpp : $B%3%s%=!<%k(B $B%"%W%j%1!<%7%g%sMQ$N%(%s%H%j(B $B%]%$%s%H$NDj5A(B
2245: //
2246:
2247: #include "stdafx.h"
2248: #include "test.h"
2249: #include <windows.h>
2250: #include <stdlib.h>
2251: #include <stdio.h>
2252: #include <fcntl.h>
2253: #include <process.h>
2254:
2255: #ifdef _DEBUG
2256: #define new DEBUG_NEW
2257: #undef THIS_FILE
2258: static char THIS_FILE[] = __FILE__;
2259: #endif
2260:
2261: /////////////////////////////////////////////////////////////////////////////
2262: // $BM#0l$N%"%W%j%1!<%7%g%s(B $B%*%V%8%'%/%H(B
2263:
2264: CWinApp theApp;
2265:
2266: using namespace std;
2267:
2268: int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
2269: {
2270: int nRetCode = 0;
2271:
2272: // MFC $B$N=i4|2=$*$h$S=i4|2=<:GT;~$N%(%i!<$N=PNO(B
2273: if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
2274: {
2275: // TODO: $BI,MW$K1~$8$F%(%i!<(B $B%3!<%I$rJQ99$7$F$/$@$5$$!#(B
2276: cerr << _T("Fatal Error: MFC initialization failed") << endl;
2277: nRetCode = 1;
2278: }
2279: else
2280: {
2281: // TODO: $B$3$N0LCV$K%"%W%j%1!<%7%g%s$NF0:n$r5-=R$7$F$/$@$5$$!#(B
2282: CString strHello;
2283: strHello.LoadString(IDS_HELLO);
2284: cout << (LPCTSTR)strHello << endl;
2285: }
2286: HWND hnd;
2287: FILE *fp = fopen("c:/Program Files/asir/bin/asirgui.hnd","r");
2288: fscanf(fp,"%d",&hnd);
2289: fclose(fp);
2290: while (1) {
2291: int c;
2292: c = getchar();
2293: if ( c == '#' ) break;
2294: PostMessage(hnd,WM_CHAR,c,1);
2295: }
2296: return nRetCode;
2297: }
2298: @end example
2299:
2300: @table @t
2301: @item $B;2>H(B
2302: @ref{xyz_abc}
2303: @end table
2304:
2305: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2306: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2307: @noindent
2308: ChangeLog
2309: @itemize @bullet
2310: @item $B$3$N5!G=$O(B 2006-12-5, 2007-02-13 $B$K2C$($i$l$?(B.
2311: @item @code{OpenXM_contrib2/windows/asir32gui/asir32gui.clw} 1.11
2312: @item @code{OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp} 1.15, 1.1.6
2313: @end itemize
2314: @comment ****************************************************************
2315:
1.25 takayama 2316: @node noro_matrix.rr,,, $B<B83E*;EMM$N4X?t(B
2317: @subsection @code{noro_matrix.rr}
2318: @findex noro_matrix.rr
2319:
2320: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2321: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2322: @table @t
2323: @item linalg.unit_mat(@var{arg1})
2324: @item linalg.random_rmat(@var{arg1}, @var{arg2}, @var{arg3})
2325: @item linalg.minipoly_mat(@var{arg1})
2326: @item linalg.compute_kernel(@var{arg1})
2327: @item linalg.compute_image(@var{arg1})
2328: @item linalg.jordan_canonical_form(@var{arg1})
2329: @end table
2330:
2331:
2332: @itemize @bullet
2333: @item $B4JC1$J2r@b$*$h$S<BNc$O(B http://www.math.kobe-u.ac.jp/HOME/taka/2007/knx/noro_matrix-ja.txt $B$r;2>H(B.
2334: @end itemize
2335:
2336: @example
2337: load("noro_matrix.rr");
2338: A=newmat(4,4,[[2,0,0,0],[3,5,1,0],[-9,-9,-1,0],[-5,0,0,1]]);
2339: B=linalg.jordan_canonical_form(A);
2340: @end example
2341:
2342: @table @t
2343: @item $B;2>H(B
2344: @ref{invmat}
2345: @end table
2346:
2347: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2348: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2349: @noindent
2350: ChangeLog
2351: @itemize @bullet
2352: @item $B$3$N4X?t$O(B 2004-04 $B:"$+$i@~7ABe?t(BIII $B$N9V5A$r$7$J$,$i=q$+$l$?(B.
2353: @item $B%=!<%9(B: OpenXM/src/asir-contrib/packages/src/noro_matrix.rr
2354: @end itemize
2355:
2356:
1.26 takayama 2357: @node f_res,,, $B<B83E*;EMM$N4X?t(B
2358: @subsection @code{f_res}
2359: @findex f_res
1.25 takayama 2360:
2361: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2362: @table @t
1.26 takayama 2363: @item f_res
1.25 takayama 2364: @end table
2365:
2366:
2367: @itemize @bullet
1.26 takayama 2368: @item f_res $B$O3F<o$N=*7k<0$r7W;;$9$k%b%8%e!<%k$G$"$k(B. ox_grep("f_res"); $B$G(B online manual $B$r1\Mw2DG=$G$"$k(B.
1.25 takayama 2369: @end itemize
2370:
2371: @table @t
2372: @item $B;2>H(B
2373: @ref{}
2374: @end table
2375:
2376: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2377: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2378: @noindent
2379: ChangeLog
2380: @itemize @bullet
2381: @item $B$3$N%b%8%e!<%k$O(B Fujiwara $B7/$N=$;NO@J8$,85$K$J$j(B, $B$=$l$r2~B$$7$?$b$N$G$"$k(B.
1.26 takayama 2382: @item OpenXM/src/ox_cdd, OpenXM/src/asir-contrib/packages/src/f_res.rr
1.25 takayama 2383: @end itemize
2384:
2385:
1.27 ohara 2386: @node chdir,,, $B<B83E*;EMM$N4X?t(B
2387: @subsection @code{chdir}, @code{pwd}
2388: @findex chdir
2389: @findex pwd
2390:
2391: @comment --- $B%G%#%l%/%H%jA`:n(B ---
2392: @table @t
2393: @item chdir(@var{directory})
2394: @item pwd()
2395: :: $B%7%'%k%3%^%s%I(B cd $B$H(B pwd $B$KBP1~$9$kA`:n(B.
2396: @end table
2397:
2398: @table @var
2399: @item return
2400: $BJ8;zNs(B(@code{pwd}), $B@0?t(B(@code{chdir})
2401: @item dirctory
2402: $BJ8;zNs(B
2403: @end table
2404:
2405: @itemize @bullet
2406: @item
2407: @code{pwd} $B$O%+%l%s%H%G%#%l%/%H%j$rJ8;zNs$GJV$9(B.
2408: @item
2409: @code{chdir} $B$O%+%l%s%H%G%#%l%/%H%j$r(B @var{directory} $B$KJQ99$9$k(B. $B@.8y$9$l$P(B 0 $B$r<:GT$9$l$P(B -1 $B$rJV$9(B.
2410: @item
2411: $B$3$l$i$N4X?t$O(B UNIX $BHG$K$N$_<BAu$5$l$F$$$k(B.
2412: @end itemize
2413:
2414: @example
2415: [0] S=pwd();
2416: /home/ohara
2417: [1] chdir(".../taka");
2418: -1
2419: [2] chdir("/usr/bin");
2420: 0
2421: @end example
2422:
2423: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2424: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2425: @noindent
2426: ChangeLog
2427: @itemize @bullet
2428: @item
2429: $B$3$l$i$N4X?t$O(B 2008-8-27 $B$K%3%_%C%H$5$l$?(B.
2430: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/miscf.c (1.27) $B$G$"$k(B.
2431: @end itemize
2432:
2433:
2434: @node dcurrenttime,,, $B<B83E*;EMM$N4X?t(B
2435: @subsection @code{dcurrenttime}
2436: @findex dcurrenttime
2437:
2438: @comment --- $B8=:_;~9o$r<hF@(B ---
2439: @table @t
2440: @item dcurrenttime()
2441: :: $B8=:_;~9o$r<hF@(B.
2442: @end table
2443:
2444: @table @var
2445: @item return
2446: $BIbF0>.?tE@?t(B
2447: @end table
2448:
2449: @itemize @bullet
2450: @item
2451: $BJV$jCM$O(B1970$BG/(B1$B7n(B1$BF|(B0$B;~(B0$BJ,(B0$BIC$+$i$N7P2aIC?t$G$"$k(B.
2452: @end itemize
2453:
2454: @example
2455: [0] ctrl("real_digit", 16);
2456: 16
2457: [1] dcurrenttime();
2458: 1226390851.34476
2459: [2] currenttime();
2460: 1226390854
2461: @end example
2462:
2463: @table @t
2464: @item $B;2>H(B
2465: @ref{currenttime}
2466: @end table
2467:
2468: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2469: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2470: @noindent
2471: ChangeLog
2472: @itemize @bullet
2473: @item
2474: $B$3$N4X?t$O(B 2008-9-12 $B$K%3%_%C%H$5$l$?(B.
2475: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/time.c (1.6) $B$G$"$k(B.
2476: @end itemize
2477:
1.29 ! nakayama 2478: @node nk_restriction.restriction,,, $B<B83E*;EMM$N4X?t(B
! 2479: @subsection @code{nk_restriction.restriction}
! 2480: @comment --- $B:w0zMQ%-!<%o!<%I(B
! 2481: @findex nk_restriction.restriction
! 2482:
! 2483: @comment --- $B4X?t$N4JC1$J@bL@(B ---
! 2484: @table @t
! 2485: @item nk_restriction.restriction(@var{Id}, @var{VL}, @var{DVL}, @var{W})
! 2486: :: $B%[%m%N%_%C%/(B D $B%$%G%"%k(B @var{Id} $B$r=E$_%Y%/%H%k(B @var{W} $B$K$D$$$F$N@)8B2C72$rJV$9!#(B
! 2487: @end table
! 2488:
! 2489: @comment --- $B0z?t$N4JC1$J@bL@(B ---
! 2490: @table @var
! 2491: @item Id
! 2492: $B%$%G%"%k$N@8@.85$N%j%9%H(B
! 2493: @item VL
! 2494: $BJQ?t$N%j%9%H(B
! 2495: @item DVL
! 2496: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
! 2497: @item W
! 2498: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
! 2499: @end table
! 2500:
! 2501: @itemize @bullet
! 2502: @item
! 2503: @var{W} $B$NMWAG$OHsIi@0?t$G!"(B0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$!#(B
! 2504: ($B$9$J$o$A!"(B@code{[1,1,0,0,0]} $B$O(B OK $B$@$,!"(B @code{[1,0,1,0,0]} $B$O%@%a(B)
! 2505: @item
! 2506: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@)8B$r9T$&!#(B
! 2507: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
! 2508: x,y $B$K$D$$$F@)8B$r9T$&!#(B
! 2509: @end itemize
! 2510:
! 2511: $B0J2<$O!"%$%G%"%k(B
! 2512: @tex
! 2513: $I = D \cdot \{x \partial_x -1, y \partial_y - 1\} $
! 2514: @end tex
! 2515: $B$N(B
! 2516: @tex $x$ @end tex
! 2517: $B$K$D$$$F$N@)8B2C72$r7W;;$7$?Nc$G$"$k!#(B
! 2518: @example
! 2519: [1432] nk_restriction.restriction([x*dx-1,y*dy-1],[x,y],[dx,dy],[1,0]);
! 2520: -- generic_bfct_and_gr :0.001sec(0.001629sec)
! 2521: generic bfct : [[1,1],[s-1,1]]
! 2522: S0 : 1
! 2523: B_{S0} length : 2
! 2524: -- fctr(BF) + base :0.000999sec(0.0005109sec)
! 2525: [[y*dy-1,(y*dy-1)*dx,-1],[[1],[0]]]
! 2526: [1433]
! 2527: @end example
! 2528:
! 2529: @node nk_restriction.restriction_ideal,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
! 2530: @subsection @code{nk_restriction.restriction_ideal}
! 2531: @comment --- $B:w0zMQ%-!<%o!<%I(B
! 2532: @findex nk_restriction.restriction_ideal
! 2533:
! 2534: @comment --- $B4X?t$N4JC1$J@bL@(B ---
! 2535: @table @t
! 2536: @item nk_restriction.restriction_ideal(@var{Id}, @var{VL}, @var{DVL}, @var{W})
! 2537: :: $B%[%m%N%_%C%/(B D $B%$%G%"%k(B @var{Id} $B$r=E$_%Y%/%H%k(B @var{W} $B$K$D$$$F$N@)8B%$%G%"%k$rJV$9!#(B
! 2538: @end table
! 2539:
! 2540: @comment --- $B0z?t$N4JC1$J@bL@(B ---
! 2541: @table @var
! 2542: @item Id
! 2543: $B%$%G%"%k$N@8@.85$N%j%9%H(B
! 2544: @item VL
! 2545: $BJQ?t$N%j%9%H(B
! 2546: @item DVL
! 2547: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
! 2548: @item W
! 2549: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
! 2550: @end table
! 2551:
! 2552: @itemize @bullet
! 2553: @item
! 2554: @var{W} $B$NMWAG$OHsIi@0?t$G!"(B0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$!#(B
! 2555: ($B$9$J$o$A!"(B@code{[1,1,0,0,0]} $B$O(B OK $B$@$,!"(B @code{[1,0,1,0,0]} $B$O%@%a(B)
! 2556: @item
! 2557: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@)8B$r9T$&!#(B
! 2558: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
! 2559: x,y $B$K$D$$$F@)8B$r9T$&!#(B
! 2560: @end itemize
! 2561:
! 2562: $B0J2<$O!"%$%G%"%k(B
! 2563: @tex
! 2564: $I = D \cdot \{x \partial_x -1, y \partial_y - 1\} $
! 2565: @end tex
! 2566: $B$N(B
! 2567: @tex $x$ @end tex
! 2568: $B$K$D$$$F$N@)8B%$%G%"%k$r7W;;$7$?Nc$G$"$k!#(B
! 2569: @example
! 2570: [1346] nk_restriction.restriction_ideal([x*dx-1,y*dy-1],[x,y],[dx,dy],[1,0]);
! 2571: -- generic_bfct_and_gr :0.002sec(0.001652sec)
! 2572: generic bfct : [[1,1],[s-1,1]]
! 2573: S0 : 1
! 2574: B_{S0} length : 2
! 2575: -- fctr(BF) + base :0sec(0.000566sec)
! 2576: -- restriction_ideal_internal :0.001sec(0.0007441sec)
! 2577: [-1]
! 2578: [1347]
! 2579: @end example
! 2580:
! 2581: @node nk_restriction.integration,,, $B<B83E*;EMM$N4X?t(B
! 2582: @subsection @code{nk_restriction.integration}
! 2583: @comment --- $B:w0zMQ%-!<%o!<%I(B
! 2584: @findex nk_restriction.integration
! 2585:
! 2586: @comment --- $B4X?t$N4JC1$J@bL@(B ---
! 2587: @table @t
! 2588: @item nk_restriction.integration(@var{Id}, @var{VL}, @var{DVL}, @var{W})
! 2589: :: $B%[%m%N%_%C%/(B D $B%$%G%"%k(B @var{Id} $B$r=E$_%Y%/%H%k(B @var{W} $B$K$D$$$F$N@QJ,2C72$rJV$9!#(B
! 2590: @end table
! 2591:
! 2592: @comment --- $B0z?t$N4JC1$J@bL@(B ---
! 2593: @table @var
! 2594: @item Id
! 2595: $B%$%G%"%k$N@8@.85$N%j%9%H(B
! 2596: @item VL
! 2597: $BJQ?t$N%j%9%H(B
! 2598: @item DVL
! 2599: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
! 2600: @item W
! 2601: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
! 2602: @end table
! 2603:
! 2604: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
! 2605: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
! 2606: @comment --- @bullet $B$O9uE@IU$-(B ---
! 2607: @itemize @bullet
! 2608: @item
! 2609: @var{W} $B$NMWAG$OHsIi@0?t$G!"(B0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$!#(B
! 2610: ($B$9$J$o$A!"(B@code{[1,1,0,0,0]} $B$O(B OK $B$@$,!"(B @code{[1,0,1,0,0]} $B$O%@%a(B)
! 2611: @item
! 2612: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@QJ,$r9T$&!#(B
! 2613: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
! 2614: x,y $B$K$D$$$F@QJ,$r9T$&!#(B
! 2615: @end itemize
! 2616:
! 2617: $B0J2<$O!"%$%G%"%k(B
! 2618: @tex
! 2619: $I = D \cdot \{2 t \partial_x + \partial_t, t \partial_t + 2 x \partial_x + 2\} $
! 2620: @end tex
! 2621: $B$N(B
! 2622: @tex $t$ @end tex
! 2623: $B$K$D$$$F$N@QJ,%$%G%"%k$r7W;;$7$?Nc$G$"$k!#(B([SST, Ex5.5.2, Ex5.5.6])
! 2624: @example
! 2625: [1351] nk_restriction.integration([2*t*dx+dt,2*x*dx+t*dt+2],[t,x],
! 2626: [dt,dx],[1,0]);
! 2627: -- generic_bfct_and_gr :0.001sec(0.001796sec)
! 2628: generic bfct : [[1,1],[s,1],[s-1,1]]
! 2629: S0 : 1
! 2630: B_{S0} length : 2
! 2631: -- fctr(BF) + base :0.001sec(0.0006731sec)
! 2632: [[4*x*dx^2+6*dx,-4*t*x*dx^2-6*t*dx,2*x*dx+1,-2*t*x*dx,2*t*dx],[[1],[0]]]
! 2633: @end example
! 2634:
! 2635: @node nk_restriction.integration_ideal,,, $B<B83E*;EMM$N4X?t(B
! 2636: @subsection @code{nk_restriction.integration_ideal}
! 2637: @comment --- $B:w0zMQ%-!<%o!<%I(B
! 2638: @findex nk_restriction.integration_ideal
! 2639:
! 2640: @comment --- $B4X?t$N4JC1$J@bL@(B ---
! 2641: @table @t
! 2642: @item nk_restriction.integration_ideal(@var{Id}, @var{VL}, @var{DVL}, @var{W})
! 2643: :: $B%[%m%N%_%C%/(B D $B%$%G%"%k(B @var{Id} $B$r=E$_%Y%/%H%k(B @var{W} $B$K$D$$$F$N@QJ,%$%G%"%k$rJV$9!#(B
! 2644: @end table
! 2645:
! 2646: @comment --- $B0z?t$N4JC1$J@bL@(B ---
! 2647: @table @var
! 2648: @item Id
! 2649: $B%$%G%"%k$N@8@.85$N%j%9%H(B
! 2650: @item VL
! 2651: $BJQ?t$N%j%9%H(B
! 2652: @item DVL
! 2653: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
! 2654: @item W
! 2655: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
! 2656: @end table
! 2657:
! 2658: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
! 2659: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
! 2660: @comment --- @bullet $B$O9uE@IU$-(B ---
! 2661: @itemize @bullet
! 2662: @item
! 2663: @var{W} $B$NMWAG$OHsIi@0?t$G!"(B0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$!#(B
! 2664: ($B$9$J$o$A!"(B@code{[1,1,0,0,0]} $B$O(B OK $B$@$,!"(B @code{[1,0,1,0,0]} $B$O%@%a(B)
! 2665: @item
! 2666: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@QJ,$r9T$&!#(B
! 2667: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
! 2668: x,y $B$K$D$$$F@QJ,$r9T$&!#(B
! 2669: @end itemize
! 2670:
! 2671: $B0J2<$O!"%$%G%"%k(B
! 2672: @tex
! 2673: $I = D \cdot \{2 t \partial_x + \partial_t, t \partial_t + 2 x \partial_x + 2\} $
! 2674: @end tex
! 2675: $B$N(B
! 2676: @tex $t$ @end tex
! 2677: $B$K$D$$$F$N@QJ,%$%G%"%k$r7W;;$7$?Nc$G$"$k!#(B([SST, Ex5.5.2, Ex5.5.6])
! 2678: @example
! 2679: [1431] nk_restriction.integration_ideal([2*t*dx+dt,t*dt+2*x*dx+2],[t,x],
! 2680: [dt,dx],[1,0]);
! 2681: -- generic_bfct_and_gr :0.002999sec(0.002623sec)
! 2682: generic bfct : [[1,1],[s,1],[s-1,1]]
! 2683: S0 : 1
! 2684: B_{S0} length : 2
! 2685: -- fctr(BF) + base :0.001sec(0.001091sec)
! 2686: -- integration_ideal_internal :0.002sec(0.001879sec)
! 2687: [2*x*dx+1]
! 2688: [1432]
! 2689: @end example
! 2690:
! 2691:
! 2692:
1.23 takayama 2693: @comment ----------- $B0J2<$O8+K\(B. $B>C$9$J(B.
1.19 takayama 2694: @comment ****************************************************************
1.8 takayama 2695: @comment --- $B"~"~"~"~(B $B0J2<B>$N4X?t$K$D$$$F??;w$7$F5-=R$9$k(B. $B"~"~"~"~(B
1.3 takayama 2696: @comment $B?7$7$$4X?t$N@bL@$r=q$/$?$a$N%F%s%W%l!<%H$G$"$k(B. $B>C$9$J(B.
1.4 takayama 2697: @comment --- $B"~"~"~"~(B $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B
2698: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
2699: @node xyz_pqr,,, $B<B83E*;EMM$N4X?t(B
2700: @subsection @code{xyz_pqr}, @code{syz_stu}
2701: @findex xyz_pqr
2702: @findex xyz_stu
2703:
1.3 takayama 2704: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2705: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2706: @table @t
1.1 takayama 2707: @item xyz_pqr(@var{arg1},@var{arg2}[,@var{flag}])
2708: @itemx xyz_stu(@var{arg1},@var{arg2})
2709: :: xyz $B$K4X$9$kA`:n(B.
2710: @end table
2711:
2712: @table @var
2713: @item return
2714: $B@0?t(B
2715: @item arg1, arg2
2716: $B@0?t(B
2717: @item flag
2718: 0 $B$^$?$O(B 1
2719: @end table
2720:
2721: @itemize @bullet
1.3 takayama 2722: @item $B$3$N9`L\$O?7$7$$4X?t$N@bL@$r=q$/$?$a$N%F%s%W%l!<%H$G$"$k(B. $B>C$9$J(B.
1.1 takayama 2723: @item
2724: @code{xyz_pqr()} $B$O(B, @var{arg1}, @var{arg2} $B$r(B pqr $B$9$k(B.
2725: @item
2726: @var{flag} $B$,(B 0 $B$G$J$$$H$-(B, $B%b%8%e%i7W;;$r9T$&(B.
2727: @item
2728: @code{xyz_stu()} $B$O(B stu $B%"%k%4%j%:%`$rMQ$$$k(B.
2729: @end itemize
2730:
2731: @example
2732: [219] xyz_pqr(1,2);
2733: 3
2734: [220] xyz_pqr(1,2,1);
2735: 3
2736: 0
2737: [221] xyz_stu(1,2);
2738: 3
2739: @end example
2740:
2741: @table @t
2742: @item $B;2>H(B
2743: @ref{xyz_abc}
2744: @end table
2745:
1.3 takayama 2746: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
2747: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.1 takayama 2748: @noindent
2749: ChangeLog
2750: @itemize @bullet
2751: @item $B$3$N4X?t$O(B 2004-3-1 $B$+$i(B 2004-3-14 $B$K$+$1$F(B $B%"%k%4%j%:%`(B xyz ($BO@J8(B
2752: http://www.afo.org/xyz.pdf ) $B$rMQ$$$F=q$-D>$5$l$?(B.
2753: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B xxxyy.rr, ppp.c $B$G$"$k(B.
2754: @item $B$3$N4X?t$O(B 2000 $B:"$K$O$8$a$F$N%P!<%8%g%s$,=q$+$l$?(B. $B%=!<%9$O(B ppp.c $B$G$"$k(B.
2755: @end itemize
2756:
2757: @comment --- $B$*$^$8$J$$(B ---
2758: @node Index,,, Top
2759: @unnumbered Index
2760: @printindex fn
2761: @printindex cp
2762: @iftex
2763: @vfill @eject
2764: @end iftex
2765: @summarycontents
2766: @contents
2767: @bye
2768: @comment --- $B$*$^$8$J$$=*$j(B ---
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>