1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2011 - DIGITEO - Michael Baudin
6 * This file must be used under the terms of the CeCILL.
7 * This source file is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at
10 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
13 <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">
15 <refname>ordmmd</refname>
23 [perm,invp,nofsub]=ordmmd(xadj,iadj,n)
32 <para>double、整数値の1行1列の行列,方程式の数</para>
38 <para>double、整数値の(n+1)行1列の行列,Aの行へのポインタ</para>
44 <para>double、整数値のnnz行1列の行列,Aの行添字</para>
50 <para>double、整数値のn行1列の行列,最小次元規則配列</para>
56 <para>double、整数値のn行1列の行列,permの逆行列</para>
63 double、整数値の1行1列の行列,圧縮記憶方式における非ゼロ要素の数の上限
72 コレスキー分解を適用する前に対称疎行列の行および列を交換する際に最小次元アルゴリズムが使用されます.
73 このアルゴリズムはコレスキー分解の非ゼロ要素の数を減らします.
76 n行n列の実対称疎行列<literal>A</literal>を指定すると,
77 このコレスキー分解 <literal>U</literal> は,通常,
78 <literal>A</literal>の上三角要素よりも非ゼロ要素が多くなる
79 "塗りつぶし(fill in)"に苦しめられます.
80 行列<literal>P'*A*P</literal>が同じく対称で,そのコレスキー分解の非ゼロ要素の数が最小となる
81 交換行列 <literal>P</literal>を探します.
87 以下の例では,対称疎行列の規則配列を計算します.
88 隣接構造体を計算する際に<literal>sp2adj</literal> を使用します.
90 <programlisting role="example"><![CDATA[
99 [xadj,iadj,val]=sp2adj(A);
101 [perm,invp,nofsub]=ordmmd(xadj,iadj,n)
104 以下の例では,対称疎行列の規則配列を計算します.
105 <literal>invp</literal>が<literal>perm</literal>の逆行列であることを確認します.
107 <programlisting role="example"><![CDATA[
109 0., 0., 0., 2., 0., 0., 2., 0., 2., 0., 0. ;
110 0., 0., 4., 0., 0., 0., 0., 0., 0., 0., 0. ;
111 0., 4., 0., 0., 0., 0., 0., 0., 0., 0., 0. ;
112 2., 0., 0., 0., 0., 0., 2., 0., 2., 0., 0. ;
113 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 4. ;
114 0., 0., 0., 0., 0., 0., 0., 3., 0., 3., 0. ;
115 2., 0., 0., 2., 0., 0., 0., 0., 2., 0., 0. ;
116 0., 0., 0., 0., 0., 3., 0., 0., 0., 3., 0. ;
117 2., 0., 0., 2., 0., 0., 2., 0., 0., 0., 0. ;
118 0., 0., 0., 0., 0., 3., 0., 3., 0., 0., 0. ;
119 0., 0., 0., 0., 4., 0., 0., 0., 0., 0., 0.];
122 [xadj,adjncy,anz]=sp2adj(A);
123 [perm,invp,nofsub]=ordmmd(xadj,adjncy,n);
127 以下の例では, 行列<literal>A</literal>と行列<literal>P'*A*P</literal>
128 のコレスキー分解の疎パターンを計算します.
129 "Computer Solution of Large Sparse Positive Definite Systems"のp.3 "Chapter 1: Introduction"を参照.
130 コレスキー分解の非ゼロ要素の数は15,一方,行列<literal>P'*A*P</literal>のコレスキー分解は
131 9個の非ゼロ要素を有することがわかります.
133 <programlisting role="example"><![CDATA[
142 // Aのコレスキー分解の疎パターンを調べる
143 U = sparse(chol(full(A)));
147 xtitle("Sparsity pattern of U, such that A=U''*U");
149 [xadj,iadj,val]=sp2adj(A);
152 [perm,invp,nofsub]=ordmmd(xadj,iadj,n);
158 // P'*A*Pのコレスキー分解の疎パターンを調べる
159 U = sparse(chol(full(P'*A*P)));
162 xtitle("Sparsity pattern of U, such that P''*A*P=U''*U");
166 <title>実装に関する注記</title>
168 この関数はMathematical Sciences Section, Oak Ridge National Laboratoryの
169 Esmond G. Ng および Barry W. Peytonによる
170 ソースコード "ordmmd.f",に基づいています.
171 アルゴリズムはSPARSPAKライブラリのJoseph W.H. Liuによる genmmdルーチンに基づいています.
177 "Minimum degree algorithm", Wikipedia contributors, Wikipedia, The Free Encyclopedia. http://en.wikipedia.org/wiki/Minimum_degree_algorithm
180 "A new release of SPARSPAK: the Waterloo sparse matrix package", Alan George and Esmond Ng. 1984. SIGNUM Newsl. 19, 4 (October 1984), 9-13.
183 "Computer Solution of Large Sparse Positive Definite Systems" by Alan George and Joseph Liu, Prentice-Hall, Inc. Englewood Cliffs, New Jersey, 1981
186 "Implementation of Lipsol in Scilab", Rubio Scola, 1997, INRIA, No 0215
189 <refsection role="see also">
191 <simplelist type="inline">
193 <link linkend="sp2adj">sp2adj</link>
196 <link linkend="spchol">spchol</link>