translation updated for sparse. 85/14485/2
Rui Hirokawa [Thu, 1 May 2014 12:37:50 +0000 (21:37 +0900)]
Change-Id: I545b3436fbea2ded1c071db6cadeb8c439bf118c

24 files changed:
scilab/modules/helptools/etc/images_md5.txt
scilab/modules/helptools/images/ordmmd_ja_JP_1.png [new file with mode: 0644]
scilab/modules/sparse/help/ja_JP/chfact.xml
scilab/modules/sparse/help/ja_JP/chsolve.xml
scilab/modules/sparse/help/ja_JP/decomposition/ludel.xml
scilab/modules/sparse/help/ja_JP/decomposition/lufact.xml
scilab/modules/sparse/help/ja_JP/decomposition/luget.xml
scilab/modules/sparse/help/ja_JP/decomposition/lusolve.xml
scilab/modules/sparse/help/ja_JP/decomposition/spchol.xml
scilab/modules/sparse/help/ja_JP/iterativesolvers/gmres.xml
scilab/modules/sparse/help/ja_JP/iterativesolvers/pcg.xml
scilab/modules/sparse/help/ja_JP/iterativesolvers/qmr.xml
scilab/modules/sparse/help/ja_JP/matrixmanip/nnz.xml
scilab/modules/sparse/help/ja_JP/matrixmanip/speye.xml
scilab/modules/sparse/help/ja_JP/matrixmanip/spones.xml
scilab/modules/sparse/help/ja_JP/matrixmanip/sprand.xml
scilab/modules/sparse/help/ja_JP/ordmmd.xml
scilab/modules/sparse/help/ja_JP/sparseconvert/adj2sp.xml
scilab/modules/sparse/help/ja_JP/sparseconvert/full.xml
scilab/modules/sparse/help/ja_JP/sparseconvert/mtlb_sparse.xml
scilab/modules/sparse/help/ja_JP/sparseconvert/sp2adj.xml
scilab/modules/sparse/help/ja_JP/sparseconvert/sparse.xml
scilab/modules/sparse/help/ja_JP/sparseconvert/spcompack.xml
scilab/modules/sparse/help/ja_JP/sparseconvert/spget.xml

index 0d23104..c9484be 100644 (file)
@@ -1032,6 +1032,7 @@ optim_1.png=a2d9b2e879963549e64862118514b4c8
 optim_sa_1.png=b2a6a1ff9fec247aba2e606e45387997
 ordmmd_en_US_1.png=65695a27c9eaf674ba4eac782ec20eba
 ordmmd_fr_FR_1.png=65695a27c9eaf674ba4eac782ec20eba
+ordmmd_ja_JP_1.png=65695a27c9eaf674ba4eac782ec20eba
 ordmmd_pt_BR_1.png=65695a27c9eaf674ba4eac782ec20eba
 ordmmd_ru_RU_1.png=65695a27c9eaf674ba4eac782ec20eba
 orthProj_1.png=dd3a07c86d54c910fc4f253c576f1532
diff --git a/scilab/modules/helptools/images/ordmmd_ja_JP_1.png b/scilab/modules/helptools/images/ordmmd_ja_JP_1.png
new file mode 100644 (file)
index 0000000..1a15fe2
Binary files /dev/null and b/scilab/modules/helptools/images/ordmmd_ja_JP_1.png differ
index 64c901a..867ce47 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="chfact">
+    
     <refnamediv>
+        
         <refname>chfact</refname>
+        
         <refpurpose>疎行列のコレスキー分解</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>spcho=chfact(A)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>A</term>
+                
                 <listitem>
+                    
                     <para>正方正定対称疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>spcho</term>
+                
                 <listitem>
+                    
                     <para>コード形式のコレスキー分解を含むリスト</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>spcho=chfact(A)</literal> は,
+            
             正定対称行列と仮定して疎行列<literal>A</literal>の
+            
             コレスキー分解を計算します.
+            
             この関数は,Ng-Peyton プログラム (ORNL)に基づいています.
+            
             <literal>spcho</literal>の変数の詳細な説明については,
+            
             Fortran プログラムを参照ください.
+            
             この関数は <literal>chsolve</literal>と共に使用されます.
+            
         </para>
+        
     </refsection>
+    
+    <refsection>
+        
+        <title>例</title>
+        
+        <programlisting role="example"><![CDATA[ 
+A=sprand(20,20,0.1);
+A=A*A'+eye();  
+chfact(A)
+
+sol=(1:20)';
+rhs=A*sol;
+chfact(A)
+ ]]></programlisting>
+        
+    </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="chsolve">chsolve</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="lufact">lufact</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="luget">luget</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spchol">spchol</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 6804dba..8a95951 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="chsolve">
+    
     <refnamediv>
+        
         <refname>chsolve</refname>
+        
         <refpurpose>疎行列のコレスキーソルバ</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>sol=chsolve(spcho,rhs)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>spcho</term>
+                
                 <listitem>
+                    
                     <para>chfact から返されたコード形式のコレスキー分解を含むリスト</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>rhs, sol</term>
+                
                 <listitem>
+                    
                     <para>フル列ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>sol=chsolve(spcho,rhs)</literal> は,
+            
             <literal>A</literal>を疎行列の正定対称行列として
+            
             <literal>rhs=A*sol</literal>の解を計算します.
+            
             この関数は,Ng-Peyton プログラム (ORNL)に基づいています.
+            
             <literal>spcho</literal>の変数の詳細な説明については,
+            
             Fortran プログラムを参照ください.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 A=sprand(20,20,0.1);
 A=A*A'+eye();  
@@ -57,25 +98,48 @@ sol=(1:20)';rhs=A*sol;
 spcho=chfact(A);
 chsolve(spcho,rhs)
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="chfact">chfact</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="lufact">lufact</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="luget">luget</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spchol">spchol</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 217d31e..30ccb12 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="ludel">
+    
     <refnamediv>
+        
         <refname>ludel</refname>
+        
         <refpurpose>lufactで使用されるユーティリティ関数</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>ludel(hand)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>hand</term>
+                
                 <listitem>
+                    
                     <para>疎行列LU分解のハンドル (lufactの出力)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             この関数は,<literal>lufact</literal>と組み合わせて使用されます.
+            
             この関数は,<literal>lufact</literal>の結果を保存するために使用される
+            
             内部メモリ空間を消去します.
+            
         </para>
+        
         <para>
+            
             一連のコマンド,<literal>[p,r]=lufact(A);x=lusolve(p,b);ludel(p);</literal>
+            
             により線形疎行列システム<literal>A*x = b</literal>を解き,
+            
             <literal>p</literal>を消去することができます.
+            
         </para>
+        
     </refsection>
+    
+    <refsection>
+        
+        <title>例</title>
+        
+        <programlisting role="example"><![CDATA[ 
+non_zeros=[1,2,3,4];
+rows_cols=[1,1;2,2;3,3;4,4];
+sp=sparse(rows_cols,non_zeros);
+[h,rk]=lufact(sp);
+x=lusolve(h,[1;1;1;1]);
+ludel(h)
+rk,sp*x
+ ]]></programlisting>
+        
+    </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="lufact">lufact</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="luget">luget</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 9ce2716..49e6e99 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="lufact">
+    
     <refnamediv>
+        
         <refname>lufact</refname>
+        
         <refpurpose>疎行列LU分解</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>[hand,rk]=lufact(A,prec)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>A</term>
+                
                 <listitem>
+                    
                     <para>正方疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>hand</term>
+                
                 <listitem>
+                    
                     <para>疎行列LU分解へのハンドル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>rk</term>
+                
                 <listitem>
+                    
                     <para>整数  (Aのランク)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>prec</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         大きさ2のベクトル<literal>prec=[eps,reps]</literal>で,
+                        
                         絶対および相対閾値を指定します.
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>[hand,rk]=lufact(A)</literal>は,
+            
             疎行列<literal>A</literal>のLU分解を行ないます.
+            
             <literal>hand</literal> (表示されません) が,
+            
             (線形システムを解く)<literal>lusolve</literal>および
+            
             (LU分解を取得する)<literal>luget</literal>で
+            
             使用されます.
+            
             <literal>hand</literal> は以下のコマンドにより消去します: <literal>ludel(hand)</literal>;
+            
         </para>
+        
         <para>
+            
             行列Aは,フルランクである必要はありませんが,正方である必要があります
+            
             (Aは疎行列であると仮定されるため,必要に応じてAの下に正方にするための
+            
             ゼロを追加することができます).
+            
         </para>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>eps :</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         最終的に要素がピボットの候補とみなされる大きさ.
+                        
                         この数は行列の中で存在すると思われる最も小さい対角項よりも
+                        
                         著しく小さな値に設定する必要があります.
+                        
                         デフォルトは<literal>%eps</literal>です.
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>reps :</term>
+                
                 <listitem>
+                    
                     <para>この数は,ピポット相対閾値を定義します.
+                        
                         この値は,0と1の間とする必要があります.
+                        
                         1の場合,ピボット選択は完全ピボット選択となり,
+                        
                         非常に遅く,通常の行列に近くなるまで要素が埋められる
+                        
                         傾向があります. 0 に近い値を設定した場合,
+                        
                         ピボット選択は閾値なしの厳密なMarkowitz法となります.
+                        
                         ピボットの閾値はこれらが使用された場合には
+                        
                         要素が増加しすぎるようなピボット候補を消去する際に使用されます.
+                        
                         要素の増加が丸め誤差の原因です.
+                        
                         要素の増加は条件の良い行列においても発生します.
+                        
                         reps に大きな値を設定することで,
+                        
                         要素の増加と丸め誤差が減少しますが,
+                        
                         大きすぎる値を設定すると実行時間が過大となり,
+                        
                         代入の数が過大となります.
+                        
                         このような場合,
+                        
                         多くの代入に必要な行列の操作の回数が多くなるため,実際の
+                        
                         精度は低下します.
+                        
                         良い値は 0.001 と思われ,これがデフォルト値です.
+                        
                         このデフォルト値は,1より大きいか,0以下の値を指定することにより
+                        
                         選択されます.
+                        
                         この値は,過度な要素数の増加が認められた場合には,
+                        
                         増加させ,行列を決定する必要があります.
+                        
                         ピボット閾値の変更は,要素数の増加が小さい行列においては,
+                        
                         条件が悪い行列において期待されるような性能の改善効果を,
+                        
                         得ることはできません.
+                        
                         reps は, ノードおよび修正ノードアドミタンス行列のような
+                        
                         近似的に対角優位の行列で使用するように選択されています.
+                        
                         これらの行列では,通常は対角ピボット選択を使用するのが最良です.
+                        
                         大きな対角項がない行列の場合は,
