~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/sparse/help/en_US/ordmmd.xml

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 *
12
12
 -->
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">
14
 
  <refnamediv>
15
 
    <refname>ordmmd</refname>
16
 
    <refpurpose>
17
 
      Compute multiple minimum degree ordering
18
 
    </refpurpose>
19
 
  </refnamediv>
20
 
  <refsynopsisdiv>
21
 
    <title>Calling Sequence</title>
22
 
    <synopsis>
23
 
      [perm,invp,nofsub]=ordmmd(xadj,iadj,n)
24
 
    </synopsis>
25
 
  </refsynopsisdiv>
26
 
  <refsection>
27
 
    <title>Arguments</title>
28
 
    <variablelist>
29
 
      <varlistentry>
30
 
        <term>n</term>
31
 
        <listitem>
32
 
          <para>a 1-by-1 matrix of doubles, integer value, the number of equations</para>
33
 
        </listitem>
34
 
      </varlistentry>
35
 
      <varlistentry>
36
 
        <term>xadj</term>
37
 
        <listitem>
38
 
          <para>(n+1)-by-1 matrix of doubles, integer value, pointer to the rows of A</para>
39
 
        </listitem>
40
 
      </varlistentry>
41
 
      <varlistentry>
42
 
        <term>iadj</term>
43
 
        <listitem>
44
 
          <para>nnz-by-1 matrix of doubles, integer value, the row indices of A</para>
45
 
        </listitem>
46
 
      </varlistentry>
47
 
      <varlistentry>
48
 
        <term>perm</term>
49
 
        <listitem>
50
 
          <para>n-by-1 matrix of doubles, integer value, the minimum degree ordering</para>
51
 
        </listitem>
52
 
      </varlistentry>
53
 
      <varlistentry>
54
 
        <term>invp</term>
55
 
        <listitem>
56
 
          <para>n-by-1 matrix of doubles, integer value, the inverse of perm</para>
57
 
        </listitem>
58
 
      </varlistentry>
59
 
      <varlistentry>
60
 
        <term>nofsub</term>
61
 
        <listitem>
62
 
          <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
65
 
          </para>
66
 
        </listitem>
67
 
      </varlistentry>
68
 
    </variablelist>
69
 
  </refsection>
70
 
  <refsection>
71
 
    <title>Description</title>
72
 
    <para>
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.
76
 
    </para>
77
 
    <para>
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.
83
 
    </para>
84
 
  </refsection>
85
 
  <refsection>
86
 
    <title>Examples</title>
87
 
    <para>
88
 
      In the following example, we compute an ordering for a symmetric 
89
 
      sparse matrix. 
90
 
      We use the <literal>sp2adj</literal> function to compute the adjacency structure. 
91
 
    </para>
