[BACK]Return to array.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-doc / parts / builtin

Diff for /OpenXM/src/asir-doc/parts/builtin/array.texi between version 1.4 and 1.5

version 1.4, 2000/11/13 00:16:36 version 1.5, 2002/08/08 05:24:37
Line 1 
Line 1 
 @comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/array.texi,v 1.3 2000/02/05 12:01:09 takayama Exp $  @comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/array.texi,v 1.4 2000/11/13 00:16:36 noro Exp $
 \BJP  \BJP
 @node $BG[Ns(B,,, $BAH$_9~$_H!?t(B  @node $BG[Ns(B,,, $BAH$_9~$_H!?t(B
 @section $BG[Ns(B  @section $BG[Ns(B
Line 14 
Line 14 
 * vtol::  * vtol::
 * newmat::  * newmat::
 * size::  * size::
 * det::  * det invmat::
 * qsort::  * qsort::
 @end menu  @end menu
   
Line 337  return to toplevel
Line 337  return to toplevel
 @table @t  @table @t
 \JP @item $B;2>H(B  \JP @item $B;2>H(B
 \EG @item References  \EG @item References
 @fref{newvect}, @fref{size}, @fref{det}.  @fref{newvect}, @fref{size}, @fref{det invmat}.
 @end table  @end table
   
 \JP @node size,,, $BG[Ns(B  \JP @node size,,, $BG[Ns(B
Line 405  in a rational expression.
Line 405  in a rational expression.
 @fref{car cdr cons append reverse length}, @fref{nmono}.  @fref{car cdr cons append reverse length}, @fref{nmono}.
 @end table  @end table
   
 \JP @node det,,, $BG[Ns(B  \JP @node det invmat,,, $BG[Ns(B
 \EG @node det,,, Arrays  \EG @node det invmat,,, Arrays
 @subsection @code{det}  @subsection @code{det},@code{invmat}
 @findex det  @findex det
   @findex invmat
   
 @table @t  @table @t
 @item det(@var{mat}[,@var{mod}])  @item det(@var{mat}[,@var{mod}])
 \JP :: @var{mat} $B$N9TNs<0$r5a$a$k(B.  \JP :: @var{mat} $B$N9TNs<0$r5a$a$k(B.
 \EG :: Determinant of @var{mat}.  \EG :: Determinant of @var{mat}.
   @item invmat(@var{mat})
   \JP :: @var{mat} $B$N9TNs<0$r5a$a$k(B.
   \EG :: Inverse matrix of @var{mat}.
 @end table  @end table
   
 @table @var  @table @var
 @item return  @item return
 \JP $B<0(B  \JP @code{det}: $B<0(B, @code{invmat}: $B%j%9%H(B
 \EG expression  \EG @code{det}: expression, @code{invmat}: list
 @item mat  @item mat
 \JP $B9TNs(B  \JP $B9TNs(B
 \EG matrix  \EG matrix
Line 431  in a rational expression.
Line 435  in a rational expression.
 @itemize @bullet  @itemize @bullet
 \BJP  \BJP
 @item  @item
 $B9TNs(B @var{mat} $B$N9TNs<0$r5a$a$k(B.  @code{det} $B$O9TNs(B @var{mat} $B$N9TNs<0$r5a$a$k(B.
   @code{invmat} $B$O9TNs(B @var{mat} $B$N5U9TNs$r5a$a$k(B. $B5U9TNs$O(B @code{[$BJ,Jl(B, $BJ,;R(B]}
   $B$N7A$GJV$5$l(B, @code{$BJ,Jl(B}$B$,9TNs(B, @code{$BJ,Jl(B/$BJ,;R(B} $B$,5U9TNs$H$J$k(B.
 @item  @item
 $B0z?t(B @var{mod} $B$,$"$k;~(B, GF(@var{mod}) $B>e$G$N9TNs<0$r5a$a$k(B.  $B0z?t(B @var{mod} $B$,$"$k;~(B, GF(@var{mod}) $B>e$G$N9TNs<0$r5a$a$k(B.
 @item  @item
Line 440  in a rational expression.
Line 446  in a rational expression.
 \E  \E
 \BEG  \BEG
 @item  @item
 Determinant of matrix @var{mat}.  @code{det} computes the determinant of matrix @var{mat}.
   @code{invmat} computes the inverse matrix of matrix @var{mat}.
   @code{invmat} returns a list @code{[num,den]}, where @code{num}
   is a matrix and @code{num/den} represents the inverse matrix.
 @item  @item
 The computation is done over GF(@var{mod}) if @var{mod} is specitied.  The computation is done over GF(@var{mod}) if @var{mod} is specitied.
 @item  @item
Line 464  is more efficient than the fraction free Gaussian algo
Line 473  is more efficient than the fraction free Gaussian algo
 [95] fctr(det(A));  [95] fctr(det(A));
 [[1,1],[u-v,1],[-z+v,1],[-z+u,1],[-y+u,1],[y-v,1],[-y+z,1],[-x+u,1],[-x+z,1],  [[1,1],[u-v,1],[-z+v,1],[-z+u,1],[-y+u,1],[y-v,1],[-y+z,1],[-x+u,1],[-x+z,1],
 [-x+v,1],[-x+y,1]]  [-x+v,1],[-x+y,1]]
   [96] A = newmat(3,3)$
   [97] for(I=0;I<3;I++)for(J=0,B=A[I],W=V[I];J<3;J++)B[J]=W^J;
   [98] A;
   [ 1 x x^2 ]
   [ 1 y y^2 ]
   [ 1 z z^2 ]
   [99] invmat(A);
   [[ -z*y^2+z^2*y z*x^2-z^2*x -y*x^2+y^2*x ]
   [ y^2-z^2 -x^2+z^2 x^2-y^2 ]
   [ -y+z x-z -x+y ],(-y+z)*x^2+(y^2-z^2)*x-z*y^2+z^2*y]
   [100] A*B[0];
   [ (-y+z)*x^2+(y^2-z^2)*x-z*y^2+z^2*y 0 0 ]
   [ 0 (-y+z)*x^2+(y^2-z^2)*x-z*y^2+z^2*y 0 ]
   [ 0 0 (-y+z)*x^2+(y^2-z^2)*x-z*y^2+z^2*y ]
   [101] map(red,A*B[0]/B[1]);
   [ 1 0 0 ]
   [ 0 1 0 ]
   [ 0 0 1 ]
 @end example  @end example
   
 @table @t  @table @t

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>