+                        
                         通常は0.01または0.1のようなより大きな閾値を使用するのが最善です.
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 a=rand(5,5);b=rand(5,1);A=sparse(a);
 [h,rk]=lufact(A);
 x=lusolve(h,b);a*x-b
 ludel(h)
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="lusolve">lusolve</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="luget">luget</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index c4254b5..c5a2b39 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="luget">
+    
     <refnamediv>
+        
         <refname>luget</refname>
+        
         <refpurpose>疎行列LU分解の展開</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>[P,L,U,Q]=luget(hand)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>hand</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         ハンドル, <literal>lufact</literal>の出力
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>P</term>
+                
                 <listitem>
+                    
                     <para>疎交換行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>L</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         疎行列, lower triangular if <literal>hand</literal>が
+                        
                         正則行列から得られた場合は上三角
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>U</term>
+                
                 <listitem>
+                    
                     <para>正方正則上三角疎行列(主対角項は1)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>Q</term>
+                
                 <listitem>
+                    
                     <para>疎交換行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             疎行列 <literal>A</literal>に関して
+            
             コマンド<literal>[hand,rk]=lufact(A)</literal>により得られた
+            
             <literal>hand</literal>を指定すると,<literal>[P,L,U,Q]=luget(hand)</literal>
+            
             は,<literal>P*L*U*Q=A</literal>となるような4つの疎行列を返します.
+            
         </para>
+        
         <para>
+            
             行列Aはフルランクである必要はありませんが正方行列である必要があります
+            
             (Aは疎行列と仮定されるため,正方化するために必要に応じて0を追加することができます).
+            
         </para>
+        
         <para>
+            
             <literal>A</literal>が正則でない場合,
+            
             行列<literal>L</literal>は(<literal>rk</literal>個の
+            
             独立した非ゼロ列について)列圧縮されます
+            
             正則な疎行列  <literal>Q'*inv(U)</literal> は
+            
             <literal>A</literal>を列圧縮します.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 a=rand(5,2)*rand(2,5);A=sparse(a);
 [hand,rk]=lufact(A);[P,L,U,Q]=luget(hand);
@@ -88,22 +161,42 @@ full(L), P*L*U*Q-A
 clean(P*L*U*Q-A)
 ludel(hand)
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="lusolve">lusolve</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="luget">luget</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="clean">clean</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index ebf79a2..a0befa0 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="lusolve">
+    
     <refnamediv>
+        
         <refname>lusolve</refname>
+        
         <refpurpose>疎な線形システムの解を得る</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>x=lusolve(hand,b)
+            
             x=lusolve(A,b)
+            
         </synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>b</term>
+                
                 <listitem>
+                    
                     <para>通常の実数行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>A</term>
+                
                 <listitem>
+                    
                     <para>可逆な実数正方疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>hand</term>
+                
                 <listitem>
+                    
                     <para>疎行列LU分解を計算した際のハンドル(lufactの出力)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>x</term>
+                
                 <listitem>
+                    
                     <para>通常の実数行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>x=lusolve(hand,b)</literal> は疎な線形システム
+            
             <literal>A*x = b</literal>を解きます.
+            
         </para>
+        
         <para>
+            
             <literal>[hand,rk]=lufact(A)</literal> は lufact の出力です.
+            
         </para>
+        
         <para>
+            
             <literal>x=lusolve(A,b)</literal>は,疎な線形システム
+            
             <literal>A*x = b</literal>を解きます.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 non_zeros=[1,2,3,4];rows_cols=[1,1;2,2;3,3;4,4];
 sp=sparse(rows_cols,non_zeros);
@@ -76,22 +134,42 @@ sp=sparse(rows_cols,non_zeros);
 x=lusolve(sp,-ones(4,1));
 sp*x
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="lufact">lufact</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="slash">slash</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="backslash">backslash</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 337697a..f9369d8 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="spchol">
+    
     <refnamediv>
+        
         <refname>spchol</refname>
+        
         <refpurpose>疎行列コレスキー分解</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>[R,P] = spchol(X)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>X</term>
+                
                 <listitem>
+                    
                     <para>対称正定実疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>P</term>
+                
                 <listitem>
+                    
                     <para>順列行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>R</term>
+                
                 <listitem>
+                    
                     <para>コレスキー分解</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>[R,P] = spchol(X)</literal> は,
+            
             <literal>P*R*R'*P' = X</literal>となるような
+            
             上三角行列<literal>R</literal> を出力します.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
-X=[
-3.,  0.,  0.,  2.,  0.,  0.,  2.,  0.,  2.,  0.,  0. ;
-0.,  5.,  4.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0. ;
-0.,  4.,  5.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0. ;
-2.,  0.,  0.,  3.,  0.,  0.,  2.,  0.,  2.,  0.,  0. ;
-0.,  0.,  0.,  0. , 5.,  0.,  0.,  0.,  0.,  0.,  4. ;
-0.,  0.,  0.,  0.,  0.,  4.,  0.,  3.,  0.,  3.,  0. ;
-2.,  0.,  0.,  2.,  0.,  0.,  3.,  0.,  2.,  0.,  0. ;
-0.,  0.,  0.,  0.,  0.,  3.,  0.,  4.,  0.,  3.,  0. ;
-2.,  0.,  0.,  2.,  0.,  0.,  2.,  0.,  3.,  0.,  0. ;
-0.,  0.,  0.,  0.,  0.,  3.,  0.,  3.,  0.,  4.,  0. ;
+// Factorization:
+Xfull = [
+3.,  0.,  0.,  2.,  0.,  0.,  2.,  0.,  2.,  0.,  0.
+0.,  5.,  4.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.
+0.,  4.,  5.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.
+2.,  0.,  0.,  3.,  0.,  0.,  2.,  0.,  2.,  0.,  0.
+0.,  0.,  0.,  0. , 5.,  0.,  0.,  0.,  0.,  0.,  4.
+0.,  0.,  0.,  0.,  0.,  4.,  0.,  3.,  0.,  3.,  0.
+2.,  0.,  0.,  2.,  0.,  0.,  3.,  0.,  2.,  0.,  0.
+0.,  0.,  0.,  0.,  0.,  3.,  0.,  4.,  0.,  3.,  0.
+2.,  0.,  0.,  2.,  0.,  0.,  2.,  0.,  3.,  0.,  0.
+0.,  0.,  0.,  0.,  0.,  3.,  0.,  3.,  0.,  4.,  0.
 0.,  0.,  0.,  0.,  4.,  0.,  0.,  0.,  0.,  0.,  5.];
-X=sparse(X);[R,P] = spchol(X);
+X = sparse(Xfull);
+
+[R, P] = spchol(X);
 max(P*R*R'*P'-X)
+
+// Factorization and solve with backslash operator:
+Afull = [
+2 -1  0  0  0;
+-1  2 -1  0  0;
+0 -1  2 -1  0;
+0  0 -1  2 -1;
+0  0  0 -1  2
+];
+A = sparse(Afull);
+
+[L, P] = spchol(A);
+max(P*L*L'*P'-A)
+
+n = size(A, "r"); e = (1:n)'; b = A * e;
+x = P*(L'\(L\(P'*b)));
+A*x-b
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="lusolve">lusolve</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="luget">luget</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="chol">chol</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 78be6a8..46bff29 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="gmres">
+    
     <refnamediv>
+        
         <refname>gmres</refname>
+        
         <refpurpose>Generalized Minimum RESidual 法</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>[x,flag,err,iter,res] = gmres(A,b,[rstr,[tol,[maxi,[M,[x0]]]]])</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>A</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         n行n列行列または<literal>A*x</literal>を返す関数.
+                        
                         <literal>A</literal>が関数の場合,以下のようなヘッダを有すること:
+                        
                     </para>
+                    
                     <programlisting role=""><![CDATA[ 
 function y = A ( x )
 ]]></programlisting>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>b</term>
+                
                 <listitem>
+                    
                     <para>右辺ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>x0</term>
+                
                 <listitem>
+                    
                     <para>初期推定値ベクトル(デフォルト: zeros(n,1))</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>M</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         プリコンディショナ: n行n列行列(デフォルト: eye(n,n))または
+                        
                         <literal>M*x</literal>を返す関数.
+                        
                         M が関数の場合,以下のようなヘッダを有すること:
+                        
                     </para>
+                    
                     <programlisting role=""><![CDATA[ 
 function y = M ( x )
  ]]></programlisting>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>rstr</term>
+                
                 <listitem>
+                    
                     <para>リスタートまでの反復回数 (デフォルト: 10)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>maxi</term>
+                
                 <listitem>
+                    
                     <para>最大反復回数 (デフォルト: n)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>tol</term>
+                
                 <listitem>
+                    
                     <para>許容誤差 (デフォルト: 1e-6)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>x</term>
+                
                 <listitem>
+                    
                     <para>解のベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>err</term>
+                
                 <listitem>
+                    
                     <para>最終残差ノルム</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>iter</term>
+                
                 <listitem>
+                    
                     <para>実行した反復回数</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>flag</term>
+                
                 <listitem>
+                    
                     <variablelist>
+                        
                         <varlistentry>
+                            
                             <term>0 =</term>
+                            
                             <listitem>
+                                
                                 <para>
+                                    
                                     <literal>gmres</literal>は,
+                                    
                                     <literal>maxi</literal>回の反復内に
+                                    
                                     指定した許容誤差に収束しました
+                                    
                                 </para>
+                                
                             </listitem>
+                            
                         </varlistentry>
+                        
                         <varlistentry>
+                            
                             <term>1 =</term>
+                            
                             <listitem>
+                                
                                 <para>
+                                    
                                     指定した <literal>maxi</literal>回では収束しませんでした
+                                    
                                 </para>
+                                
                             </listitem>
+                            
                         </varlistentry>
+                        
                     </variablelist>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>res</term>
+                
                 <listitem>
+                    
                     <para>残差ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>GMRES </term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         線形システム<literal>Ax=b</literal>をリスタート付きの
+                        
                         Generalized Minimal residual法により解きます.
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>詳細</term>
+                
                 <listitem>
+                    
                     <para>このアルゴリズムの詳細は以下の文献に記述されています :</para>
+                    
                     <para>"Templates for the Solution of Linear Systems: Building Blocks for
+                        
                         Iterative Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra,
+                        
                         Eijkhout, Pozo, Romine, and Van der Vorst, SIAM Publications, 1993 (ftp
+                        
                         netlib2.cs.utk.edu; cd linalg; get templates.ps).
+                        
                     </para>
+                    
                     <para>"Iterative Methods for Sparse Linear Systems, Second Edition" Saad,