92
 
    <programlisting role="example"><![CDATA[ 
 
14
    <refnamediv>
 
15
        <refname>ordmmd</refname>
 
16
        <refpurpose>
 
17
            Compute multiple minimum degree ordering
 
18
        </refpurpose>
 
19
    </refnamediv>
 
20
    <refsynopsisdiv>
 
21
        <title>Calling Sequence</title>
 
22
        <synopsis>
 
23
            [perm,invp,nofsub]=ordmmd(xadj,iadj,n)
 
24
        </synopsis>
 
25
    </refsynopsisdiv>
 
26
    <refsection>
 
27
        <title>Arguments</title>
 
28
        <variablelist>
 
29
            <varlistentry>
 
30
                <term>n</term>
 
31
                <listitem>
 
32
                    <para>a 1-by-1 matrix of doubles, integer value, the number of equations</para>
 
33
                </listitem>
 
34
            </varlistentry>
 
35
            <varlistentry>
 
36
                <term>xadj</term>
 
37
                <listitem>
 
38
                    <para>(n+1)-by-1 matrix of doubles, integer value, pointer to the rows of A</para>
 
39
                </listitem>
 
40
            </varlistentry>
 
41
            <varlistentry>
 
42
                <term>iadj</term>
 
43
                <listitem>
 
44
                    <para>nnz-by-1 matrix of doubles, integer value, the row indices of A</para>
 
45
                </listitem>
 
46
            </varlistentry>
 
47
            <varlistentry>
 
48
                <term>perm</term>
 
49
                <listitem>
 
50
                    <para>n-by-1 matrix of doubles, integer value, the minimum degree ordering</para>
 
51
                </listitem>
 
52
            </varlistentry>
 
53
            <varlistentry>
 
54
                <term>invp</term>
 
55
                <listitem>
 
56
                    <para>n-by-1 matrix of doubles, integer value, the inverse of perm</para>
 
57
                </listitem>
 
58
            </varlistentry>
 
59
            <varlistentry>
 
60
                <term>nofsub</term>
 
61
                <listitem>
 
62
                    <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
 
65
                    </para>
 
66
                </listitem>
 
67
            </varlistentry>
 
68
        </variablelist>
 
69
    </refsection>
 
70
    <refsection>
 
71
        <title>Description</title>
 
72
        <para>
 
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.
 
76
        </para>
 
77
        <para>
 
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.
 
83
        </para>
 
84
    </refsection>
 
85
    <refsection>
 
86
        <title>Examples</title>
 
87
        <para>
 
88
            In the following example, we compute an ordering for a symmetric 
 
89
            sparse matrix. 
 
90
            We use the <literal>sp2adj</literal> function to compute the adjacency structure. 
 
91
        </para>
 
92
        <programlisting role="example"><![CDATA[ 
93
93
A = [
94
94
4. 1. 2. 0.5 2.
95
95
1. 0.5 0. 0. 0.
102
102
n = size(A,"r");
103
103
[perm,invp,nofsub]=ordmmd(xadj,iadj,n)
104
104
 ]]></programlisting>
105
 
    <para>
106
 
      In the following example, we compute an ordering for a symmetric 
107
 
      sparse matrix. 
108
 
      We check that <literal>invp</literal> is the inverse of <literal>perm</literal>.
109
 
    </para>
110
 
    <programlisting role="example"><![CDATA[ 
 
105
        <para>
 
106
            In the following example, we compute an ordering for a symmetric 
 
107
            sparse matrix. 
 
108
            We check that <literal>invp</literal> is the inverse of <literal>perm</literal>.
 
109
        </para>
 
110
        <programlisting role="example"><![CDATA[ 
111
111
    A = [
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);
127
127
    perm(invp) 
128
128
 ]]></programlisting>
129
 
    <para>
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
136
 
      9 nonzeros.
137
 
    </para>
138
 
    <programlisting role="example"><![CDATA[ 
 
129
        <para>
 
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
 
136
            9 nonzeros.
 
137
        </para>
 
138
        <programlisting role="example"><![CDATA[ 
139
139
A = [
140
140
4. 1. 2. 0.5 2.
141
141
1. 0.5 0. 0. 0.
167
167
PlotSparse(U,"x");
168
168
xtitle("Sparsity pattern of U, such that P''*A*P=U''*U");
169
169
 ]]></programlisting>
170
 
  </refsection>
171
 
  <refsection>
172
 
    <title>Implementation notes</title>
173
 
    <para>
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
177
 
      SPARSPAK library.
178
 
    </para>
179
 
  </refsection>
180
 
  <refsection>
181
 
    <title>Bibliography</title>
182
 
    <para>
183
 
      "Minimum degree algorithm", Wikipedia contributors, Wikipedia, The Free Encyclopedia. http://en.wikipedia.org/wiki/Minimum_degree_algorithm
184
 
    </para>
185
 
    <para>
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.
187
 
    </para>
188
 
    <para>
189
 
      "Computer Solution of Large Sparse Positive Definite Systems" by Alan George and Joseph Liu, Prentice-Hall, Inc. Englewood Cliffs, New Jersey, 1981
190
 
    </para>
191
 
    <para>
192
 
      "Implementation of Lipsol in Scilab", Rubio Scola, 1997, INRIA, No 0215
193
 
    </para>
194
 
  </refsection>
195
 
  <refsection role="see also">
196
 
    <title>See Also</title>
197
 
    <simplelist type="inline">
198
 
      <member>
199
 
        <link linkend="sp2adj">sp2adj</link>
200
 
      </member>
201
 
      <member>
202
 
        <link linkend="spchol">spchol</link>
203
 
      </member>
204
 
    </simplelist>
205
 
  </refsection>
 
170
    </refsection>
 
171
    <refsection>
 
172
        <title>Implementation notes</title>
 
173
        <para>
 
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
 
177
            SPARSPAK library.
 
178
        </para>
 
179
    </refsection>
 
180
    <refsection>
 
181
        <title>Bibliography</title>
 
182
        <para>
 
183
            "Minimum degree algorithm", Wikipedia contributors, Wikipedia, The Free Encyclopedia. http://en.wikipedia.org/wiki/Minimum_degree_algorithm
 
184
        </para>
 
185
        <para>
 
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.
 
187
        </para>
 
188
        <para>
 
189
            "Computer Solution of Large Sparse Positive Definite Systems" by Alan George and Joseph Liu, Prentice-Hall, Inc. Englewood Cliffs, New Jersey, 1981
 
190
        </para>
 
191
        <para>
 
192
            "Implementation of Lipsol in Scilab", Rubio Scola, 1997, INRIA, No 0215
 
193
        </para>
 
194
    </refsection>
 
195
    <refsection role="see also">
 
196
        <title>See Also</title>
 
197
        <simplelist type="inline">
 
198
            <member>
 
199
                <link linkend="sp2adj">sp2adj</link>
 
200
            </member>
 
201
            <member>
 
202
                <link linkend="spchol">spchol</link>
 
203
            </member>
 
204
        </simplelist>
 
205
    </refsection>
206
206
</refentry>