=================================================================== RCS file: /home/cvs/OpenXM/src/asir-doc/parts/builtin/array.texi,v retrieving revision 1.9 retrieving revision 1.11 diff -u -p -r1.9 -r1.11 --- OpenXM/src/asir-doc/parts/builtin/array.texi 2003/12/18 10:26:20 1.9 +++ OpenXM/src/asir-doc/parts/builtin/array.texi 2009/03/24 08:00:50 1.11 @@ -1,4 +1,4 @@ -@comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/array.texi,v 1.8 2003/10/19 07:21:57 takayama Exp $ +@comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/array.texi,v 1.10 2005/02/10 04:59:21 noro Exp $ \BJP @node 配列,,, 組み込み函数 @section 配列 @@ -9,25 +9,32 @@ \E @menu -* newvect:: +* newvect vector vect:: * ltov:: * vtol:: * newbytearray:: -* newmat:: +* newmat matrix:: * size:: -* det invmat:: +* det nd_det invmat:: + * qsort:: @end menu -\JP @node newvect,,, 配列 -\EG @node newvect,,, Arrays -@subsection @code{newvect} +\JP @node newvect vector vect,,, 配列 +\EG @node newvect vector vect,,, Arrays +@subsection @code{newvect}, @code{vector}, @code{vect} @findex newvect +@findex vector +@findex vect @table @t @item newvect(@var{len}[,@var{list}]) +@item vector(@var{len}[,@var{list}]) \JP :: 長さ @var{len} のベクトルを生成する. \EG :: Creates a new vector object with its length @var{len}. +@item vect([@var{elements}]) +\JP :: @var{elements} を要素とするベクトルを生成する. +\EG :: Creates a new vector object by @var{elements}. @end table @table @var @@ -40,12 +47,19 @@ @item list \JP リスト \EG list +@item elements +\JP 要素の並び +\EG elements of the vector @end table @itemize @bullet \BJP @item -長さ @var{len} のベクトルを生成する. 第 2 引数がない場合, +@code{vect} は要素の並びからベクトルを生成する. +@item +@code{vector} は @code{newvect} の別名である. +@item +@code{newvect} は長さ @var{len} のベクトルを生成する. 第 2 引数がない場合, 各成分は 0 に初期化される. 第 2 引数がある場合, インデックスの小さい成分から, リストの 各要素により初期化される. 各要素は, 先頭から順に @@ -71,8 +85,12 @@ を書き換えることができる. \E \BEG +@item +@code{vect} creates a new vector object by its elements. +@item +@code{vector} is an alias of @code{newvect}. @item -Creates a new vector object with its length @var{len} and its elements +@code{newvect} creates a new vector object with its length @var{len} and its elements all cleared to value 0. If the second argument, a list, is given, the vector is initialized by the list elements. @@ -136,9 +154,13 @@ separated simply by a `blank space', while those of a [5,6] [4] size(A); [5] -[5] def afo(V) @{ V[0] = x; @} -[6] afo(A)$ -[7] A; +[5] length(A); +5 +[6] vect(1,2,3,4,[5,6]); +[ 1 2 3 4 [5,6] ] +[7] def afo(V) @{ V[0] = x; @} +[8] afo(A)$ +[9] A; [ x 2 3 4 [5,6] ] @end example @@ -300,13 +322,15 @@ similar to that of @code{newvect}. @fref{newvect}. @end table -\JP @node newmat,,, 配列 -\EG @node newmat,,, Arrays -@subsection @code{newmat} +\JP @node newmat matrix,,, 配列 +\EG @node newmat matrix,,, Arrays +@subsection @code{newmat}, @code{matrix} @findex newmat +@findex matrix @table @t @item newmat(@var{row},@var{col} [,[[@var{a},@var{b},...],[@var{c},@var{d},...],...]]) +@item matrix(@var{row},@var{col} [,[[@var{a},@var{b},...],[@var{c},@var{d},...],...]]) \JP :: @var{row} 行 @var{col} 列の行列を生成する. \EG :: Creates a new matrix with @var{row} rows and @var{col} columns. @end table @@ -326,6 +350,8 @@ similar to that of @code{newvect}. @itemize @bullet \BJP @item +@code{matrix} は @code{newmat} の別名である. +@item @var{row} 行 @var{col} 列の行列を生成する. 第 3 引数がない場合, 各成分は 0 に初期化される. 第 3 引数がある場合, インデックスの小さい成分から, 各行が, リストの @@ -342,6 +368,8 @@ similar to that of @code{newvect}. を書き換えることができる. \E \BEG +@item +@code{matrix} is an alias of @code{newmat}. @item If the third argument, a list, is given, the newly created matrix is initialized so that each element of the list (again a list) @@ -384,7 +412,7 @@ return to toplevel @table @t \JP @item 参照 \EG @item References -@fref{newvect}, @fref{size}, @fref{det invmat}. +@fref{newvect}, @fref{size}, @fref{det nd_det invmat}. @end table \JP @node size,,, 配列 @@ -456,14 +484,16 @@ in a rational expression. @fref{car cdr cons append reverse length}, @fref{nmono}. @end table -\JP @node det invmat,,, 配列 -\EG @node det invmat,,, Arrays -@subsection @code{det},@code{invmat} +\JP @node det nd_det invmat,,, 配列 +\EG @node det nd_det invmat,,, Arrays +@subsection @code{det}, @code{nd_det}, @code{invmat} @findex det +@findex nd_det @findex invmat @table @t @item det(@var{mat}[,@var{mod}]) +@itemx nd_det(@var{mat}[,@var{mod}]) \JP :: @var{mat} の行列式を求める. \EG :: Determinant of @var{mat}. @item invmat(@var{mat}) @@ -486,7 +516,7 @@ in a rational expression. @itemize @bullet \BJP @item -@code{det} は行列 @var{mat} の行列式を求める. +@code{det} および @code{nd_det} は行列 @var{mat} の行列式を求める. @code{invmat} は行列 @var{mat} の逆行列を求める. 逆行列は @code{[分母, 分子]} の形で返され, @code{分母}が行列, @code{分母/分子} が逆行列となる. @item @@ -494,10 +524,15 @@ in a rational expression. @item 分数なしのガウス消去法によっているため, 多変数多項式を成分とする 行列に対しては小行列式展開による方法のほうが効率がよい場合もある. +@item +@code{nd_det} は有理数または有限体上の多項式行列の行列式 +計算専用である. アルゴリズムはやはり分数なしのガウス消去法だが, +データ構造および乗除算の工夫により, 一般に @code{det} より高速に +計算できる. \E \BEG @item -@code{det} computes the determinant of matrix @var{mat}. +@code{det} and @code{nd_det} compute 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. @@ -507,6 +542,11 @@ The computation is done over GF(@var{mod}) if @var{mod The fraction free Gaussian algorithm is employed. For matrices with multi-variate polynomial entries, minor expansion algorithm sometimes is more efficient than the fraction free Gaussian algorithm. +@item +@code{nd_det} can be used for computing the determinant of a matrix with +polynomial entries over the rationals or finite fields. The algorithm +is an improved vesion of the fraction free Gaussian algorithm +and it computes the determinant faster than @code{det}. \E @end itemize