+                        
                         SIAM Publications, 2003 (ftp ftp.cs.umn.edu; cd dept/users/saad/PS; get
+                        
                         all_ps.zip).
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[
        // A および M が行列の場合
 A=[ 94  0   0   0    0   28  0   0   32  0  
@@ -230,16 +377,30 @@ y = M*x;
 endfunction
         [x,flag,err,iter,res] = gmres(Atimesx, b, 10, 1d-12, 20, Mtimesx, zeros(10,1))
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
-                <link linkend="pcg">pcg</link>
+                
+                <link linkend="conjgrad">conjgrad</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="qmr">qmr</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 179351c..bd8f33f 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="pcg" xml:lang="ja">
+    
     <refnamediv>
+        
         <refname>pcg</refname>
+        
         <refpurpose>プリコンディショナ付き共役勾配法</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>[x, flag, err, iter, res] = pcg(A, b [, tol [, maxIter [, M [, M2 [, x0 [, verbose]]]]]])
+            
             [x, flag, err, iter, res] = pcg(A, b [key=value,...])
+            
         </synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>A</term>
+                
                 <term/>
+                
                 <listitem>
+                    
                     <para>
+                        
                         行列, または指定した<literal>x</literal>について
+                        
                         <literal>A*x</literal>を計算する関数またはリスト.
+                        
                         以下にAの型に応じたA*xの計算に関する説明を示します.
+                        
                     </para>
+                    
                     <itemizedlist>
+                        
                         <listitem>
+                            
                             <para>
+                                
                                 <literal>行列.</literal>Aが行列の場合, 通常の行列
+                                
                                 または疎行列とすることができます
+                                
                             </para>
+                            
                         </listitem>
+                        
                         <listitem>
+                            
                             <para>
+                                
                                 <literal>関数.</literal>Aが関数の場合, 
+                                
                                 以下のヘッダーを有する必要があります :
+                                
                             </para>
+                            
                             <programlisting role=""><![CDATA[ 
 function y = A ( x )
  ]]></programlisting>
+                            
                         </listitem>
+                        
                         <listitem>
+                            
                             <para>
+                                
                                 <literal>list.</literal> Aがリストの場合, 
+                                
                                 リストの最初の要素は関数で,リストのその他の
+                                
                                 要素(インデックス2から末尾まで)は関数の引数となります.
+                                
                                 関数がコールされる時,
+                                
                                 xのカレントの値は関数に最初の引数として渡されます.
+                                
                                 他の引数はリストに指定された値です.
+                                
                             </para>
+                            
                         </listitem>
+                        
                     </itemizedlist>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>b</term>
+                
                 <listitem>
+                    
                     <para>右辺ベクトルr (大きさ: nx1)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>tol</term>
+                
                 <listitem>
+                    
                     <para>相対許容誤差 (デフォルト: 1e-8). 
+                        
                         終了条件は残差r=b-Axの2次ノルムを
+                        
                         右辺bの2次ノルムで割った値に基づきます.
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>maxIter</term>
+                
                 <listitem>
+                    
                     <para>反復最大回数 (デフォルト: n)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>M</term>
+                
                 <listitem>
+                    
                     <para>プリコンディショナ: 通常の行列または疎行列または
+                        
                         <literal>M\x</literal>を返す関数 (デフォルト: none)
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>M2</term>
+                
                 <listitem>
+                    
                     <para>プリコンディショナ: 通常の行列または疎行列または
+                        
                         <literal>x</literal>について<literal>M2\x</literal>を返す関数 (デフォルト:
+                        
                         none)
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>x0</term>
+                
                 <listitem>
+                    
                     <para>初期推定ベクトル (デフォルト: zeros(n,1))</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>verbose</term>
+                
                 <listitem>
+                    
                     <para>冗長なログを有効にする場合は1に設定(デフォルト 0)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>x</term>
+                
                 <listitem>
+                    
                     <para>解ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>flag</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         <literal>maxi</literal>回の反復回数内に
+                        
                         <literal>pcg</literal>が指定した
+                        
                         許容誤差に収束する場合に 0, そうでない場合に 1
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>err</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         最終残差相対ノルム (右辺bの2次ノルムが使用されます)
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>iter</term>
+                
                 <listitem>
+                    
                     <para>実行された反復回数</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>res</term>
+                
                 <listitem>
+                    
                     <para>残差相対ノルムのベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             プリコンディショナ有りまたは無しの
+            
             共役勾配法により線形システム<literal>Ax=b</literal>を解きます.
+            
             プリコンディショナは,
+            
             対称正定行列<literal>M</literal>
+            
             または<literal>M=M1*M2</literal>となるような
+            
             2つの行列<literal>M1</literal> および<literal>M2</literal>
+            
             により定義されます.
+            
             この場合,関数は<literal>inv(M)*A*x = inv(M)*b</literal>を
+            
             <literal>x</literal>について解きます.
+            
             <literal>M</literal>, <literal>M1</literal>および
+            
             <literal>M2</literal> は,対応する左除算
+            
             <literal>y=Mi\x</literal>を計算する
+            
             呼び出し手順<literal>y=Milx(x)</literal>を有する
+            
             Scilab関数とすることができます.
+            
         </para>
+        
         <para>
+            
             <literal>A</literal>行列は対称正定行列
+            
             (通常の行列または疎行列)または
+            
             <literal>y=A*x</literal>を計算する
+            
             呼び出し手順<literal>y=Ax(x)</literal>を有する関数と
+            
             する必要があります.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>良好な条件または悪い条件の問題の例</title>
+        
         <para>
+            
             以下の例では,2つの線形システムを解きます.
+            
             最初の行列の条件数は ~0.02 に等しくなり,
+            
             アルゴリズムはちょうど10回の反復で収束します.
+            
             これが行列の大きさの場合,共役勾配法で指定される動作となります.
+            
             後者は,条件数1.d-6に等しくなり,22回の反復で収束します.
+            
             これは,パラメータ maxIterを30に設定する理由です.
+            
             "key=value" 構文のその他の例については以下を参照ください. 
+            
         </para>
+        
         <programlisting role="example"><![CDATA[ 
 //良い条件の例
 A=[ 94  0   0   0    0   28  0   0   32  0  
@@ -216,15 +393,25 @@ A=[ 894     0   0     0   0   28  0   0   1000  70000
 [x, fail, err, iter, res]=pcg(A,b,maxIter=30,tol=1d-12);
 mprintf("      fail=%d, iter=%d, errrel=%e\n",fail,iter,err)
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection>
+        
         <title>Aを疎行列または関数またはリストとして指定する例</title>
+        
         <para>以下の例では,疎行列を同時に処理する方法を示します.
+            
             右辺を計算する関数が "pcg" プリミティブに指定される
+            
             場合も示します.
+            
             この例における最後のケースでは,
+            
             リストがプリミティブに指定される場合です.
+            
         </para>
+        
         <programlisting role="example"><![CDATA[ 
 //良い条件の例
 A=[ 94  0   0   0    0   28  0   0   32  0  
@@ -268,21 +455,37 @@ Alist = list(Atimesxbis,Asparse);
 [x, fail, err, iter, res]=pcg(Alist,b,maxIter=30,tol=1d-12);
 mprintf("      fail=%d, iter=%d, errrel=%e\n",fail,iter,err)
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection>
+        
         <title>key=value構文の例</title>
+        
         <para>
-            以下の例ではkey=value"構文により引数を指定する方法を示します.
+            
+            以下の例では"key=value"構文により引数を指定する方法を示します.
+            
             これにより,位置を固定せずに引数を設定できるようになり,
+            
             引数のリストにおいてその順番に依存せずに引数を設定できます.
+            
             利用可能なキーはオプションの引数の名前で,以下に示します:
+            
             tol, maxIter, %M, %M2, x0, verbose. 
+            
             以下の例では,
+            
             maxIterオプションの前にverboseオプションを指定します.
+            
             "key=value" 構文ではなく,
+            
             位置を指定する引数の場合は,
+            
             maxIterを最初にverboseを後に指定する必要があります.
+            
         </para>
+        
         <programlisting role="example"><![CDATA[ 
 // 引数をkey=value構文で指定する例
 A=[100,1;1,10];
@@ -291,31 +494,90 @@ b=[101;11];
 // key=value構文では, 順番は関係ありません
 [xcomputed, flag, err, iter, res]=pcg(A,b,verbose=1,maxIter=0);
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
+                <link linkend="conjgrad">conjgrad</link>
+                
+            </member>
+            
+            <member>
+                
                 <link linkend="backslash">backslash</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="qmr">qmr</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="gmres">gmres</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>参考文献</title>
+        
         <para>"Templates for the Solution of Linear Systems: Building Blocks for
+            
             Iterative Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra,
+            
             Eijkhout, Pozo, Romine, and Van der Vorst, SIAM Publications, 1993, ftp
+            
             netlib2.cs.utk.edu/linalg/templates.ps
+            
         </para>
+        
         <para>"Iterative Methods for Sparse Linear Systems, Second Edition", Saad,
+            
             SIAM Publications, 2003, ftp
+            
             ftp.cs.umn.edu/dept/users/saad/PS/all_ps.zip
+            
         </para>
+        
+    </refsection>
+    
+    <refsection>
+        
+        <title>履歴</title>
+        
+        <revhistory>
+            
+            <revision>
+                
+                <revnumber>5.5.0</revnumber>
+                
+                <revdescription>
+                    
+                    pcg(A, b, ...) のコールは廃止されました. 
+                    
+                    代わりに conjgrad(A, b, "pcg", ...) を使用してください.
+                    
+                </revdescription>
+                
+            </revision>
+            
+        </revhistory>
+        
     </refsection>
+    
 </refentry>
+
index aab134b..5d5b392 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="qmr">
+    
     <refnamediv>
+        
         <refname>qmr</refname>
+        
         <refpurpose>プリコンディショナ付きのQuasi Minimal Residual法</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>[x,flag,err,iter,res] = qmr(A,b,x0,M1,M1p,M2,M2p,maxi,tol)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
+        
         <title>Parameters</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>A</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         大きさn行n列の行列または<literal>A*x</literal>を返す関数
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>b</term>
+                
                 <listitem>
+                    
                     <para>右辺ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>x0</term>
+                
                 <listitem>
+                    
                     <para>初期推定ベクトル (デフォルト: zeros(n,1))</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>M1</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         左プリコンディショナ: 行列または<literal>M1*x</literal>を返す関数
+                        
                         (前者のデフォルト値: eye(n,n))
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>M1p</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         <literal>M1</literal>が関数の場合のみ指定する
+                        
                         必要があります. この場合, <literal>M1p</literal> は
+                        
                         <literal>M1'*x</literal>を返す関数です.
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>M2</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         右プリコンディショナ: 行列または<literal>M2*x</literal>を
+                        
                         返す関数 (前者のデフォルト値: eye(n,n))
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>M2p</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         <literal>M2</literal>が関数の場合のみ指定する
+                        
                         必要があります. この場合, 
+                        
                         <literal>M2p</literal>は<literal>M2'*x</literal>を返す関数です.
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>maxi</term>
+                
                 <listitem>
+                    
                     <para>最大反復回数 (デフォルト: n)
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>tol</term>
+                
                 <listitem>
+                    
                     <para>許容誤差 (デフォルト: 1000*%eps)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>x</term>
+                
                 <listitem>
+                    
                     <para>解ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>flag</term>
+                
                 <listitem>
+                    
                     <variablelist>
+                        
                         <varlistentry>
+                            
                             <term>0 =</term>
+                            
                             <listitem>
+                                
                                 <para>
+                                    
                                     <literal>gmres</literal> は
+                                    
                                     <literal>maxi</literal>回の反復の間に
+                                    
                                     許容誤差内に収束しました
+                                    
                                 </para>
+                                
                             </listitem>
+                            
                         </varlistentry>
+                        
                         <varlistentry>
+                            
                             <term>1 =</term>
+                            
                             <listitem>
+                                
                                 <para>
+                                    
                                     指定した<literal>maxi</literal>回の反復の間に
+                                    
                                     収束しませんでした
+                                    
                                 </para>
+                                
                             </listitem>
+                            
                         </varlistentry>
+                        
                     </variablelist>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>res</term>
+                
                 <listitem>
+                    
                     <para>残差ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>err</term>
+                
                 <listitem>
+                    
                     <para>最終残差ノルム</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>iter</term>
+                
                 <listitem>
+                    
                     <para>実行した反復回数</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             プリコンディショナ付きのQuasi Minimal Residual法により,
+            
             線形システム<literal>Ax=b</literal>を解きます. 
+            
         </para>
+        
     </refsection>
+    
+    <refsection>
+        
+        <title>例</title>
+        
+        <programlisting role="example"><![CDATA[
+       // If A is a matrix
+A=[ 94  0   0   0    0   28  0   0   32  0
+     0   59  13  5    0   0   0   10  0   0
+     0   13  72  34   2   0   0   0   0   65
+     0   5   34  114  0   0   0   0   0   55
+     0   0   2   0    70  0   28  32  12  0
+     28  0   0   0    0   87  20  0   33  0
+     0   0   0   0    28  20  71  39  0   0
+     0   10  0   0    32  0   39  46  8   0
+     32  0   0   0    12  33  0   8   82  11
+     0   0   65  55   0   0   0   0   11  100];
+b=ones(10,1);
+[x,flag,err,iter,res] = qmr(A, b)
+
+[x,flag,err,iter,res] = qmr(A, b, zeros(10,1), eye(10,10), eye(10,10), 10, 1d-12)
+
+       // If A is a function
+       function y = Atimesx(x,t)
+       A=[ 94  0   0   0    0   28  0   0   32  0
+     0   59  13  5    0   0   0   10  0   0
+     0   13  72  34   2   0   0   0   0   65
+     0   5   34  114  0   0   0   0   0   55
+     0   0   2   0    70  0   28  32  12  0
+     28  0   0   0    0   87  20  0   33  0
+     0   0   0   0    28  20  71  39  0   0
+     0   10  0   0    32  0   39  46  8   0
+     32  0   0   0    12  33  0   8   82  11
+     0   0   65  55   0   0   0   0   11  100];
+        if (t == 'notransp') then
+        y = A*x;
+    elseif (t ==  'transp') then
+        y = A'*x;
+    end
+       endfunction
+
+        [x,flag,err,iter,res] = qmr(Atimesx, b)
+
+        [x,flag,err,iter,res] = qmr(Atimesx, b, zeros(10,1), eye(10,10), eye(10,10), 10, 1d-12)
+
+        // OR
+
+        function y = funA(x)
+       A = [ 94  0   0   0    0   28  0   0   32  0
+     0   59  13  5    0   0   0   10  0   0
+     0   13  72  34   2   0   0   0   0   65
+     0   5   34  114  0   0   0   0   0   55
+     0   0   2   0    70  0   28  32  12  0
+     28  0   0   0    0   87  20  0   33  0
+     0   0   0   0    28  20  71  39  0   0
+     0   10  0   0    32  0   39  46  8   0
+     32  0   0   0    12  33  0   8   82  11
+     0   0   65  55   0   0   0   0   11  100];
+        y = A*x
+       endfunction
+
+        function y = funAp(x)
+       A = [ 94  0   0   0    0   28  0   0   32  0
+     0   59  13  5    0   0   0   10  0   0
+     0   13  72  34   2   0   0   0   0   65
+     0   5   34  114  0   0   0   0   0   55
+     0   0   2   0    70  0   28  32  12  0
+     28  0   0   0    0   87  20  0   33  0
+     0   0   0   0    28  20  71  39  0   0
+     0   10  0   0    32  0   39  46  8   0
+     32  0   0   0    12  33  0   8   82  11
+     0   0   65  55   0   0   0   0   11  100];
+        y = A'*x
+       endfunction
+
+        [x,flag,err,iter,res] = qmr(funA, funAp, b)
+
+        [x,flag,err,iter,res] = qmr(funA, funAp, b, zeros(10,1), eye(10,10), eye(10,10), 10, 1d-12)
+
+        // If A is a matrix, M1 and M2 are functions
+        function y = M1timesx(x,t)
+        M1 = eye(10,10);
+    if(t=="notransp") then
+        y = M1*x;
+    elseif (t=="transp") then
+        y = M1'*x;
+    end
+       endfunction
+
+       function y = M2timesx(x,t)
+        M2 = eye(10,10);
+    if(t=="notransp") then
+        y = M2*x;
+    elseif (t=="transp") then
+        y = M2'*x;
+    end
+       endfunction
+
+       [x,flag,err,iter,res] = qmr(A, b, zeros(10,1), M1timesx, M2timesx, 10, 1d-12)
+
+       // OR
+
+       function y = funM1(x)
+       M1 = eye(10,10);
+       y = M1*x;
+       endfunction
+
+       function y = funM1p(x)
+       M1 = eye(10,10);
+       y = M1'*x;
+       endfunction
+
+       function y = funM2(x)
+       M2 = eye(10,10);
+       y = M2*x;
+       endfunction
+
+       function y = funM2p(x)
+       M2 = eye(10,10);
+       y = M2'*x;
+       endfunction
+
+       [x,flag,err,iter,res] = qmr(A, b, zeros(10,1), funM1, funM1p, funM2, funM2p, 10, 1d-12)
+
+       // If A, M1, M2 are functions
+       [x,flag,err,iter,res] = qmr(funA, funAp, b, zeros(10,1), funM1, funM1p, funM2, funM2p, 10, 1d-12)
+       [x,flag,err,iter,res] = qmr(Atimesx, b, zeros(10,1), M1timesx, M2timesx, 10, 1d-12)
+
+ ]]></programlisting>
+        
+    </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="gmres">gmres</link>
+                
+            </member>
+            
+            <member>
+                
+                <link linkend="conjgrad">conjgrad</link>
+                
             </member>
+            
         </simplelist>
+        
+    </refsection>
+    
+    <refsection>
+        
+        <title>履歴</title>
+        
+        <revhistory>
+            
+            <revision>
+                
+                <revnumber>5.4.0</revnumber>
+                
+                <revdescription>
+                    
+                    qmr(A, Ap) のコールは廃止されました. 
+                    
+                    qmr(A) を代わりに使用してください. 
+                    
+                    以下の関数が例となります :
+                    
+                    <programlisting role=""><![CDATA[
+function y = A ( x, t )
+Amat = eye(2,2);
+if ( t== "notransp") then
+y = Amat*x;
+elseif (t == "transp") then
+y = Amat'*x;
+end
+endfunction
+ ]]></programlisting>
+                    
+                </revdescription>
+                
+            </revision>
+            
+        </revhistory>
+        
     </refsection>
+    
 </refentry>
+
index 5766315..c0826a9 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="nnz">
+    
     <refnamediv>
+        
         <refname>nnz</refname>
+        
         <refpurpose>行列における非ゼロ要素の数</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>n=nnz(X)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>X</term>
+                
                 <listitem>
+                    
                     <para>実数または複素疎(または通常)行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>n</term>
+                
                 <listitem>
+                    
                     <para>整数, Xの非ゼロ要素の数</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>nnz</literal> は疎行列または通常の行列における
+            
             非ゼロ要素の数を数えます.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 sp=sparse([1,2;4,5;3,10],[1,2,3]);
 nnz(sp)
 a=[1 0 0 0 2];
 nnz(a)
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="spget">spget</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 4dcbd03..b224401 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="speye" xml:lang="ja">
+    
     <refnamediv>
+        
         <refname>speye</refname>
+        
         <refpurpose>疎単位行列</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>Isp=speye(nrows,ncols)
+            
             Isp=speye(A)
+            
         </synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>nrows</term>
+                
                 <listitem>
+                    
                     <para>整数 (行数)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>ncols</term>
+                
                 <listitem>
+                    
                     <para>整数 (列数)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>A</term>
+                
                 <listitem>
+                    
                     <para>疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>sp</term>
+                
                 <listitem>
+                    
                     <para>疎単位行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>Isp=speye(nrows,ncols)</literal> は,
+            
             <literal>nrows</literal> 行,
+            
             <literal>ncols</literal> 列の
+            
             疎単位行列<literal>Isp</literal>を返します.
+            
             (非正方行列は主対角項に1を有します).
+            
         </para>
+        
         <para>
+            
             <literal>Isp=speye(A)</literal>は<literal>A</literal>と
+            
             同じ次元の疎単位行列を返します.
+            
             <literal>[m,n]=size(A)</literal>の場合, <literal>speye(m,n)</literal> および
+            
             <literal>speye(A)</literal>は等価です. なお,
+            
             <literal>speye(3)</literal> は
+            
             <literal>speye(3,3)</literal>と等価ではありません.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 eye(3,3)-full(speye(3,3))
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="full">full</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="eye">eye</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spzeros">spzeros</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spones">spones</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 1afcdde..64971b9 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="spones" xml:lang="ja">
+    
     <refnamediv>
+        
         <refname>spones</refname>
+        
         <refpurpose>疎行列</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>sp=spones(A)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>A</term>
+                
                 <listitem>
+                    
                     <para>疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>sp</term>
+                
                 <listitem>
+                    
                     <para>疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>sp=spones(A)</literal> は
+            
             <literal>A</literal>と同じ疎構造を有し
+            
             その非ゼロ要素の位置に1を有する,行列を生成します.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 A=sprand(10,12,0.1);
 sp=spones(A)
 B = A~=0
 bool2s(B)
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="full">full</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="eye">eye</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="speye">speye</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spzeros">spzeros</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 7055f45..6aacb19 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="sprand" xml:lang="ja">
+    
     <refnamediv>
+        
         <refname>sprand</refname>
+        
         <refpurpose>ランダム疎行列</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>sp=sprand(nrows,ncols,density [,typ])</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>nrows</term>
+                
                 <listitem>
+                    
                     <para>整数 (行数)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>ncols</term>
+                
                 <listitem>
+                    
                     <para>整数 (列数)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>density</term>
+                
                 <listitem>
+                    
                     <para>占有率 (密度)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>typ</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         文字列, <literal>"uniform"</literal> (デフォルト) または
+                        
                         <literal>"normal"</literal>
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>sp</term>
+                
                 <listitem>
+                    
                     <para>疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>sp=sprand(nrows,ncols,density)</literal> は,
+            
             <literal>nrows</literal> 行<literal>ncols</literal>列,
+            
             近似的に<literal>density*nrows*ncols</literal>個の非ゼロ
+            
             エントリを有する疎行列<literal>sp</literal>を返します.
+            
         </para>
+        
         <para>
+            
             <literal>density</literal>パラメータは
+            
             <literal>[0,1]</literal> の範囲で指定されます.
+            
             そうでない場合,
+            
             自動的にこの範囲に変換されます.
+            
             このため, 0 より小さいか 1より大きい density を使用しても,
+            
             エラーも警告も発生しません:
+            
             式<literal>density=max(min(density,1),0)</literal>が使用されます.
+            
         </para>
+        
         <para>
+            
             <literal>typ="uniform"</literal>の場合, 一様分布の
+            
             値 [0,1]が生成されます.
+            
             <literal>typ="normal"</literal> の場合,正規分布の
+            
             値が生成されます (平均=0 および標準偏差=1).
+            
         </para>
+        
         <para>
+            
             出力行列のエントリは指定された分布関数<literal>typ</literal>に
+            
             基づき計算されます.
+            
             非ゼロ要素のインデックスはランダムに計算され,
+            
             非ゼロの平均的な数は<literal>density</literal>となります.
+            
             実際のインデックスの値は,指数分布関数により計算されます.
+            
             ただし,分布関数のパラメータは同時に計算されます.
+            
         </para>
-        <para>
-            副作用として,<literal>rand</literal>および
-            <literal>grand</literal>ランダム数値生成器の状態はこの関数により修正されます.
-            非ゼロエントリのインデックスは指数分布関数およびgrand関数から計算されます.
-            行列の値はユーザーにより指定される分布関数(すなわち uniform または normal)
-            およびrand関数から計算されます.
-        </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <para>
+            
             以下の例では,近似的に密度0.001の
+            
             100x1000疎行列を生成します.
+            
             すなわち,およそ 100*1000*0.001=100個の非ゼロエントリとなります.
+            
         </para>
+        
         <programlisting role="example"><![CDATA[  
 // 行列のエントリは一様分布となります.
 W=sprand(100,1000,0.001);
 // 行列のエントリは正規分布となります.
 W=sprand(100,1000,0.001,"normal");
  ]]></programlisting>
+        
         <para>
+            
             以下のスクリプトは,
+            
             行列のエントリが指定した分布を有することを確認します.
+            
             非ゼロエントリを取得するためにspget関数を用います.
+            
             次に,エントリの最小値,最大値,平均を計算し,
+            
             limit値と比較します.
+            
         </para>
+        
         <programlisting role="example"><![CDATA[  
 typ = "normal"; 
 // typ = "uniform";
@@ -130,23 +219,41 @@ nnzs=nnz(s);
 [nnzs min(v) mean(v) max(v) variance(v)]
 [%inf 0 0.5 1 1/12] // Limit values for "uniform"
  ]]></programlisting>
+        
         <para>
+            
             以下のスクリプトでは,ランダムに選択したエントリのインデックスを調べ,
+            
             正しい分布を有することを確認します.
+            
             一様分布の<literal>kmax</literal>ランダム疎行列を生成します.
+            
             ここで,各行列について,生成する非ゼロのエントリのインデックスについて
+            
             考えます.
+            
             すなわち, 
+            
             <literal>i=1,2,...,nrows</literal>
+            
             および <literal>j=1,2,...,ncols</literal>rとなる
+            
             各<literal>i</literal> および <literal>j</literal>について
+            
             イベント <literal>Aij = {エントリ (i,j) が非ゼロ}</literal>
+            
             が発生するかどうかを調べます.
+            
             行列<literal>C(i,j)</literal>はイベント<literal>Aij</literal>
+            
             が発生する回数を保存します.
+            
             行列 <literal>R(k)</literal> は,<literal>k=1,2,...,kmax</literal>
+            
             について試行回数<literal>k</literal>の実際の密度を保存します.
+            
         </para>
+        
         <programlisting role="example"><![CDATA[
     kmax = 1000;
     ncols=10;
@@ -163,11 +270,17 @@ nnzs=nnz(s);
       C(NZ)=C(NZ)+1;
     end
  ]]></programlisting>
+        
         <para>
+            
             このアルゴリズムが実行される場合(時々必要となる可能性があります),
+            
             アルゴリズムが正しく実行されていることを確認するために
+            
             要素の統計値を計算することができます.
+            
         </para>
+        
         <programlisting role="no-scilab-exec"><![CDATA[
   // A_ijの期待値は
   density * kmax
@@ -178,22 +291,42 @@ nnzs=nnz(s);
   // 密度は密度の期待値に近くなります
   [density mean(R)]
   ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="full">full</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="rand">rand</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="speye">speye</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 8512abc..6095241 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2011 - DIGITEO - Michael Baudin
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="ordmmd" xml:lang="ja">
+    
     <refnamediv>
+        
         <refname>ordmmd</refname>
+        
         <refpurpose>
-            複数の最小次元規則配列を計算する
+            
+            複数の最小次元順序付けを計算する
+            
         </refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>
+            
             [perm,invp,nofsub]=ordmmd(xadj,iadj,n)
+            
         </synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
+        
         <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>n</term>
+                
                 <listitem>
+                    
                     <para>double、整数値の1行1列の行列,方程式の数</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>xadj</term>
+                
                 <listitem>
+                    
                     <para>double、整数値の(n+1)行1列の行列,Aの行へのポインタ</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>iadj</term>
+                
                 <listitem>
+                    
                     <para>double、整数値のnnz行1列の行列,Aの行添字</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>perm</term>
+                
                 <listitem>
+                    
                     <para>double、整数値のn行1列の行列,最小次元規則配列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>invp</term>
+                
                 <listitem>
+                    
                     <para>double、整数値のn行1列の行列,permの逆行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>nofsub</term>
+                
                 <listitem>
+                    
                     <para>
+                        
                         double、整数値の1行1列の行列,圧縮記憶方式における非ゼロ要素の数の上限
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
-            コレスキー分解を適用する前に対称疎行列の行および列を交換する際に最小次元アルゴリズムが使用されます.
+            
+            コレスキー分解を適用する前に対称疎行列の行および列を交換する際に
+            
+            最小次元アルゴリズムが使用されます.
+            
             このアルゴリズムはコレスキー分解の非ゼロ要素の数を減らします.
+            
         </para>
+        
         <para>
+            
             n行n列の実対称疎行列<literal>A</literal>を指定すると,
+            
             このコレスキー分解 <literal>U</literal> は,通常,
+            
             <literal>A</literal>の上三角要素よりも非ゼロ要素が多くなる
+            
             "塗りつぶし(fill in)"に苦しめられます.
-            行列<literal>P'*A*P</literal>が同じく対称で,そのコレスキー分解の非ゼロ要素の数が最小となる
+            
+            行列<literal>P'*A*P</literal>が同じく対称で,
+            
+            そのコレスキー分解の非ゼロ要素の数が最小となる
+            
             交換行列 <literal>P</literal>を探します.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <para>
-            以下の例では,対称疎行列の規則配列を計算します.
+            
+            以下の例では,対称疎行列の順序付けを計算します.
+            
             隣接構造体を計算する際に<literal>sp2adj</literal> を使用します.
+            
         </para>
+        
         <programlisting role="example"><![CDATA[ 
 A = [
 4. 1. 2. 0.5 2.
@@ -100,10 +183,17 @@ A = sparse(A);
 n = size(A,"r");
 [perm,invp,nofsub]=ordmmd(xadj,iadj,n)
  ]]></programlisting>
+        
         <para>
-            以下の例では,対称疎行列の規則配列を計算します.
-            <literal>invp</literal>が<literal>perm</literal>の逆行列であることを確認します.
+            
+            以下の例では,対称疎行列の順序付けを計算します.
+            
+            <literal>invp</literal>が<literal>perm</literal>の
+            
+            逆行列であることを確認します.
+            
         </para>
+        
         <programlisting role="example"><![CDATA[ 
     A = [
     0.,  0.,  0.,  2.,  0.,  0.,  2.,  0.,  2.,  0.,  0. ;
@@ -123,13 +213,21 @@ n = size(A,"r");
     [perm,invp,nofsub]=ordmmd(xadj,adjncy,n);
     perm(invp) 
  ]]></programlisting>
+        
         <para>
+            
             以下の例では, 行列<literal>A</literal>と行列<literal>P'*A*P</literal>
+            
             のコレスキー分解の疎パターンを計算します.
+            
             "Computer Solution of Large Sparse Positive Definite Systems"のp.3 "Chapter 1: Introduction"を参照.
+            
             コレスキー分解の非ゼロ要素の数は15,一方,行列<literal>P'*A*P</literal>のコレスキー分解は
+            
             9個の非ゼロ要素を有することがわかります.
+            
         </para>
+        
         <programlisting role="example"><![CDATA[ 
 A = [
 4. 1. 2. 0.5 2.
@@ -161,40 +259,130 @@ subplot(2,1,2);
 PlotSparse(U,"x");
 xtitle("Sparsity pattern of U, such that P''*A*P=U''*U");
  ]]></programlisting>
+        
+        <scilab:image localized="true">
+            
+            A = [
+            
+            4. 1. 2. 0.5 2.
+            
+            1. 0.5 0. 0. 0.
+            
+            2. 0. 3. 0. 0.
+            
+            0.5 0. 0. 0.625 0.
+            
+            2. 0. 0. 0. 16.
+            
+            ];
+            
+            A = sparse(A);
+            
+            U = sparse(chol(full(A)));
+            
+            scf();
+            
+            subplot(2,1,1);
+            
+            PlotSparse(U,"x");
+            
+            xtitle("Sparsity pattern of U, such that A=U''*U");
+            
+            [xadj,iadj,val]=sp2adj(A);
+            
+            n = size(A,"r");
+            
+            [perm,invp,nofsub]=ordmmd(xadj,iadj,n);
+            
+            P=spzeros(n,n);
+            
+            for i=1:n
+            
+            P(perm(i),i)=1;
+            
+            end
+            
+            U = sparse(chol(full(P'*A*P)));
+            
+            subplot(2,1,2);
+            
+            PlotSparse(U,"x");
+            
+            xtitle("Sparsity pattern of U, such that P''*A*P=U''*U");
+            
+        </scilab:image>
+        
     </refsection>
+    
     <refsection>
+        
         <title>実装に関する注記</title>
+        
         <para>
+            
             この関数はMathematical Sciences Section, Oak Ridge National Laboratoryの
+            
             Esmond G. Ng および Barry W. Peytonによる
+            
             ソースコード "ordmmd.f",に基づいています.
+            
             アルゴリズムはSPARSPAKライブラリのJoseph W.H. Liuによる genmmdルーチンに基づいています.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>参考文献</title>
+        
         <para>
+            
             "Minimum degree algorithm", Wikipedia contributors, Wikipedia, The Free Encyclopedia. http://en.wikipedia.org/wiki/Minimum_degree_algorithm
+            
         </para>
+        
         <para>
+            
             "A new release of SPARSPAK: the Waterloo sparse matrix package", Alan George and Esmond Ng. 1984. SIGNUM Newsl. 19, 4 (October 1984), 9-13.
+            
         </para>
+        
         <para>
+            
             "Computer Solution of Large Sparse Positive Definite Systems" by Alan George and Joseph Liu, Prentice-Hall, Inc. Englewood Cliffs, New Jersey, 1981
+            
         </para>
+        
         <para>
+            
             "Implementation of Lipsol in Scilab", Rubio Scola, 1997, INRIA, No 0215
+            
         </para>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sp2adj">sp2adj</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spchol">spchol</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 9e134a7..816ab53 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="adj2sp" xml:lang="ja">
+    
     <refnamediv>
+        
         <refname>adj2sp</refname>
+        
         <refpurpose>隣接形式を疎行列に変換.</refpurpose>
+        
     </refnamediv>
+    
+    <refsynopsisdiv>
+        
+        <title>呼び出し手順</title>
+        
+        <synopsis>
+            
+            A=adj2sp(xadj,iadj,v)
+            
+            A=adj2sp(xadj,iadj,v,mn)
+            
+        </synopsis>
+        
+    </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>xadj</term>
+                
                 <listitem>
-                    <para>長さ (n+1)の整数ベクトル.</para>
+                    
+                    <para>
+                        
+                        長さ (n+1)の整数ベクトル.
+                        
+                        <literal>j=1:n</literal>の場合,
+                        
+                        浮動小数点整数
+                        
+                        <literal>xadj(j+1)-xadj(j)</literal> は
+                        
+                        j列における非ゼロエントリの数です.
+                        
+                    </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
-                <term>adjncy</term>
+                
+                <term>iadj</term>
+                
                 <listitem>
-                    <para>anzの要素に対応する行添え字を含む長さ nz の整数ベクトル</para>
+                    
+                    <para>
+                        
+                        nz行1列の浮動小数点整数の行列, 非ゼロエントリの行添字.
+                        
+                        <literal>j=1:n</literal>および, 
+                        
+                        <literal>k = xadj(j):xadj(j+1)-1</literal>に関して, 
+                        
+                        浮動小数点整数 <literal>i = iadj(k)</literal> は
+                        
+                        非ゼロエントリ #k の行添字です.
+                        
+                    </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
-                <term>anz</term>
+                
+                <term>v</term>
+                
                 <listitem>
-                    <para>Aの非ゼロ要素を有する長さ nzの列ベクトル</para>
+                    
+                    <para>
+                        
+                        nz行1列の浮動小数点整数の行列, Aの非ゼロエントリ.
+                        
+                        <literal>j=1:n</literal>および, 
+                        
+                        <literal>k = xadj(j):xadj(j+1)-1</literal>に関して, 
+                        
+                        浮動小数点整数<literal>Aij = v(k)</literal>は
+                        
+                        非ゼロエントリ #k の値です.
+                        
+                    </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>mn</term>
+                
                 <listitem>
+                    
                     <para>
-                        2つのエントリを有する行ベクトル, <literal>mn=size(A)</literal>
-                        (optional).
+                        
+                        1行2列または2行1列の浮動小数点整数の行列(オプション),
+                        
+                        <literal>mn(1)</literal> はAの行数,
+                        
+                        <literal>mn(2)</literal> はAの列数です.
+                        
+                        <literal>mn</literal> が指定されない場合, 
+                        
+                        <literal>mn=[m,n]</literal> は,
+                        
+                        <literal>m=max(iadj)</literal> および
+                        
+                        <literal>n=size(xadj,"*")-1</literal>がデフォルトとなります.
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>A</term>
+                
                 <listitem>
-                    <para>実数または複素数の疎行列 (nz 個の非ゼロエントリ)</para>
+                    
+                    <para>m行n列実数または複素数の疎行列 (nz 個の非ゼロエントリ)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
-        <programlisting role=""><![CDATA[ 
-sp2adj は行列の隣接表現形式を標準的な Scilab 表現に変換します
-(ユーティリティ関数).
-xadj, adjncy, anz = Aの隣接表現 すなわち:
- ]]></programlisting>
+        
         <para>
-            <literal>xadj(j+1)-xadj(j)</literal> = j行目の
-            非ゼロ円取りの数.
-            <literal>adjncy</literal> = 
-            行 1, 行 2,..., 行 nの非ゼロエントリの非ゼロエントリの列添え字.
-            <literal>anz</literal> = 行 1, 行 2,..., 行 nの非ゼロ円取りの値.
-            <literal>xadj</literal> は 大きさ n+1 の(列)ベクトル,
-            <literal>adjncy</literal>は大きさ<literal>nz=nnz(A)</literal>の
-            整数(列)ベクトルです.
-            <literal>anz</literal> は,<literal>nz=nnz(A)</literal>の大きさ実数ベクトルです.
+            
+            adj2sp は,隣接形式を疎行列に変換します.
+            
+            隣接形式の値は列毎に保存されています.
+            
+            これは,この形式がしばしば
+            
+            "Compressed sparse column" または CSCと呼ばれる理由です.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
-        <programlisting role="example"><![CDATA[ 
-A = sprand(100,50,.05);
-[xadj,adjncy,anz]= sp2adj(A);
-[n,m] = size(A);
-p = adj2sp(xadj,adjncy,anz,[n,m]);
-A-p
+        
+        <para>
+            
+            以下の例では,隣接形式から疎行列を作成します.
+            
+            その後,期待した疎行列と一致するかどうかを確認します.
+            
+        </para>
+        
+        <programlisting role="example"><![CDATA[
+xadj = [1 3 4 7 9 11]';
+iadj = [3 5 3 1 2 4 3 5 1 4]';
+v = [1 2 3 4 5 6 7 8 9 10]';
+B=adj2sp(xadj,iadj,v)
+A = [
+0 0 4 0 9
+0 0 5 0 0
+1 3 0 7 0
+0 0 6 0 10
+2 0 0 8 0
+];
+C=sparse(A)
+and(B==C)
+ ]]></programlisting>
+        
+        <para>
+            
+            以下の例では,隣接形式から疎行列を作成します.
+            
+            その後,期待した疎行列と一致するかどうかを確認します.
+            
+        </para>
+        
+        <programlisting role="example"><![CDATA[
+xadj = [1 2 3 4 5 5 6 6 7 8 9]';
+iadj = [2 5 2 3 1 2 7 6]';
+v = [3 7 5 3 6 5 2 3]';
+C=adj2sp(xadj,iadj,v)
+A = [
+0 0 0 0 0 6 0 0 0 0
+3 0 5 0 0 0 0 5 0 0
+0 0 0 3 0 0 0 0 0 0
+0 0 0 0 0 0 0 0 0 0
+0 7 0 0 0 0 0 0 0 0
+0 0 0 0 0 0 0 0 0 3
+0 0 0 0 0 0 0 0 2 0
+];
+B=sparse(A)
+and(B==C)
+ ]]></programlisting>
+        
+        <para>
+            
+            以下の例では,mnパラメータの使用法を確認します.
+            
+            mnパラメータとxadjおよびiadjの実際の内容の整合性をadj2spで確認します.
+            
+        </para>
+        
+        <programlisting role="example"><![CDATA[
+xadj = [1 2 3 4 5 5 6 6 7 8 9]';
+iadj = [2 5 2 3 1 2 7 6]';
+v = [3 7 5 3 6 5 2 3]';
+mn=[7 10];
+C=adj2sp(xadj,iadj,v,mn)
+ ]]></programlisting>
+        
+        <para>
+            
+            以下の例では,3行3列の疎行列を作成します.
+            
+            この例は, SciPyの文書からの引用です.
+            
+        </para>
+        
+        <programlisting role="example"><![CDATA[
+xadj =  [1,3,4,7]
+iadj =  [1,3,3,1,2,3]
+v = [1,2,3,4,5,6]
+full(adj2sp(xadj,iadj,v))
+ ]]></programlisting>
+        
+        <para>
+            
+            前のスクリプトは以下の出力を生成します.
+            
+        </para>
+        
+        <programlisting role="no-scilab-exec"><![CDATA[
+-->full(adj2sp(xadj,iadj,v))
+ ans  =
+    1.    0.    4.
+    0.    0.    5.
+    2.    3.    6.
+ ]]></programlisting>
+        
+        <para>
+            
+            以下の例では,sp2adjおよびadj2sp関数が逆関数であることを
+            
+            確認します.
+            
+        </para>
+        
+        <programlisting role="example"><![CDATA[
+// Templates for the Solution of Algebraic Eigenvalue Problems: a Practical Guide
+// Edited by Zhaojun Bai, James Demmel, Jack Dongarra, Axel Ruhe, and Henk van der Vorst
+// "Sparse Matrix Storage Formats", J. Dongarra
+// http://web.eecs.utk.edu/~dongarra/etemplates/book.html
+
+A = [
+10 0 0 0 -2 0
+3 9 0 0 0 3
+0 7 8 7 0 0
+3 0 8 7 5 0
+0 8 0 9 9 13
+0 4 0 0 2 -1
+];
+A = sparse(A)
+
+// To get the Compressed Sparse Column (CSC) :
+[col_ptr,row_ind,val]=sp2adj(A)
+// To convert back to sparse:
+AAsp=adj2sp(col_ptr,row_ind,val)
+// Check the conversion
+AAsp - A
+
+// To get the Compressed Sparse Row (CSR) :
+[row_ptr,col_ind,val]=sp2adj(A')
+// To convert back to sparse:
+AAsp=adj2sp(row_ptr,col_ind,val)'
+// Check the conversion
+AAsp - A
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sp2adj">sp2adj</link>
+                
             </member>
+            
             <member>
+                
+                <link linkend="sparse">sparse</link>
+                
+            </member>
+            
+            <member>
+                
                 <link linkend="spcompack">spcompack</link>
+                
             </member>
+            
+            <member>
+                
+                <link linkend="spget">spget</link>
+                
+            </member>
+            
         </simplelist>
+        
+    </refsection>
+    
+    <refsection>
+        
+        <title>参考文献</title>
+        
+        <para>
+            
+            "Implementation of Lipsol in Scilab", Hector E. Rubio Scola, INRIA, Decembre 1997, Rapport Technique No 0215
+            
+        </para>
+        
+        <para>
+            
+            "Solving Large Linear Optimization Problems with Scilab : Application to Multicommodity Problems", Hector E. Rubio Scola, Janvier 1999, Rapport Technique No 0227
+            
+        </para>
+        
+        <para>
+            
+            "Toolbox Scilab : Detection signal design for failure detection and isolation for linear dynamic systems User's Guide", Hector E. Rubio Scola, 2000, Rapport Technique No 0241
+            
+        </para>
+        
+        <para>
+            
+            "Computer Solution of Large Sparse Positive Definite Systems", A. George, Prentice-Hall, Inc. Englewood Cliffs, New Jersey, 1981.
+            
+        </para>
+        
     </refsection>
+    
 </refentry>
+
index cb0cc62..753d84d 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="full">
+    
     <refnamediv>
+        
         <refname>full</refname>
+        
         <refpurpose>疎行列を通常の行列に変換する</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>X=full(sp)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>sp</term>
+                
                 <listitem>
+                    
                     <para>実数または複素数の疎(または通常の)行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>X</term>
+                
                 <listitem>
+                    
                     <para>通常の行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>X=full(sp)</literal> は疎行列 <literal>sp</literal> を
+            
             通常の行列表現に変換します.
+            
             (<literal>sp</literal> が既に通常の行列の場合,<literal>X</literal> は
+            
             <literal>sp</literal>に等しくなります).
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 sp=sparse([1,2;5,4;3,1],[1,2,3]);
 A=full(sp)
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="sprand">sprand</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="speye">speye</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 1ef30d7..a1a2611 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="mtlb_sparse">
+    
     <refnamediv>
+        
         <refname>mtlb_sparse</refname>
+        
         <refpurpose>疎行列に変換</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>Y=mtlb_sparse(X)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>Pパラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>X</term>
+                
                 <listitem>
+                    
                     <para>疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>Y</term>
+                
                 <listitem>
+                    
                     <para>Matlab形式の疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>せつ</title>
+        
         <para>
+            
             <literal>Y=mtlb_sparse(X)</literal> は
+            
             Scilab疎行列<literal>X</literal>をMatlab形式に変換する際に
+            
             使用されます.
+            
             <literal>Y</literal> は7型の変数,すなわち,
+            
             <literal>type(Y)</literal>は7となります.
+            
             この関数は, mexfilesで使用されます (疎行列を含むMatlab mexileはScilab疎行列を
+            
             この形式に変換した場合のみ使用できます).
+            
             関数<literal>full</literal> および <literal>spget</literal>はこの形式でも
+            
             動作します.
+            
         </para>
+        
         <para>
+            
             この形式を用いるその他の処理および関数は,
+            
             接頭辞 "%msp" を用いて
+            
             Scilab関数によりオーバーロードすることができます.
+            
             例えば,関数
+            
             <literal>%msp_p(x)</literal> (SCIDIR/macros/percent ディレクトリ参照)は
+            
             このような"7型"オブジェクトを表示する際に使用されます.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 X=sparse(rand(2,2)); Y=mtlb_sparse(X);
 Y, full(Y), [ij,v,mn]=spget(Y)
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="full">full</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spget">spget</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index ca68288..0f0e779 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="sp2adj" xml:lang="ja">
+    
     <refnamediv>
+        
         <refname>sp2adj</refname>
+        
         <refpurpose>疎行列を隣接形式に変換する</refpurpose>
+        
     </refnamediv>
+    
+    <refsynopsisdiv>
+        
+        <title>呼び出し手順</title>
+        
+        <synopsis>
+            
+            [xadj,iadj,v]=sp2adj(A)
+            
+        </synopsis>
+        
+    </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>A</term>
+                
                 <listitem>
-                    <para>実数または複素数の疎行列 (nz 個の非ゼロエントリ)</para>
+                    
+                    <para>
+                        
+                        m行n列の実数または複素数の疎行列 (nz 個の非ゼロエントリ)
+                        
+                    </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>xadj</term>
+                
                 <listitem>
-                    <para>長さ(n+1)の整数ベクトル.</para>
+                    
+                    <para>
+                        
+                        (n+1)行1列の浮動小数点整数の行列で,
+                        
+                        各列のiadjとvの先頭の添字を指します.
+                        
+                        <literal>j=1:n</literal>の場合, 
+                        
+                        浮動小数点整数
+                        
+                        <literal>xadj(j+1)-xadj(j)</literal> は
+                        
+                        j列の非ゼロエントリの数になります.
+                        
+                    </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
-                <term>adjncy</term>
+                
+                <term>iadj</term>
+                
                 <listitem>
+                    
                     <para>
-                        anzの要素に関するの行インデックスを含む長さnzの整数ベクトル
+                        
+                        nz行1列の浮動小数点整数の行列, 非ゼロエントリの行添字.
+                        
+                        <literal>j=1:n</literal>および, 
+                        
+                        <literal>k = xadj(j):xadj(j+1)-1</literal>に関して, 
+                        
+                        浮動小数点整数 <literal>i = iadj(k)</literal> は
+                        
+                        非ゼロエントリ #k の行添字です.
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
-                <term>anz</term>
+                
+                <term>v</term>
+                
                 <listitem>
+                    
                     <para>
-                        Aの非ゼロ要素を有する長さnzの列ベクトル
+                        
+                        nz行1列の浮動小数点整数の行列, Aの非ゼロエントリ.
+                        
+                        <literal>j=1:n</literal>および, 
+                        
+                        <literal>k = xadj(j):xadj(j+1)-1</literal>に関して, 
+                        
+                        浮動小数点整数<literal>Aij = v(k)</literal>は
+                        
+                        非ゼロエントリ #k の値です.
+                        
                     </para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
-        <programlisting role=""><![CDATA[ 
-sp2adj は疎行列を隣接形式に変換します (ユーティリティ関数).
-A =  n x m 疎行列. xadj, adjncy, anz = Aの隣接表現,すなわち:
- ]]></programlisting>
+        
         <para>
-            <literal>xadj(j+1)-xadj(j)</literal> = j行目における非ゼロ要素の数.
-            <literal>adjncy</literal> = 行1,行2,...,行nにおける
-            エントリの非ゼロの列インデックス.
-            <literal>anz</literal> = 行1,行2,...,行nにおける非ゼロ要素の値.
-            <literal>xadj</literal> は大きさ n+1の (列)ベクトル,
-            <literal>adjncy</literal> は大きさ<literal>nz=nnz(A)</literal>の
-            整数(列)ベクトルです.
-            <literal>anz</literal> は大きさ<literal>nz=nnz(A)</literal>の
-            実数ベクトルです.
+            
+            sp2adjは,疎行列を隣接形式に変換します.
+            
+            隣接形式の値は列毎に保存されています.
+            
+            これは,この形式がしばしば
+            
+            "Compressed sparse column" または CSCと呼ばれる理由です.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
-        <programlisting role="example"><![CDATA[ 
-A = sprand(100,50,.05);
-[xadj,adjncy,anz]= sp2adj(A);
-[n,m]=size(A);
-p = adj2sp(xadj,adjncy,anz,[n,m]);
-A-p
+        
+        <para>
+            
+            以下の例では,1から10のエントリを有する通常の行列を作成します.
+            
+            次に,これを疎行列に変換し,ゼロを除きます.
+            
+            最後に,この行列の隣接形式を計算します.
+            
+            行列bはAの非ゼロ要素のみを有します.
+            
+        </para>
+        
+        <programlisting role="example"><![CDATA[
+A = [
+0 0 4 0 9
+0 0 5 0 0
+1 3 0 7 0
+0 0 6 0 10
+2 0 0 8 0
+];
+B=sparse(A);
+[xadj,iadj,v]=sp2adj(B)
+expected_xadj = [1 3 4 7 9 11]';
+expected_adjncy = [3 5 3 1 2 4 3 5 1 4]';
+expected_anz = [1 2 3 4 5 6 7 8 9 10]';
+and(expected_xadj == xadj) // Should be %t
+and(expected_adjncy == iadj) // Should be %t
+and(expected_anz == v) // Should be %t
+// j is the column index
+for j = 1 : size(xadj,"*")-1
+  irows = iadj(xadj(j):xadj(j+1)-1);
+  vcolj = v(xadj(j):xadj(j+1)-1);
+  mprintf("Column #%d:\n",j)
+  mprintf("  Rows  = %s:\n",sci2exp(irows))
+  mprintf("  Values= %s:\n",sci2exp(vcolj))
+end
+ ]]></programlisting>
+        
+        <para>
+            
+            前のスクリプトは以下の出力を生成します.
+            
+        </para>
+        
+        <programlisting role="no-scilab-exec"><![CDATA[
+Column #1:
+  Rows  = [3;5]:
+  Values= [1;2]:
+Column #2:
+  Rows  = 3:
+  Values= 3:
+Column #3:
+  Rows  = [1;2;4]:
+  Values= [4;5;6]:
+Column #4:
+  Rows  = [3;5]:
+  Values= [7;8]:
+Column #5:
+  Rows  = [1;4]:
+  Values= [9;10]:
+ ]]></programlisting>
+        
+        <para>
+            
+            列 #1について考えてみましょう.
+            
+            等式 xadj(2)-xadj(1)=2 は列 #1に非ゼロ要素が2個あることを示します.
+            
+            行添字は iadjに保存され, 列 #1 の非ゼロエントリは
+            
+            行 #3 および #5であることを示します.
+            
+            行列 v は実際のエントリが 1および2であることを示します.
+            
+        </para>
+        
+        <para>
+            
+            以下の例では,疎行列の非ゼロエントリを隣接構造でループ処理を
+            
+            することにより,調べます.
+            
+        </para>
+        
+        <programlisting role="example"><![CDATA[
+A = [
+0 0 0 0 0 6 0 0 0 0
+3 0 5 0 0 0 0 5 0 0
+0 0 0 3 0 0 0 0 0 0
+0 0 0 0 0 0 0 0 0 0
+0 7 0 0 0 0 0 0 0 0
+0 0 0 0 0 0 0 0 0 3
+0 0 0 0 0 0 0 0 2 0
+];
+B=sparse(A);
+[xadj,iadj,v]=sp2adj(B)
+expected_xadj = [1 2 3 4 5 5 6 6 7 8 9]';
+expected_adjncy = [2 5 2 3 1 2 7 6]';
+expected_anz = [3 7 5 3 6 5 2 3]';
+and(expected_xadj == xadj) // Should be %t
+and(expected_adjncy == iadj) // Should be %t
+and(expected_anz == v) // Should be %t
+ ]]></programlisting>
+        
+        <para>
+            
+            以下の例では,sp2adjおよびadj2sp関数が逆関数であることを
+            
+            確認します.
+            
+        </para>
+        
+        <programlisting role="example"><![CDATA[
+// Templates for the Solution of Algebraic Eigenvalue Problems: a Practical Guide
+// Edited by Zhaojun Bai, James Demmel, Jack Dongarra, Axel Ruhe, and Henk van der Vorst
+// "Sparse Matrix Storage Formats", J. Dongarra
+// http://web.eecs.utk.edu/~dongarra/etemplates/book.html
+
+A = [
+10 0 0 0 -2 0
+3 9 0 0 0 3
+0 7 8 7 0 0
+3 0 8 7 5 0
+0 8 0 9 9 13
+0 4 0 0 2 -1
+];
+A = sparse(A)
+
+// To get the Compressed Sparse Column (CSC) :
+[col_ptr,row_ind,val]=sp2adj(A)
+// To convert back to sparse:
+AAsp=adj2sp(col_ptr,row_ind,val)
+// Check the conversion
+AAsp - A
+
+// To get the Compressed Sparse Row (CSR) :
+[row_ptr,col_ind,val]=sp2adj(A')
+// To convert back to sparse:
+AAsp=adj2sp(row_ptr,col_ind,val)'
+// Check the conversion
+AAsp - A
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="adj2sp">adj2sp</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spcompack">spcompack</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spget">spget</link>
+                
             </member>
+            
         </simplelist>
+        
+    </refsection>
+    
+    <refsection>
+        
+        <title>参考文献</title>
+        
+        <para>
+            
+            "Implementation of Lipsol in Scilab", Hector E. Rubio Scola, INRIA, Decembre 1997, Rapport Technique No 0215
+            
+        </para>
+        
+        <para>
+            
+            "Solving Large Linear Optimization Problems with Scilab : Application to Multicommodity Problems", Hector E. Rubio Scola, Janvier 1999, Rapport Technique No 0227
+            
+        </para>
+        
+        <para>
+            
+            "Toolbox Scilab : Detection signal design for failure detection and isolation for linear dynamic systems User's Guide", Hector E. Rubio Scola, 2000, Rapport Technique No 0241
+            
+        </para>
+        
+        <para>
+            
+            "Computer Solution of Large Sparse Positive Definite Systems", A. George, Prentice-Hall, Inc. Englewood Cliffs, New Jersey, 1981.
+            
+        </para>
+        
     </refsection>
+    
 </refentry>
+
index d82069a..7b6095c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="sparse">
+    
     <refnamediv>
+        
         <refname>sparse</refname>
+        
         <refpurpose>疎行列を定義</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>sp=sparse(X)
+            
             sp=sparse(ij,v [,mn])
+            
         </synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>X</term>
+                
                 <listitem>
+                    
                     <para>実数または複素数の通常の(または疎)行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>ij</term>
+                
                 <listitem>
+                    
                     <para>2列の整数行列 (非ゼロエントリのインデックス)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>v</term>
+                
                 <listitem>
+                    
                     <para>ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>mn</term>
+                
                 <listitem>
+                    
                     <para>2つのエントリ(行の次元, 列の次元c)を有する整数ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>sp</term>
+                
                 <listitem>
+                    
                     <para>疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>sparse</literal>は疎行列を作成するために使用されます.
+            
             ゼロでないエントリのみが保存されます.
+            
         </para>
+        
         <para>
+            
             <literal>sp = sparse(X)</literal>  は,
+            
             0要素を除外することにより,通常の行列を疎行列に変換します.
+            
             (<literal>X</literal>が既に疎行列の場合,
+            
             <literal>sp</literal>は<literal>X</literal>となります).
+            
         </para>
+        
         <para>
+            
             <literal>sp=sparse(ij,v [,mn])</literal>は,
+            
             <literal>sp(ij(k,1),ij(k,2))=v(k)</literal>となる
+            
             <literal>mn(1)</literal>行<literal>mn(2)</literal>列の疎行列
+            
             を作成します.
+            
             <literal>ij</literal> および <literal>v</literal>は列の次元が
+            
             同じである必要があります.
+            
             オプションの<literal>mn</literal>パラメータが指定されない場合,
+            
             行列<literal>sp</literal>の次元は,それぞれ
+            
             <literal>ij(:,1)</literal> および <literal>ij(:,2)</literal>の
+            
             最大値となります.
+            
         </para>
+        
         <para>
+            
             疎行列に関する操作(結合,加算,等,)は通常の行列と同じ構文により
+            
             行ないます.
+            
         </para>
+        
         <para>
+            
             基本的な関数(<literal>abs,maxi,sum,diag,...</literal>)は疎行列でも
+            
             利用可能です.
+            
         </para>
+        
         <para>
+            
             (通常の行列と疎行列の)混用も可能です.
+            
             結果は処理に応じて通常または疎行列となります.
+            
         </para>
+        
+        <para>
+            
+            注意 : 
+            
+            同じ大きさの通常の行列を含む任意の演算は,
+            
+            引数(例: <literal>sp=sparse(d)</literal>),
+            
+            または,結果(例  <literal>d= sp + 1.</literal>) のどちら
+            
+            についても利便性のために提供されていますが,当然避けるべきです.
+            
+            更に,要素(<literal>sp(r,c)</literal>)へのランダムアクセス,
+            
+            特に挿入,は効率的ではありません.
+            
+            このため,性能面の制約があるアクセスでは,
+            
+            読込みアクセスは<link linkend="spget">spget</link>,
+            
+            書込みアクセスは<literal>sp=sparse(ij, v, mn)</literal>による
+            
+            バッチ処理により行う必要があります.
+            
+        </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
-        <programlisting role="example"><![CDATA[ 
+        
+        <programlisting role="example"><![CDATA[
 sp=sparse([1,2;4,5;3,10],[1,2,3])
 size(sp)
 x=rand(2,2);abs(x)-full(abs(sparse(x)))
+// sparse constructor taking a single dense matrix
+// removes the zeros.
+dense=[0., 1., 0., 0., 0.,
+1., 0., 2., 0., 0.
+0., 0., 0., 0., 0.
+0., 0., 0., 0., -0.5];
+sp=sparse(dense)
+// complex matrices are also supported
+sp=sparse(dense*(1+2*%i))
+// for boolean matrices, the boolean sparse matrix
+// only stores true values (and removes false values).
+dense=[%F, %F, %T, %F, %F
+%T, %F, %F, %F, %F
+%F, %F, %F, %F, %F
+%F, %F, %F, %F, %T];
+sp=sparse(dense)
+
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="full">full</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spget">spget</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="sprand">sprand</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="speye">speye</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="lufact">lufact</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index f38658b..12a02f1 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="spcompack">
+    
     <refnamediv>
+        
         <refname>spcompack</refname>
+        
         <refpurpose>圧縮隣接表現に変換する</refpurpose>
+        
     </refnamediv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>xadj</term>
+                
                 <listitem>
+                    
                     <para>長さ (n+1)の整数ベクトル.</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>xlindx</term>
+                
                 <listitem>
+                    
                     <para>長さ n+1の整数ベクトル(ポインタ).</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>lindx</term>
+                
                 <listitem>
+                    
                     <para>整数ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>adjncy</term>
+                
                 <listitem>
+                    
                     <para>整数ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <programlisting role=""><![CDATA[ 
 ユーティリティ関数spcompakは圧縮隣接形式を
 標準隣接形式に変換する際に使用されます.
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 // A is the sparse matrix:
 A=[1,0,0,0,0,0,0;
@@ -88,19 +130,36 @@ xlindx=[1,2,3,8,9,11];
 [xadj,adjncy,anz]= sp2adj(A);
 adjncy-spcompack(xadj,xlindx,lindx)
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sp2adj">sp2adj</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="adj2sp">adj2sp</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="spget">spget</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+
index 1399e2e..0f82222 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
+
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="spget">
+    
     <refnamediv>
+        
         <refname>spget</refname>
+        
         <refpurpose>疎行列のエントリを取得</refpurpose>
+        
     </refnamediv>
+    
     <refsynopsisdiv>
+        
         <title>呼び出し手順</title>
+        
         <synopsis>[ij,v,mn]=spget(sp)</synopsis>
+        
     </refsynopsisdiv>
+    
     <refsection>
-        <title>パラメータ</title>
+        
+        <title>引数</title>
+        
         <variablelist>
+            
             <varlistentry>
+                
                 <term>sp</term>
+                
                 <listitem>
+                    
                     <para>実数または複素数の疎行列</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>ij</term>
+                
                 <listitem>
+                    
                     <para>2列の整数行列t (非ゼロエントリのインデックス)</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>mn</term>
+                
                 <listitem>
+                    
                     <para>2つのエントリ(行の次元, 列の次元)を有する整数ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
             <varlistentry>
+                
                 <term>v</term>
+                
                 <listitem>
+                    
                     <para>列ベクトル</para>
+                    
                 </listitem>
+                
             </varlistentry>
+            
         </variablelist>
+        
     </refsection>
+    
     <refsection>
+        
         <title>説明</title>
+        
         <para>
+            
             <literal>spget</literal> は疎行列の内部形式を
+            
             標準的な<literal>ij, v</literal> 形式に変換する際に使用されます.
+            
         </para>
+        
         <para>
+            
             <literal>sp</literal>の非ゼロエントリは,
+            
             <literal>ij</literal>のインデックスにより行および列の
+            
             位置が決定されます.
+            
         </para>
+        
     </refsection>
+    
     <refsection>
+        
         <title>例</title>
+        
         <programlisting role="example"><![CDATA[ 
 sp=sparse([1,2;4,5;3,10],[1,2,3])
 [ij,v,mn]=spget(sp);
  ]]></programlisting>
+        
     </refsection>
+    
     <refsection role="see also">
+        
         <title>参照</title>
+        
         <simplelist type="inline">
+            
             <member>
+                
                 <link linkend="sparse">sparse</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="sprand">sprand</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="speye">speye</link>
+                
             </member>
+            
             <member>
+                
                 <link linkend="lufact">lufact</link>
+                
             </member>
+            
         </simplelist>
+        
     </refsection>
+    
 </refentry>
+