13
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" version="5.0-subset Scilab" xml:id="ordmmd" xml:lang="en">
15
<refname>ordmmd</refname>
17
Compute multiple minimum degree ordering
21
<title>Calling Sequence</title>
23
[perm,invp,nofsub]=ordmmd(xadj,iadj,n)
27
<title>Arguments</title>
32
<para>a 1-by-1 matrix of doubles, integer value, the number of equations</para>
38
<para>(n+1)-by-1 matrix of doubles, integer value, pointer to the rows of A</para>
44
<para>nnz-by-1 matrix of doubles, integer value, the row indices of A</para>
50
<para>n-by-1 matrix of doubles, integer value, the minimum degree ordering</para>
56
<para>n-by-1 matrix of doubles, integer value, the inverse of perm</para>
63
1-by-1 matrix of doubles, integer value,
64
an upper bound on the number of nonzero subscripts for the compressed storage scheme
71
<title>Description</title>
73
The minimum degree algorithm is used to permute the rows and
74
columns of a symmetric sparse matrix before applying the Cholesky decomposition.
75
This algorithm reduces the number of non-zeros in the Cholesky factor.
78
Given a n-by-n real symmetric sparse square matrix <literal>A</literal>,
79
the Cholesky factor <literal>U</literal> will typically suffer "fill in", that is have more
80
non-zeros than the upper triangle of <literal>A</literal>.
81
We seek a permutation matrix <literal>P</literal>, so that the matrix <literal>P'*A*P</literal>,
82
which is also symmetric, has the least possible fill in its Cholesky factor.
86
<title>Examples</title>
88
In the following example, we compute an ordering for a symmetric
90
We use the <literal>sp2adj</literal> function to compute the adjacency structure.
92
<programlisting role="example"><![CDATA[
15
<refname>ordmmd</refname>
17
Compute multiple minimum degree ordering
21
<title>Calling Sequence</title>
23
[perm,invp,nofsub]=ordmmd(xadj,iadj,n)
27
<title>Arguments</title>
32
<para>a 1-by-1 matrix of doubles, integer value, the number of equations</para>
38
<para>(n+1)-by-1 matrix of doubles, integer value, pointer to the rows of A</para>
44
<para>nnz-by-1 matrix of doubles, integer value, the row indices of A</para>
50
<para>n-by-1 matrix of doubles, integer value, the minimum degree ordering</para>
56
<para>n-by-1 matrix of doubles, integer value, the inverse of perm</para>
63
1-by-1 matrix of doubles, integer value,
64
an upper bound on the number of nonzero subscripts for the compressed storage scheme
71
<title>Description</title>
73
The minimum degree algorithm is used to permute the rows and
74
columns of a symmetric sparse matrix before applying the Cholesky decomposition.
75
This algorithm reduces the number of non-zeros in the Cholesky factor.
78
Given a n-by-n real symmetric sparse square matrix <literal>A</literal>,
79
the Cholesky factor <literal>U</literal> will typically suffer "fill in", that is have more
80
non-zeros than the upper triangle of <literal>A</literal>.
81
We seek a permutation matrix <literal>P</literal>, so that the matrix <literal>P'*A*P</literal>,
82
which is also symmetric, has the least possible fill in its Cholesky factor.
86
<title>Examples</title>
88
In the following example, we compute an ordering for a symmetric
90
We use the <literal>sp2adj</literal> function to compute the adjacency structure.
92
<programlisting role="example"><![CDATA[
103
103
[perm,invp,nofsub]=ordmmd(xadj,iadj,n)
104
104
]]></programlisting>
106
In the following example, we compute an ordering for a symmetric
108
We check that <literal>invp</literal> is the inverse of <literal>perm</literal>.
110
<programlisting role="example"><![CDATA[
106
In the following example, we compute an ordering for a symmetric
108
We check that <literal>invp</literal> is the inverse of <literal>perm</literal>.
110
<programlisting role="example"><![CDATA[
112
112
0., 0., 0., 2., 0., 0., 2., 0., 2., 0., 0. ;
113
113
0., 0., 4., 0., 0., 0., 0., 0., 0., 0., 0. ;
126
126
[perm,invp,nofsub]=ordmmd(xadj,adjncy,n);
128
128
]]></programlisting>
130
In the following example, we compare the sparsity pattern of the Cholesky
131
factor of a matrix <literal>A</literal> and the matrix <literal>P'*A*P</literal>.
132
See p. 3, "Chapter 1: Introduction" in
133
"Computer Solution of Large Sparse Positive Definite Systems".
134
We see that the number of nonzeros in the Cholesky decomposition is
135
15, while the matrix <literal>P'*A*P</literal> has a Cholesky decomposition with
138
<programlisting role="example"><![CDATA[
130
In the following example, we compare the sparsity pattern of the Cholesky
131
factor of a matrix <literal>A</literal> and the matrix <literal>P'*A*P</literal>.
132
See p. 3, "Chapter 1: Introduction" in
133
"Computer Solution of Large Sparse Positive Definite Systems".
134
We see that the number of nonzeros in the Cholesky decomposition is
135
15, while the matrix <literal>P'*A*P</literal> has a Cholesky decomposition with
138
<programlisting role="example"><![CDATA[
167
167
PlotSparse(U,"x");
168
168
xtitle("Sparsity pattern of U, such that P''*A*P=U''*U");
169
169
]]></programlisting>
172
<title>Implementation notes</title>
174
This function is based on "ordmmd.f" a source code (1994) by Esmond G. Ng and Barry W. Peyton
175
from Mathematical Sciences Section, Oak Ridge National Laboratory.
176
The algorithm is based on the genmmd routine by Joseph W.H. Liu from the
181
<title>Bibliography</title>
183
"Minimum degree algorithm", Wikipedia contributors, Wikipedia, The Free Encyclopedia. http://en.wikipedia.org/wiki/Minimum_degree_algorithm
186
"A new release of SPARSPAK: the Waterloo sparse matrix package", Alan George and Esmond Ng. 1984. SIGNUM Newsl. 19, 4 (October 1984), 9-13.
189
"Computer Solution of Large Sparse Positive Definite Systems" by Alan George and Joseph Liu, Prentice-Hall, Inc. Englewood Cliffs, New Jersey, 1981
192
"Implementation of Lipsol in Scilab", Rubio Scola, 1997, INRIA, No 0215
195
<refsection role="see also">
196
<title>See Also</title>
197
<simplelist type="inline">
199
<link linkend="sp2adj">sp2adj</link>
202
<link linkend="spchol">spchol</link>
172
<title>Implementation notes</title>
174
This function is based on "ordmmd.f" a source code (1994) by Esmond G. Ng and Barry W. Peyton
175
from Mathematical Sciences Section, Oak Ridge National Laboratory.
176
The algorithm is based on the genmmd routine by Joseph W.H. Liu from the
181
<title>Bibliography</title>
183
"Minimum degree algorithm", Wikipedia contributors, Wikipedia, The Free Encyclopedia. http://en.wikipedia.org/wiki/Minimum_degree_algorithm
186
"A new release of SPARSPAK: the Waterloo sparse matrix package", Alan George and Esmond Ng. 1984. SIGNUM Newsl. 19, 4 (October 1984), 9-13.
189
"Computer Solution of Large Sparse Positive Definite Systems" by Alan George and Joseph Liu, Prentice-Hall, Inc. Englewood Cliffs, New Jersey, 1981
192
"Implementation of Lipsol in Scilab", Rubio Scola, 1997, INRIA, No 0215
195
<refsection role="see also">
196
<title>See Also</title>
197
<simplelist type="inline">
199
<link linkend="sp2adj">sp2adj</link>
202
<link linkend="spchol">spchol</link>