Mercurial > octave-nkf
comparison src/DLD-FUNCTIONS/ccolamd.cc @ 7107:22397f0fb0b2
[project @ 2007-11-06 20:31:33 by dbateman]
author | dbateman |
---|---|
date | Tue, 06 Nov 2007 20:32:25 +0000 |
parents | a1dbe9d80eee |
children | b166043585a8 |
comparison
equal
deleted
inserted
replaced
7106:33ed85dcfaa8 | 7107:22397f0fb0b2 |
---|---|
58 @deftypefnx {Loadable Function} {[@var{p}, @var{stats}] =} ccolamd (@dots{})\n\ | 58 @deftypefnx {Loadable Function} {[@var{p}, @var{stats}] =} ccolamd (@dots{})\n\ |
59 \n\ | 59 \n\ |
60 Constrained column approximate minimum degree permutation. @code{@var{p} =\n\ | 60 Constrained column approximate minimum degree permutation. @code{@var{p} =\n\ |
61 ccolamd (@var{s})} returns the column approximate minimum degree permutation\n\ | 61 ccolamd (@var{s})} returns the column approximate minimum degree permutation\n\ |
62 vector for the sparse matrix @var{s}. For a non-symmetric matrix @var{s},\n\ | 62 vector for the sparse matrix @var{s}. For a non-symmetric matrix @var{s},\n\ |
63 @code{@var{s}(:,@var{p})} tends to have sparser LU factors than @var{s}.\n\ | 63 @code{@var{s} (:, @var{p})} tends to have sparser LU factors than @var{s}.\n\ |
64 @code{chol (@var{s}(:,@var{p})'*@var{s}(:,@var{p}))} also tends to be\n\ | 64 @code{chol (@var{s} (:, @var{p})' * @var{s} (:, @var{p}))} also tends to be\n\ |
65 sparser than @code{chol (@var{s}'*@var{s})}. @code{@var{p} = ccolamd\n\ | 65 sparser than @code{chol (@var{s}' * @var{s})}. @code{@var{p} = ccolamd\n\ |
66 (@var{s},1)} optimizes the ordering for @code{lu (@var{s}(:,@var{p}))}.\n\ | 66 (@var{s}, 1)} optimizes the ordering for @code{lu (@var{s} (:, @var{p}))}.\n\ |
67 The ordering is followed by a column elimination tree post-ordering.\n\ | 67 The ordering is followed by a column elimination tree post-ordering.\n\ |
68 \n\ | 68 \n\ |
69 @var{knobs} is an optional one- to five-element input vector, with a default\n\ | 69 @var{knobs} is an optional one- to five-element input vector, with a default\n\ |
70 value of @code{[0 10 10 1 0]} if not present or empty. Entries not present\n\ | 70 value of @code{[0 10 10 1 0]} if not present or empty. Entries not present\n\ |
71 are set to their defaults.\n\ | 71 are set to their defaults.\n\ |
72 \n\ | 72 \n\ |
73 @table @code\n\ | 73 @table @code\n\ |
74 @item @var{knobs}(1)\n\ | 74 @item @var{knobs}(1)\n\ |
75 if nonzero, the ordering is optimized for @code{lu(S(:,p))}. It will be a\n\ | 75 if nonzero, the ordering is optimized for @code{lu (S (:, p))}. It will be a\n\ |
76 poor ordering for @code{chol(@var{s}(:,@var{p})'*@var{s}(:,@var{p}))}. This\n\ | 76 poor ordering for @code{chol (@var{s} (:, @var{p})' * @var{s} (:,\n\ |
77 is the most important knob for ccolamd.\n\ | 77 @var{p}))}. This is the most important knob for ccolamd.\n\ |
78 \n\ | 78 \n\ |
79 @item @var{knob}(2)\n\ | 79 @item @var{knob}(2)\n\ |
80 if @var{s} is m-by-n, rows with more than @code{max(16,@var{knobs}(2)*\n\ | 80 if @var{s} is m-by-n, rows with more than @code{max (16, @var{knobs} (2) *\n\ |
81 sqrt(n))} entries are ignored.\n\ | 81 sqrt (n))} entries are ignored.\n\ |
82 \n\ | 82 \n\ |
83 @item @var{knob}(3)\n\ | 83 @item @var{knob}(3)\n\ |
84 columns with more than @code{max(16,@var{knobs}(3)*sqrt(min(m,n)))}\n\ | 84 columns with more than @code{max (16, @var{knobs} (3) * sqrt (min (@var{m},\n\ |
85 entries are ignored and ordered last in the output permutation (subject\n\ | 85 @var{n})))} entries are ignored and ordered last in the output permutation\n\ |
86 to the cmember constraints).\n\ | 86 (subject to the cmember constraints).\n\ |
87 \n\ | 87 \n\ |
88 @item @var{knob}(4)\n\ | 88 @item @var{knob}(4)\n\ |
89 if nonzero, aggressive absorption is performed.\n\ | 89 if nonzero, aggressive absorption is performed.\n\ |
90 \n\ | 90 \n\ |
91 @item @var{knob}(5)\n\ | 91 @item @var{knob}(5)\n\ |
92 if nonzero, statistics and knobs are printed.\n\ | 92 if nonzero, statistics and knobs are printed.\n\ |
93 \n\ | 93 \n\ |
94 @end table\n\ | 94 @end table\n\ |
95 \n\ | 95 \n\ |
96 @var{cmember} is an optional vector of length n. It defines the constraints\n\ | 96 @var{cmember} is an optional vector of length n. It defines the constraints\n\ |
97 on the column ordering. If @code{@var{cmember}(j) = @var{c}}, then column j\n\ | 97 on the column ordering. If @code{@var{cmember} (j) = @var{c}}, then column\n\ |
98 is in constraint set @var{c} (@var{c} must be in the range 1 to n). In\n\ | 98 @var{j} is in constraint set @var{c} (@var{c} must be in the range 1 to\n\ |
99 the output permutation @var{p}, all columns in set 1 appear first, followed\n\ | 99 @var{n}). In the output permutation @var{p}, all columns in set 1 appear\n\ |
100 by all columns in set 2, and so on. @code{@var{cmember} = ones(1,n)} if\n\ | 100 first, followed by all columns in set 2, and so on. @code{@var{cmember} =\n\ |
101 not present or empty. @code{ccolamd (@var{s},[],1:n)} returns @code{1:n}\n\ | 101 ones(1,n)} if not present or empty. @code{ccolamd (@var{s}, [], 1 :\n\ |
102 \n\ | 102 @var{n})} returns @code{1 : @var{n}}\n\ |
103 @code{@var{p} = ccolamd(@var{s})} is about the same as @code{@var{p} =\n\ | 103 \n\ |
104 colamd(@var{s})}. @var{knobs} and its default values differ. @code{colamd}\n\ | 104 @code{@var{p} = ccolamd (@var{s})} is about the same as @code{@var{p} =\n\ |
105 colamd (@var{s})}. @var{knobs} and its default values differ. @code{colamd}\n\ | |
105 always does aggressive absorption, and it finds an ordering suitable for\n\ | 106 always does aggressive absorption, and it finds an ordering suitable for\n\ |
106 both @code{lu(@var{s}(:,@var{p}))} and @code{chol(@var{S}(:,@var{p})'*\n\ | 107 both @code{lu (@var{s} (:, @var{p}))} and @code{chol (@var{S} (:, @var{p})'\n\ |
107 @var{s}(:,@var{p}))}; it cannot optimize its ordering for @code{lu(@var{s}\n\ | 108 * @var{s} (:, @var{p}))}; it cannot optimize its ordering for\n\ |
108 (:,@var{p}))} to the extent that @code{ccolamd(@var{s},1)} can.\n\ | 109 @code{lu (@var{s} (:, @var{p}))} to the extent that\n\ |
110 @code{ccolamd (@var{s}, 1)} can.\n\ | |
109 \n\ | 111 \n\ |
110 @var{stats} is an optional 20-element output vector that provides data\n\ | 112 @var{stats} is an optional 20-element output vector that provides data\n\ |
111 about the ordering and the validity of the input matrix @var{s}. Ordering\n\ | 113 about the ordering and the validity of the input matrix @var{s}. Ordering\n\ |
112 statistics are in @code{@var{stats} (1:3)}. @code{@var{stats} (1)} and\n\ | 114 statistics are in @code{@var{stats} (1 : 3)}. @code{@var{stats} (1)} and\n\ |
113 @code{@var{stats} (2)} are the number of dense or empty rows and columns\n\ | 115 @code{@var{stats} (2)} are the number of dense or empty rows and columns\n\ |
114 ignored by CCOLAMD and @code{@var{stats} (3)} is the number of garbage\n\ | 116 ignored by CCOLAMD and @code{@var{stats} (3)} is the number of garbage\n\ |
115 collections performed on the internal data structure used by CCOLAMD\n\ | 117 collections performed on the internal data structure used by CCOLAMD\n\ |
116 (roughly of size @code{2.2 * nnz(@var{s}) + 4 * @var{m} + 7 * @var{n}}\n\ | 118 (roughly of size @code{2.2 * nnz (@var{s}) + 4 * @var{m} + 7 * @var{n}}\n\ |
117 integers).\n\ | 119 integers).\n\ |
118 \n\ | 120 \n\ |
119 @code{@var{stats} (4:7)} provide information if CCOLAMD was able to\n\ | 121 @code{@var{stats} (4 : 7)} provide information if CCOLAMD was able to\n\ |
120 continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if\n\ | 122 continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if\n\ |
121 invalid. @code{@var{stats} (5)} is the rightmost column index that is\n\ | 123 invalid. @code{@var{stats} (5)} is the rightmost column index that is\n\ |
122 unsorted or contains duplicate entries, or zero if no such column exists.\n\ | 124 unsorted or contains duplicate entries, or zero if no such column exists.\n\ |
123 @code{@var{stats} (6)} is the last seen duplicate or out-of-order row\n\ | 125 @code{@var{stats} (6)} is the last seen duplicate or out-of-order row\n\ |
124 index in the column index given by @code{@var{stats} (5)}, or zero if no\n\ | 126 index in the column index given by @code{@var{stats} (5)}, or zero if no\n\ |
125 such row index exists. @code{@var{stats} (7)} is the number of duplicate\n\ | 127 such row index exists. @code{@var{stats} (7)} is the number of duplicate\n\ |
126 or out-of-order row indices. @code{@var{stats} (8:20)} is always zero in\n\ | 128 or out-of-order row indices. @code{@var{stats} (8 : 20)} is always zero in\n\ |
127 the current version of CCOLAMD (reserved for future use).\n\ | 129 the current version of CCOLAMD (reserved for future use).\n\ |
128 \n\ | 130 \n\ |
129 The authors of the code itself are S. Larimore, T. Davis (Uni of Florida)\n\ | 131 The authors of the code itself are S. Larimore, T. Davis (Uni of Florida)\n\ |
130 and S. Rajamanickam in collaboration with J. Bilbert and E. Ng. Supported\n\ | 132 and S. Rajamanickam in collaboration with J. Bilbert and E. Ng. Supported\n\ |
131 by the National Science Foundation (DMS-9504974, DMS-9803599, CCR-0203270),\n\ | 133 by the National Science Foundation (DMS-9504974, DMS-9803599, CCR-0203270),\n\ |