version 1.21, 2005/07/25 12:23:05 |
version 1.28, 2008/11/19 03:25:38 |
|
|
%% $OpenXM: OpenXM/src/asir-doc/exp/exp-ja.texi,v 1.20 2005/05/04 11:06:55 takayama Exp $ |
%% $OpenXM: OpenXM/src/asir-doc/exp/exp-ja.texi,v 1.27 2008/11/11 08:18:50 ohara Exp $ |
\input texinfo |
\input texinfo |
@iftex |
@iftex |
@catcode`@#=6 |
@catcode`@#=6 |
|
|
@title $B<B83E*;EMM$N4X?t(B |
@title $B<B83E*;EMM$N4X?t(B |
@subtitle Risa/Asir $B<B83E*;EMM4X?t@bL@=q(B |
@subtitle Risa/Asir $B<B83E*;EMM4X?t@bL@=q(B |
@subtitle 1.0 $BHG(B |
@subtitle 1.0 $BHG(B |
@subtitle 2005 $BG/(B 5 $B7n(B |
@subtitle 2008 $BG/(B 1 $B7n(B |
|
|
@author by Risa/Asir committers |
@author by Risa/Asir committers |
@page |
@page |
Line 121 ChangeLog $B$N9`L\$O(B www.openxm.org $B$N(B cvswe |
|
Line 121 ChangeLog $B$N9`L\$O(B www.openxm.org $B$N(B cvswe |
|
* set_print_function:: |
* set_print_function:: |
* small_jacobi:: |
* small_jacobi:: |
* flatten_quote:: |
* flatten_quote:: |
|
* printf:: |
|
* fprintf:: |
* sprintf:: |
* sprintf:: |
* quote_to_funargs:: |
* quote_to_funargs:: |
* funargs_to_quote:: |
* funargs_to_quote:: |
Line 128 ChangeLog $B$N9`L\$O(B www.openxm.org $B$N(B cvswe |
|
Line 130 ChangeLog $B$N9`L\$O(B www.openxm.org $B$N(B cvswe |
|
* remove_paren:: |
* remove_paren:: |
* set_secure_mode:: |
* set_secure_mode:: |
* set_secure_flag:: |
* set_secure_flag:: |
* double_quote:: |
* initialize_static_variable:: |
|
* eval_quote:: |
|
* nqt_match:: |
|
* nqt_match_rewrite:: |
|
* qt_normalize:: |
|
* qt_set_coef:: |
|
* qt_set_ord:: |
|
* qt_set_weight:: |
|
* nqt_comp:: |
|
* qt_is_var:: |
|
* qt_is_ceof:: |
|
* qt_rewrite:: |
|
* asirgui.hnd:: |
|
* noro_matrix.rr: |
|
* f_res:: |
|
* chdir:: |
|
* pwd:: |
|
* dcurrenttime:: |
|
|
|
|
@end menu |
@end menu |
|
|
@comment --- $B"~"~"~"~(B $B4X?t(B quotetotex, quotetotex_env $B$N@bL@(B $B"~"~"~"~(B |
@comment --- $B"~"~"~"~(B $B4X?t(B quotetotex, quotetotex_env $B$N@bL@(B $B"~"~"~"~(B |
|
|
|
|
|
|
@node sprintf,,, $B<B83E*;EMM$N4X?t(B |
@node sprintf,,, $B<B83E*;EMM$N4X?t(B |
@subsection @code{sprintf} |
@subsection @code{printf}, @code{fprintf}, @code{sprintf} |
@findex sprintf |
@findex sprintf |
|
|
@table @t |
@table @t |
|
@item printf(@var{format}[,@var{args}]) |
|
@item fprintf(@var{fd},@var{format}[,@var{args}]) |
@item sprintf(@var{format}[,@var{args}]) |
@item sprintf(@var{format}[,@var{args}]) |
:: C $B$K;w$?%W%j%s%H4X?t(B |
:: C $B$K;w$?%W%j%s%H4X?t(B |
@end table |
@end table |
|
|
@table @var |
@table @var |
@item return |
@item return |
$BJ8;zNs(B |
$B@0?t(B(printf,fprintf), $BJ8;zNs(B(sprintf) |
@item format |
@item format |
$BJ8;zNs(B |
$BJ8;zNs(B |
|
@item fd |
|
$BHsIi@0?t(B($B%U%!%$%k5-=R;R(B) |
@item args |
@item args |
$B%*%V%8%'%/%H(B |
$B%*%V%8%'%/%H(B |
@end table |
@end table |
|
|
@itemize @bullet |
@itemize @bullet |
@item |
@item |
$B%U%)!<%^%C%HJ8;zNs(B @var{format } $B$K$7$?$,$$(B @var{args} $B$rJ8;zNs$KJQ49$9$k(B. |
@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. |
@item |
@item |
$B%U%)!<%^%C%HJ8;zNs$NCf$K(B @code{%a} (any) $B$,MxMQ2DG=(B. |
@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. |
@var{args} $B$N8D?t$O%U%)!<%^%C%HJ8;zNs$NCf$N(B @code{%a} $B$N8D?t$KEy$7$/$9$k$3$H(B. |
@item |
|
@code{sprintf} $B$O7k2L$rJ8;zNs$GJV$7(B, $BI8=`=PNO$K$O=q$-=P$5$J$$(B. |
|
@item |
|
$B=q<0J8;zNs$NCf$G(B @code{%a} (any) $B$,MxMQ2DG=(B. |
|
@var{args} $B$N8D?t$O=q<0J8;zNs$NCf$N(B @code{%a} $B$N8D?t$KEy$7$/$9$k$3$H(B. |
|
@item |
|
$B%U%!%$%k5-=R;R$O(B, @code{open_file} $B4X?t$rMQ$$$FF@$k$3$H(B. |
@end itemize |
@end itemize |
|
|
@example |
@example |
[0] sprintf("%a: rat = %a",10,x^2-1); |
[0] printf("%a: rat = %a\n",10,x^2-1)$ |
10: rat = x^2-1 |
10: rat = x^2-1 |
|
[1] S=sprintf("%a: rat = %a",20,x^2-1)$ |
|
[2] S; |
|
20: rat = x^2-1 |
|
[3] Fd=open_file("hoge.txt","w"); |
|
0 |
|
[4] fprintf(Fd,"Poly=%a\n",(x-1)^3)$ |
|
[5] close_file(Fd)$ |
|
[6] quit; |
|
|
|
$ cat hoge.txt |
|
Poly=x^3-3*x^2+3*x-1 |
@end example |
@end example |
|
|
@table @t |
@table @t |
@item $B;2>H(B |
@item $B;2>H(B |
@ref{rtostr} |
@ref{rtostr},@ref{open_file},@ref{close_file} |
@end table |
@end table |
|
|
@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 |
@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 |
|
|
ChangeLog |
ChangeLog |
@itemize @bullet |
@itemize @bullet |
@item |
@item |
$B$3$N4X?t$O(B 2004-7-13 $B$K%3%_%C%H$5$l$?(B. |
$B4X?t(B sprintf$B$O(B 2004-7-13 $B$K%3%_%C%H$5$l$?(B. |
$BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/strobj (1.50) $B$G$"$k(B. |
$BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/strobj (1.50) $B$G$"$k(B. |
@item |
@item |
|
$B4X?t(B printf$B$O(B 2007-11-8 $B$K%3%_%C%H$5$l$?(B. |
|
$BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/print.c (1.23) $B$G$"$k(B. |
|
@item |
|
$B4X?t(B fprintf$B$O(B 2008-11-18 $B$K%3%_%C%H$5$l$?(B. |
|
$BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/file.c (1.25) $B$G$"$k(B. |
|
@item |
@code{%a} $B$O(B Maple $B$N(B sprintf $B$N??;w$+(B. |
@code{%a} $B$O(B Maple $B$N(B sprintf $B$N??;w$+(B. |
@end itemize |
@end itemize |
|
|
Line 1474 cgi-asir.sh $B$G$O(B |
|
Line 1522 cgi-asir.sh $B$G$O(B |
|
1.33 OpenXM_contrib2/asir2000/parse/parse.h |
1.33 OpenXM_contrib2/asir2000/parse/parse.h |
@end itemize |
@end itemize |
|
|
@node double_quote,,, $B<B83E*;EMM$N4X?t(B |
@node initialize_static_variable,,, $B<B83E*;EMM$N4X?t(B |
@subsection @code{double_quote} |
@subsection @code{initialize_static_variable} |
@findex double_quote |
@findex initialize_static_variable |
|
|
|
|
@comment --- $B@bL@(B --- |
@comment --- $B@bL@(B --- |
@table @t |
@table @t |
@item double_quote, double quote $B$N<h07$d(B static $BJQ?t$N=i4|2=$NLdBjE@(B. |
@item static $BJQ?t$N=i4|2=$NLdBjE@(B. $B=i4|2=$N;~$K(B segmentation fault $B$,$*$-$k(B. |
@end table |
@end table |
|
|
|
|
@itemize @bullet |
@itemize @bullet |
@item double quote $B$N<h07(B. $B2<$N$h$&$J%W%m%0%i%`$G(B parse error $B$,@8$8$k(B. |
|
$BLnO$[)$/(B: "TeXmacs $BMQ$K(B, $BE:;z$N<+F0JQ49$J$I$r$d$C$F$$$k$H$-$K(B, ox_asir $B$,<u$1<h$C$?(B |
|
$BJ8;zNs$N%P%C%/%9%i%C%7%e$,(B1 $B8D$N>l9g$K(B 2 $B8D$KA}$d$9$H$$$&4X?t$,DI2C(B |
|
$B$5$l$F$$$^$9(B. $B;n$7$K$3$l$r30$9$H(B OK $B$N$h$&$G$9(B. $B$G$b$-$C$HB>$G$*$+$7$J(B |
|
$B$3$H$,5/$-$k$G$7$g$&$M(B. |
|
$B;W$$=P$7$F$-$^$7$?(B. TeX $B$rAw$k$H$-$K(B, $B%P%C%/%9%i%C%7%e$@$i$1$K(B |
|
$B$J$k$N$rHr$1$k$?$a$@$C$?$h$&$J(B... " |
|
@item static $BJQ?t$N<h07(B. |
@item static $BJQ?t$N<h07(B. |
$B2<$NNc$r;2>H$N$3$H(B. |
$B2<$NNc$r;2>H$N$3$H(B. |
@end itemize |
@end itemize |
|
|
@example |
|
if (1) @{ |
|
S="\"hoge\""; |
|
print(S); |
|
@}else@{ @}; |
|
$B$r(B $B%U%!%$%k(B t.rr $B$K3JG<(B. |
|
|
|
[1207] S=util_read_file_as_a_string("/home/nobuki/t.rr"); |
|
if (1) @{ |
|
S="\"hoge\""; |
|
print(S); |
|
@}else@{ @}; |
|
|
|
[1208] eval_str(S); |
|
exprparse : parse error |
|
0 |
|
|
|
t.rr $B$r(B |
|
if (1) @{ |
|
S=" "+asciitostr([34])+"hoge"+asciitostr([34])+" "; |
|
print(S); |
|
@}else@{ @}; |
|
$B$HJQ99(B. S $B$KFI$_9~$`(B. |
|
[1212] eval_str(S); |
|
exprparse : parse error |
|
0 |
|
S="" $B$,$J$/$F$b(B if (1) $B$@$H%(%i!<$N$h$&$@(B. |
|
|
|
[1213] ox_launch(0,"ox_asir"); |
|
0 |
|
[1214] ox_execute_string(0,S); |
|
0 $B$7$+$7$3$A$i$O@5$7$/F0:n(B. |
|
|
|
@end example |
|
|
|
@example |
@example |
if (1) @{ |
if (1) @{ |
module abc; |
module abc; |
|
|
ChangeLog |
ChangeLog |
@itemize @bullet |
@itemize @bullet |
@item oxasir-win.rr $B$N<h07$GLdBjE@$H$7$FIb>e(B. 2005.07.25. |
@item oxasir-win.rr $B$N<h07$GLdBjE@$H$7$FIb>e(B. 2005.07.25. |
|
@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. |
@item ox_asir $B$K7W;;$r0MMj$9$k;~$O(B if (1) @{ ... @}$B$G0O$`(B. |
@item ox_asir $B$K7W;;$r0MMj$9$k;~$O(B if (1) @{ ... @}$B$G0O$`(B. |
@end itemize |
@end itemize |
|
|
|
@node eval_quote,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{eval_quote} |
|
@findex eval_quote |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item eval_quote(@var{Q}); |
|
:: quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
$B%*%V%8%'%/%H(B |
|
@item Q |
|
quote$B7?(B |
|
@end table |
|
|
|
@itemize @bullet |
|
@item quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B. |
|
@item $B5U4X?t$O(B @code{objtoquote} |
|
@end itemize |
|
|
|
@example |
|
ctrl("print_quote",2); |
|
A=quote((x-1)^2+(x-1)+3); |
|
$B=PNO(B: ((((x)-(1))^(2))+((x)-(1)))+(3) |
|
eval_quote(A); |
|
$B=PNO(B: x^2-x+3 |
|
print_input_form(A); /* asir-contrib */ |
|
$B=PNO(B: quote((x-1)^2+(x-1)+3) |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{objtoquote}, @ref{quotetolist}, @ref{eval_string}, |
|
@ref{quote_to_funargs}, @ref{funargs_to_quote} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item -----$B$^$@=q$$$F$J$$(B. |
|
@end itemize |
|
|
|
|
|
@node nqt_match,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{nqt_match} |
|
@findex nqt_match |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item nqt_match(@var{Expr},@var{Pattern}[,@var{Mode}]) |
|
:: @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. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
$B@0?t(B |
|
@item Expr |
|
quote$B7?(B |
|
@item Pattern |
|
quote$B7?(B |
|
@item Mode |
|
$B@0?t(B |
|
@end table |
|
|
|
@itemize @bullet |
|
@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. |
|
@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. |
|
@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. |
|
@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 |
|
fnode$BI8=`7A$H(B @var{Pattern} $B$rHf3S$9$k(B. |
|
@end itemize |
|
|
|
@example |
|
ctrl("print_quote",2); |
|
A=quote((x-y)*(x+y)); |
|
nqt_match(A,quote(P*Q)); |
|
[P,Q] |
|
$B=PNO(B: [x-y, x+y] |
|
nqt_match(A,quote(P*Q),1); |
|
$B%^%C%A$7$J$$(B. |
|
nqt_match(A,quote(P*Q),2); |
|
$B%^%C%A$7$J$$(B. |
|
qt_normalize(A,1); |
|
$B=PNO(B: ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x)) |
|
qt_normalize(A,2); |
|
$B=PNO(B: ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y)) |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{nqt_match_rewrite}, |
|
@ref{qt_rewrite} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item ----- $B$^$@=q$$$F$J$$(B. |
|
@end itemize |
|
|
|
|
|
@node nqt_match_rewrite,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{nqt_match_rewrite} |
|
@findex nqt_match_rewrite |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item nqt_match_rewrite(@var{Expr},@var{Rule},@var{Mode}) |
|
:: @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
quote$B7?(B |
|
@item Expr |
|
quote$B7?(B |
|
@item Rule |
|
[@var{Pattern},@var{Action}] $B$+$^$?$O(B |
|
[@var{Pattern},@var{Condition},@var{Action}]. |
|
$B$3$l$i$NMWAG$O$9$Y$F(B quote$B7?(B. |
|
@item Mode |
|
$B@0?t(B |
|
@end table |
|
|
|
@itemize @bullet |
|
@item @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B. @var{Pattern} $B$KE,9g$7$J$$>l9g$O(B |
|
@var{Exprt} $B<+BN$rLa$9(B. |
|
@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. |
|
@end itemize |
|
|
|
@comment %%Doc: cfep/tests/2006-03-12-qt.rr |
|
@example |
|
ctrl("print_quote",2); |
|
nqt_match_rewrite(`x*y*z,[`X*Y,`X+Y],1); |
|
$B=PNO(B: (x)+((y)*(z)) |
|
A=`x*x; |
|
nqt_match_rewrite(A,[`X*Y,`X+Y],1); |
|
$B=PNO(B: x^2 ($B%^%C%A$7$F$$$J$$(B) |
|
nqt_match_rewrite(A,[`X*Y,`X+Y],2); |
|
$B=PNO(B: 2*x |
|
|
|
$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. |
|
quotetolist(qt_normalize(`x*x,0)); |
|
$B=PNO(B: [b_op,^,[internal,x],[internal,2]] |
|
quotetolist(qt_normalize(`x*x,1)); |
|
$B=PNO(B: [b_op,^,[internal,x],[internal,2]] |
|
quotetolist(qt_normalize(`x*x,2)); |
|
$B=PNO(B: [n_op,*,[internal,x],[internal,x]] |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{nqt_match}, |
|
@ref{qt_rewrite}, |
|
@ref{qt_normalize} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item -----$B$^$@=q$$$F$J$$(B. |
|
@end itemize |
|
|
|
|
|
|
|
@node qt_normalize,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{qt_normalize} |
|
@findex qt_normalize |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item qt_normalize(@var{Expr}[,@var{Mode}]) |
|
:: @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. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
quote$B7?(B |
|
@item Expr |
|
quote$B7?(B |
|
@item Mode |
|
$B@0?t(B |
|
@end table |
|
|
|
fnode$B$O(B quote$B7?$N<BBN$G$"$k(B. |
|
fnode $B$OLZ$G$"$j(B, $B7?(B id $B$*$h$S;R6!$+$i$J$k(B. |
|
$B7?$*$h$S;R6!$r<h$j=P$94X?t$,(B funargs_to_quote $B$G$"$k(B. |
|
$B$^$?(B fnode $B$r%j%9%H$KJQ49$9$k4X?t$,(B quotetolist $B$G$"$k(B. |
|
|
|
fnode $B$NI8=`7A$O%Q%?!<%s%^%C%A%s%0(B, $B=q$-49$($rMF0W$K$*$3$J$&$?$a$KF3F~$5$l$?(B. |
|
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. |
|
@example |
|
fn = formula | functor(nf [,...]) | sum_of_monom |
|
fnode $B$NI8=`7A(B. functor $B$O4X?t$h$S$@$7$_$?$$$J$b$N(B. |
|
sum_of_monom = monom [+ ...] |
|
$B%b%N%_%"%k$NOB(B |
|
monom = [formula *] nfpow [* ...] |
|
$B%b%N%_%"%k(B |
|
nfpow = nf | nf^(nf) |
|
$BQQ>hItJ,$NI8=`7A(B |
|
formula = Risa object |
|
@end example |
|
|
|
|
|
@itemize @bullet |
|
@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. |
|
@item $BE83+$O:F5"E*$G$"$k(B. |
|
@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 |
|
(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 |
|
$B;R6!$r;}$F$k(B n-ary operator $B$KJQ49$5$l$k(B. |
|
@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. |
|
@item @var{Mode}=0. $BE83+$7$J$$(B. $B$3$l$,4{Dj$NF0:n(B. |
|
@item @var{Mode}=1. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49(B |
|
@item @var{Mode}=2. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49$7$J$$(B. |
|
@end itemize |
|
|
|
@var{Mode} $B$N0c$$$K$D$$$F$O0J2<$NNc$b;29M$K(B. |
|
@comment %%cfep/tests/2006-03-12-qt.rr |
|
@example |
|
ctrl("print_quote",2); |
|
A=quote((x-y)*(x+y)); |
|
$B=PNO(B: ((x)-(y))*((x)+(y)) |
|
B=qt_normalize(A,0); |
|
$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. |
|
quotetolist(B); |
|
$B=PNO(B: [n_op,*,[n_op,+,[internal,x],[n_op,*,[internal,-1],[internal,y]]],[n_op,+,[internal,x],[internal,y]]] |
|
|
|
B=qt_normalize(A,1); |
|
$B=PNO(B: ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x)) |
|
Mode=1. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$r$^$H$a$k(B. |
|
quotetolist(B); |
|
$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]]] |
|
|
|
qt_normalize(A,2); |
|
$B=PNO(B: ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y)) |
|
Mode=2. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$O;H$o$J$$(B. |
|
quotetolist(B); |
|
$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]]] |
|
|
|
qt_normalize(`x^2,2); |
|
$B=PNO(B: (x)*(x) |
|
Mode=2. $B6R$O;H$o$J$$(B. n-ary $B$N(B * $B$X(B. |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{nqt_match}, |
|
@ref{nqt_match_rewrite}, |
|
@ref{quotetolist}, |
|
@ref{quote_to_funargs} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item |
|
@end itemize |
|
|
|
|
|
@node qt_set_coef,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{qt_set_coef} |
|
@findex qt_set_coef |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item qt_set_coef(@var{ParamList}) |
|
:: $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 |
|
$BHs2D49B?9`<0$r07$&(B. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
$B%j%9%H(B |
|
@item ParamList |
|
$B%j%9%H(B |
|
@end table |
|
|
|
@itemize @bullet |
|
@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 |
|
$BHs2D49B?9`<0$r07$&(B. |
|
@item $B$3$N@k8@$r$7$J$$$H78?tBN$r?t$H$9$kHs2D49B?9`<0$H$7$F7W;;$9$k(B. |
|
@item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B. |
|
@item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B. |
|
@end itemize |
|
|
|
@example |
|
ctrl("print_quote",2); |
|
qt_set_coef([a]); |
|
B=qt_normalize(quote((a*x+a)^2),2); |
|
$B=PNO(B: ((a^2)*(x)*(x))+((2*a^2)*(x))+(a^2) |
|
qt_normalize(B+B,2); |
|
$B=PNO(B: ((2*a^2)*(x)*(x))+((4*a^2)*(x))+(2*a^2) |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{qt_normalize} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item -----$B$^$@=q$$$F$J$$(B. |
|
@end itemize |
|
|
|
|
|
@node qt_set_ord,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{qt_set_ord} |
|
@findex qt_set_ord |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item qt_set_ord(@var{VarList}) |
|
:: @var{VarList} $B$rJQ?t=g=x$H$9$k(B. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
$B%j%9%H(B |
|
@item VarList |
|
$B%j%9%H(B |
|
@end table |
|
|
|
@itemize @bullet |
|
@item @var{VarList} $B$r<-=q<0$KMQ$$$?JQ?t=g=x$r0J2<;HMQ$9$k(B. |
|
@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. |
|
@var{VarList} $B$K8=$l$J$$JQ?t$K$D$$$F$O$3$N=g=x$,E,MQ$5$l$k(B. |
|
@item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B. |
|
@item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B. |
|
@end itemize |
|
|
|
@example |
|
ctrl("print_quote",2); |
|
qt_normalize(quote(x+y),2); |
|
$B=PNO(B: (x)+(y) |
|
qt_set_ord([y,x]); |
|
$B=PNO(B: [y,x,z,u,v,w,p,q,r,s,t,a,b,c,d,e,f,g, $B0J2<>JN,(B ] |
|
qt_normalize(quote(x+y),2); |
|
$B=PNO(B: (y)+(x) |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{qt_normalize}, |
|
@ref{nqt_comp} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item -----$B$^$@=q$$$F$J$$(B. |
|
@end itemize |
|
|
|
|
|
@node qt_set_weight,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{qt_set_weight} |
|
@findex qt_set_weight |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item qt_set_weight(@var{WeightVector}) |
|
:: $BJQ?t$K$D$$$F(B weight $B%Y%/%H%k$r@_Dj$9$k(B. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
$B%j%9%H(B |
|
@item WeightVector |
|
$B%j%9%H(B |
|
@end table |
|
|
|
fnode f $B$N(B weight w(f) $B$O<!$N<0$G7W;;$9$k(B. |
|
@example |
|
f $B$,MU$N>l9g$O86B'(B 0. qt_weight_vector $B$G(B weight $B$,M?$($i$l$F$$$kITDj85$K(B |
|
$B$D$$$F$O$=$NCM(B. |
|
|
|
f $B$,(Bnode$B$N>l9g$O<!$N5,B'$G:F5"E*$K$-$a$k(B. |
|
w(f+g) = max(w(f),w(g)) |
|
w(f g) = w(f) + w(g) |
|
w(f^n) = n w(f) |
|
$B4X?t$K$D$$$F$O(B? -----$B$^$@=q$$$F$J$$(B. |
|
@end example |
|
|
|
@itemize @bullet |
|
@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. |
|
@var{WeightVector} $B$K8=$l$J$$JQ?t$K$D$$$F$N(B weight $B$O(B 0 $B$H$J$k(B. |
|
@item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B. |
|
qt_normalize $B$G$NE83+$G$O(B, $B$3$N=g=x$rMQ$$$F9`$,%=!<%H$5$l$k(B. |
|
@item qt_comp $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B. |
|
@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. |
|
@end itemize |
|
|
|
@example |
|
ctrl("print_quote",2); |
|
qt_set_weight([[x,-1],[y,-1]]); |
|
$B7k2L(B: [[x,-1],[y,-1]] |
|
qt_normalize(quote( 1+(x+y)+(x+y)^2),1); |
|
$B7k2L(B: (1)+(y)+(x)+((y)^(2))+((y)*(x))+((x)^(2))+((x)*(y)) |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{qt_normalize}, |
|
@ref{qt_set_ord}, |
|
@ref{qt_set_weight}, |
|
@ref{dp_gr_main} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item |
|
@end itemize |
|
|
|
|
|
@node nqt_comp,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{nqt_comp} |
|
@findex nqt_comp |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item nqt_cmp(@var{Expr1},@var{Exprt2}) |
|
:: @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
$B@0?t(B |
|
@item Expr1, Expr2 |
|
quote$B7?(B |
|
@end table |
|
|
|
@itemize @bullet |
|
@item @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B. |
|
@item @var{Expr1} > @var{Exprt2} $B$J$i(B 1. |
|
@item @var{Expr1} < @var{Exprt2} $B$J$i(B -1. |
|
@item @var{Expr1} = @var{Exprt2} ($B$*$J$8=g=x(B) $B$J$i(B 0. |
|
@end itemize |
|
|
|
@example |
|
ctrl("print_quote",2); |
|
qt_set_ord([y,x]); qt_set_weight([[x,-1],[y,-1]]); |
|
[nqt_comp(`x,`y), nqt_comp(`y,`x), nqt_comp(`x,`x)]; |
|
$B=PNO(B: [-1,1,0] |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{qt_normalize}, |
|
@ref{qt_set_ord}, |
|
@ref{qt_set_weight} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item $B$^$@=q$$$F$J$$(B. |
|
@end itemize |
@comment **************************************************************** |
@comment **************************************************************** |
|
|
|
@node qt_is_var,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{qt_is_var}, @code{qt_is_coef} |
|
@findex qt_is_var |
|
@findex qt_is_coef |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item qt_is_var(@var{Expr}) |
|
:: @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B. |
|
@item qt_is_coef(@var{Expr}) |
|
:: @var{Expr} $B$,78?t$NM-M}4X?tBN$KB0$9$k$H$-(B 1 $B$rLa$9(B. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
$B@0?t(B |
|
@item Expr |
|
quote$B7?(B |
|
@end table |
|
|
|
@itemize @bullet |
|
@item @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B. |
|
$B$=$&$G$J$$$H$-(B 0 $B$rLa$9(B. |
|
@end itemize |
|
|
|
@example |
|
[qt_is_var(quote(x)), qt_is_var(quote(3/2))]; |
|
$B=PNO(B: [1,0] |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{qt_rewrite}, |
|
@ref{nqt_match_rewrite} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item -----$B$^$@=q$$$F$J$$(B. |
|
@end itemize |
|
@comment **************************************************************** |
|
|
|
@node qt_rewrite,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{qt_rewrite} |
|
@findex qt_rewrite |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item qt_rewrite(@var{Expr},@var{Rules},@var{Mode}) |
|
:: @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
quote$B7?(B |
|
@item Expr |
|
quote$B7?(B |
|
@item Rules |
|
$B%j%9%H(B |
|
@item Mode |
|
$B@0?t(B |
|
@end table |
|
|
|
@itemize @bullet |
|
@item $B%f!<%68@8l$rMQ$$$FDj5A$5$l$?4X?t(B. |
|
@code{import("noro_rewrite.rr")} $B$7$F$*$/$3$H(B. |
|
(noro_rewrite.rr $B$,(B OpenXM/lib/asir-contrib $B$KB8:_$7$J$$>l9g(B |
|
$B%=!<%9$N(B OpenXM/src/asir-contrib/testing/noro/new_rewrite.rr $B$r%3%T!<(B) |
|
@item @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B. |
|
@item $B5,B'$NE,MQ$O(B fnode$BLZ$KBP$7$F:F5"E*$G$"$k(B. |
|
$B0lJ}(B @code{nqt_match_rewrite} $B$G$O%H%C%W%l%Y%k$N$_$K5,B'$,E,MQ$5$l$k(B. |
|
@item $B5,B'=89g(B @var{Rules} $B$N3FMWAG$N=q$-J}$O(B @code{nqt_match()} $B$N(B |
|
@var{Pattern} $B$HF1$8=q$-J}(B. |
|
$B$D$^$j(B [$B%Q%?!<%s(B, $B=q$-49$(7k2L(B] $B$^$?$O(B |
|
[$B%Q%?!<%s(B, $B>r7o(B, $B=q$-49$(7k2L(B]. |
|
@item @var{Mode} $B$N0UL#$O(B @ref{qt_normalize} $B$N(B @var{Mode} $B$HF1MM(B. |
|
$B%Q%?!<%s%^%C%A(B, $B=q$-49$($O(B @var{Mode} $B$G(B @code{qt_normalize()} |
|
$B$5$l$F$+$i?k9T$5$l$k(B. |
|
@end itemize |
|
|
|
$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 |
|
$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, |
|
$B=g=x$,Bg$-$/$J$k>l9g$N$_$K=q$-49$($k$Y$-$G$"$k(B. |
|
@example |
|
import("noro_rewrite.rr"); |
|
R=[[`X*Y,`nqt_comp(Y*X,X*Y)>0, `Y*X]]; |
|
qt_rewrite(`(x-y)^2,R,2); |
|
$B=PNO(B: quote(x*x+-2*x*y+y*y) |
|
@end example |
|
|
|
$B30@QBe?t$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B). |
|
@example |
|
import("noro_rewrite.rr"); |
|
Rext0=[quote(X*Y),quote(qt_is_var(X) && qt_is_var(Y) && nqt_comp(Y,X)>0), |
|
quote(-Y*X)]; |
|
Rext1=[quote(X^N),quote(eval_quote(N)>=2),quote(0)]; |
|
Rext2=[quote(X*X),quote(0)]; |
|
Rext=[Rext0,Rext1,Rext2]; |
|
qt_rewrite(quote( (x+2*y)*(x+4*y) ), Rext,1); |
|
$B=PNO(B: 2*x*y |
|
|
|
qt_set_coef([a,b,c,d]); |
|
qt_rewrite(quote((a*x+b*y)*(c*x+d*y)), Rext,1); |
|
$B=PNO(B: (d*a-c*b)*x*y |
|
|
|
@end example |
|
|
|
$BHyJ,$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B). |
|
@example |
|
import("noro_rewrite.rr"); |
|
qt_set_coef([a,b]); |
|
Rd1=[`d(X+Y), `d(X)+d(Y)]; |
|
Rd2=[`d(X*Y),`d(X)*Y+X*d(Y)]; |
|
Rd3=[`d(N), `qt_is_coef(N), `0]; |
|
Rd4=[`d(x),`1]; |
|
Rd=[Rd1,Rd2,Rd3,Rd4]; |
|
B=qt_rewrite( `d( (a*x+b)^3),Rd,2); |
|
$B=PNO(B: quote(3*a^3*x*x+6*b*a^2*x+3*b^2*a) |
|
fctr(eval_quote(B)); |
|
$B=PNO(B: [[3,1],[a,1],[a*x+b,2]] |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{nqt_match}, |
|
@ref{nqt_match_rewrite}, |
|
@ref{qt_normalize} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item qt $B7O$N4X?t$N867?$O(B OpenXM/src/asir-contrib/testing/tr.rr $B$G$"$k(B. |
|
$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 |
|
qt $B7O$N4X?t$,3+H/$5$l$?(B. |
|
@item qt $B7O$N4X?t$K$D$$$F$N$=$NB>$N;29MJ88%(B: |
|
OpenXM/doc/Papers/2005-rims-noro.tex $B$*$h$S(B |
|
OpenXM/doc/Papers/2005-rims-noro.tm (TeXmacs$B$N5-;v(B). |
|
@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. |
|
@end itemize |
|
@comment **************************************************************** |
|
|
|
|
|
@comment **************************************************************** |
|
@node asirgui.hnd,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{asirgui.hnd} |
|
@findex asirgui.hnd |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item asirguid.hnd |
|
:: asirgui $B$N(B main window $B$N%O%s%I%kHV9f$rJ];}$9$k%U%!%$%k(B |
|
@end table |
|
|
|
|
|
@itemize @bullet |
|
@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. |
|
@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. |
|
@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. |
|
@end itemize |
|
|
|
@example |
|
// Visual C++ $BMQ$N%F%9%H%W%m%0%i%`(B. $BI8=`F~NO$r(B asirgui $B$XAw$j9~$`(B. |
|
// test.cpp : $B%3%s%=!<%k(B $B%"%W%j%1!<%7%g%sMQ$N%(%s%H%j(B $B%]%$%s%H$NDj5A(B |
|
// |
|
|
|
#include "stdafx.h" |
|
#include "test.h" |
|
#include <windows.h> |
|
#include <stdlib.h> |
|
#include <stdio.h> |
|
#include <fcntl.h> |
|
#include <process.h> |
|
|
|
#ifdef _DEBUG |
|
#define new DEBUG_NEW |
|
#undef THIS_FILE |
|
static char THIS_FILE[] = __FILE__; |
|
#endif |
|
|
|
///////////////////////////////////////////////////////////////////////////// |
|
// $BM#0l$N%"%W%j%1!<%7%g%s(B $B%*%V%8%'%/%H(B |
|
|
|
CWinApp theApp; |
|
|
|
using namespace std; |
|
|
|
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) |
|
{ |
|
int nRetCode = 0; |
|
|
|
// MFC $B$N=i4|2=$*$h$S=i4|2=<:GT;~$N%(%i!<$N=PNO(B |
|
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0)) |
|
{ |
|
// TODO: $BI,MW$K1~$8$F%(%i!<(B $B%3!<%I$rJQ99$7$F$/$@$5$$!#(B |
|
cerr << _T("Fatal Error: MFC initialization failed") << endl; |
|
nRetCode = 1; |
|
} |
|
else |
|
{ |
|
// TODO: $B$3$N0LCV$K%"%W%j%1!<%7%g%s$NF0:n$r5-=R$7$F$/$@$5$$!#(B |
|
CString strHello; |
|
strHello.LoadString(IDS_HELLO); |
|
cout << (LPCTSTR)strHello << endl; |
|
} |
|
HWND hnd; |
|
FILE *fp = fopen("c:/Program Files/asir/bin/asirgui.hnd","r"); |
|
fscanf(fp,"%d",&hnd); |
|
fclose(fp); |
|
while (1) { |
|
int c; |
|
c = getchar(); |
|
if ( c == '#' ) break; |
|
PostMessage(hnd,WM_CHAR,c,1); |
|
} |
|
return nRetCode; |
|
} |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{xyz_abc} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item $B$3$N5!G=$O(B 2006-12-5, 2007-02-13 $B$K2C$($i$l$?(B. |
|
@item @code{OpenXM_contrib2/windows/asir32gui/asir32gui.clw} 1.11 |
|
@item @code{OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp} 1.15, 1.1.6 |
|
@end itemize |
|
@comment **************************************************************** |
|
|
|
@node noro_matrix.rr,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{noro_matrix.rr} |
|
@findex noro_matrix.rr |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B --- |
|
@table @t |
|
@item linalg.unit_mat(@var{arg1}) |
|
@item linalg.random_rmat(@var{arg1}, @var{arg2}, @var{arg3}) |
|
@item linalg.minipoly_mat(@var{arg1}) |
|
@item linalg.compute_kernel(@var{arg1}) |
|
@item linalg.compute_image(@var{arg1}) |
|
@item linalg.jordan_canonical_form(@var{arg1}) |
|
@end table |
|
|
|
|
|
@itemize @bullet |
|
@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. |
|
@end itemize |
|
|
|
@example |
|
load("noro_matrix.rr"); |
|
A=newmat(4,4,[[2,0,0,0],[3,5,1,0],[-9,-9,-1,0],[-5,0,0,1]]); |
|
B=linalg.jordan_canonical_form(A); |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{invmat} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item $B$3$N4X?t$O(B 2004-04 $B:"$+$i@~7ABe?t(BIII $B$N9V5A$r$7$J$,$i=q$+$l$?(B. |
|
@item $B%=!<%9(B: OpenXM/src/asir-contrib/packages/src/noro_matrix.rr |
|
@end itemize |
|
|
|
|
|
@node f_res,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{f_res} |
|
@findex f_res |
|
|
|
@comment --- $B4X?t$N4JC1$J@bL@(B --- |
|
@table @t |
|
@item f_res |
|
@end table |
|
|
|
|
|
@itemize @bullet |
|
@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. |
|
@end itemize |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@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. |
|
@item OpenXM/src/ox_cdd, OpenXM/src/asir-contrib/packages/src/f_res.rr |
|
@end itemize |
|
|
|
|
|
@node chdir,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{chdir}, @code{pwd} |
|
@findex chdir |
|
@findex pwd |
|
|
|
@comment --- $B%G%#%l%/%H%jA`:n(B --- |
|
@table @t |
|
@item chdir(@var{directory}) |
|
@item pwd() |
|
:: $B%7%'%k%3%^%s%I(B cd $B$H(B pwd $B$KBP1~$9$kA`:n(B. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
$BJ8;zNs(B(@code{pwd}), $B@0?t(B(@code{chdir}) |
|
@item dirctory |
|
$BJ8;zNs(B |
|
@end table |
|
|
|
@itemize @bullet |
|
@item |
|
@code{pwd} $B$O%+%l%s%H%G%#%l%/%H%j$rJ8;zNs$GJV$9(B. |
|
@item |
|
@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. |
|
@item |
|
$B$3$l$i$N4X?t$O(B UNIX $BHG$K$N$_<BAu$5$l$F$$$k(B. |
|
@end itemize |
|
|
|
@example |
|
[0] S=pwd(); |
|
/home/ohara |
|
[1] chdir(".../taka"); |
|
-1 |
|
[2] chdir("/usr/bin"); |
|
0 |
|
@end example |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item |
|
$B$3$l$i$N4X?t$O(B 2008-8-27 $B$K%3%_%C%H$5$l$?(B. |
|
$BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/miscf.c (1.27) $B$G$"$k(B. |
|
@end itemize |
|
|
|
|
|
@node dcurrenttime,,, $B<B83E*;EMM$N4X?t(B |
|
@subsection @code{dcurrenttime} |
|
@findex dcurrenttime |
|
|
|
@comment --- $B8=:_;~9o$r<hF@(B --- |
|
@table @t |
|
@item dcurrenttime() |
|
:: $B8=:_;~9o$r<hF@(B. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
$BIbF0>.?tE@?t(B |
|
@end table |
|
|
|
@itemize @bullet |
|
@item |
|
$BJV$jCM$O(B1970$BG/(B1$B7n(B1$BF|(B0$B;~(B0$BJ,(B0$BIC$+$i$N7P2aIC?t$G$"$k(B. |
|
@end itemize |
|
|
|
@example |
|
[0] ctrl("real_digit", 16); |
|
16 |
|
[1] dcurrenttime(); |
|
1226390851.34476 |
|
[2] currenttime(); |
|
1226390854 |
|
@end example |
|
|
|
@table @t |
|
@item $B;2>H(B |
|
@ref{currenttime} |
|
@end table |
|
|
|
@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 |
|
@comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit. |
|
@noindent |
|
ChangeLog |
|
@itemize @bullet |
|
@item |
|
$B$3$N4X?t$O(B 2008-9-12 $B$K%3%_%C%H$5$l$?(B. |
|
$BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/time.c (1.6) $B$G$"$k(B. |
|
@end itemize |
|
|
|
@comment ----------- $B0J2<$O8+K\(B. $B>C$9$J(B. |
|
@comment **************************************************************** |
@comment --- $B"~"~"~"~(B $B0J2<B>$N4X?t$K$D$$$F??;w$7$F5-=R$9$k(B. $B"~"~"~"~(B |
@comment --- $B"~"~"~"~(B $B0J2<B>$N4X?t$K$D$$$F??;w$7$F5-=R$9$k(B. $B"~"~"~"~(B |
@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. |
@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. |
@comment --- $B"~"~"~"~(B $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B |
@comment --- $B"~"~"~"~(B $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B |
|
|
$BJQ99$r$&$1$?%=!<%9%3!<%I$O(B xxxyy.rr, ppp.c $B$G$"$k(B. |
$BJQ99$r$&$1$?%=!<%9%3!<%I$O(B xxxyy.rr, ppp.c $B$G$"$k(B. |
@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. |
@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. |
@end itemize |
@end itemize |
@comment **************************************************************** |
|
|
|
@comment --- $B$*$^$8$J$$(B --- |
@comment --- $B$*$^$8$J$$(B --- |
@node Index,,, Top |
@node Index,,, Top |