Mercurial > octave-nkf
annotate libinterp/dldfcn/dmperm.cc @ 19074:0850b5212619
doc: Add @nospell macro around proper names in documentation.
* aspell-octave.en.pws: Remove proper names from Octave's custom dictionary.
* doc/interpreter/audio.txi, doc/interpreter/diagperm.txi,
doc/interpreter/diffeq.txi, doc/interpreter/emacs.txi,
doc/interpreter/func.txi, doc/interpreter/geometry.txi,
doc/interpreter/intro.txi, doc/interpreter/linalg.txi,
doc/interpreter/numbers.txi, doc/interpreter/preface.txi,
doc/interpreter/quad.txi, doc/interpreter/sparse.txi,
libinterp/corefcn/colloc.cc, libinterp/corefcn/ellipj.cc,
libinterp/corefcn/gammainc.cc, libinterp/corefcn/hess.cc,
libinterp/corefcn/quadcc.cc, libinterp/corefcn/rand.cc,
libinterp/corefcn/sqrtm.cc, libinterp/dldfcn/ccolamd.cc,
libinterp/dldfcn/colamd.cc, libinterp/dldfcn/dmperm.cc,
libinterp/dldfcn/symrcm.cc, scripts/general/quadgk.m, scripts/general/quadl.m,
scripts/linear-algebra/commutation_matrix.m, scripts/linear-algebra/condest.m,
scripts/linear-algebra/duplication_matrix.m, scripts/linear-algebra/expm.m,
scripts/linear-algebra/housh.m, scripts/linear-algebra/krylov.m,
scripts/linear-algebra/onenormest.m, scripts/linear-algebra/qzhess.m,
scripts/optimization/fminsearch.m, scripts/optimization/glpk.m,
scripts/signal/arch_fit.m, scripts/signal/bartlett.m,
scripts/signal/blackman.m, scripts/signal/diffpara.m,
scripts/signal/durbinlevinson.m, scripts/signal/hamming.m,
scripts/signal/hanning.m, scripts/sparse/eigs.m, scripts/sparse/pcg.m,
scripts/sparse/pcr.m, scripts/specfun/ellipke.m,
scripts/special-matrix/gallery.m, scripts/special-matrix/invhilb.m,
scripts/statistics/base/quantile.m,
scripts/statistics/tests/kruskal_wallis_test.m,
scripts/statistics/tests/manova.m, scripts/statistics/tests/mcnemar_test.m:
Add @nospell macro around proper names in documentation.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 21 Aug 2014 15:57:18 -0700 |
parents | 175b392e91fe |
children | 4197fc428c7d |
rev | line source |
---|---|
5610 | 1 /* |
2 | |
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3 Copyright (C) 2005-2013 David Bateman |
11523 | 4 Copyright (C) 1998-2005 Andy Adler |
7016 | 5 |
6 This file is part of Octave. | |
5610 | 7 |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
5610 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
5610 | 21 |
22 */ | |
23 | |
24 #ifdef HAVE_CONFIG_H | |
25 #include <config.h> | |
26 #endif | |
27 | |
28 #include "defun-dld.h" | |
29 #include "error.h" | |
30 #include "gripes.h" | |
31 #include "oct-obj.h" | |
32 #include "utils.h" | |
33 | |
5616 | 34 #include "oct-sparse.h" |
5610 | 35 #include "ov-re-sparse.h" |
36 #include "ov-cx-sparse.h" | |
37 #include "SparseQR.h" | |
38 #include "SparseCmplxQR.h" | |
39 | |
16313
6aafe87a3144
use int64_t for idx type if --enable-64
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
40 #ifdef USE_64_BIT_IDX_T |
5648 | 41 #define CXSPARSE_NAME(name) cs_dl ## name |
5610 | 42 #else |
5648 | 43 #define CXSPARSE_NAME(name) cs_di ## name |
5610 | 44 #endif |
45 | |
46 static RowVector | |
47 put_int (octave_idx_type *p, octave_idx_type n) | |
48 { | |
49 RowVector ret (n); | |
50 for (octave_idx_type i = 0; i < n; i++) | |
14854
5ae9f0f77635
maint: Use Octave coding conventions for coddling parenthis is DLD-FUNCTIONS directory
Rik <octave@nomad.inbox5.com>
parents:
14846
diff
changeset
|
51 ret.xelem (i) = p[i] + 1; |
5610 | 52 return ret; |
53 } | |
54 | |
6066 | 55 #if HAVE_CXSPARSE |
56 static octave_value_list | |
57 dmperm_internal (bool rank, const octave_value arg, int nargout) | |
5610 | 58 { |
59 octave_value_list retval; | |
60 octave_idx_type nr = arg.rows (); | |
61 octave_idx_type nc = arg.columns (); | |
62 SparseMatrix m; | |
63 SparseComplexMatrix cm; | |
5648 | 64 CXSPARSE_NAME () csm; |
5610 | 65 csm.m = nr; |
66 csm.n = nc; | |
7520 | 67 csm.x = 0; |
5610 | 68 csm.nz = -1; |
69 | |
70 if (arg.is_real_type ()) | |
71 { | |
72 m = arg.sparse_matrix_value (); | |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14501
diff
changeset
|
73 csm.nzmax = m.nnz (); |
5610 | 74 csm.p = m.xcidx (); |
75 csm.i = m.xridx (); | |
76 } | |
77 else | |
78 { | |
79 cm = arg.sparse_complex_matrix_value (); | |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14501
diff
changeset
|
80 csm.nzmax = cm.nnz (); |
5610 | 81 csm.p = cm.xcidx (); |
82 csm.i = cm.xridx (); | |
83 } | |
84 | |
85 if (!error_state) | |
86 { | |
6066 | 87 if (nargout <= 1 || rank) |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
88 { |
5792 | 89 #if defined(CS_VER) && (CS_VER >= 2) |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
90 octave_idx_type *jmatch = CXSPARSE_NAME (_maxtrans) (&csm, 0); |
5792 | 91 #else |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
92 octave_idx_type *jmatch = CXSPARSE_NAME (_maxtrans) (&csm); |
5792 | 93 #endif |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
94 if (rank) |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
95 { |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
96 octave_idx_type r = 0; |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
97 for (octave_idx_type i = 0; i < nc; i++) |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
98 if (jmatch[nr+i] >= 0) |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
99 r++; |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
100 retval(0) = static_cast<double>(r); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
101 } |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
102 else |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
103 retval(0) = put_int (jmatch + nr, nc); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
104 CXSPARSE_NAME (_free) (jmatch); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
105 } |
5610 | 106 else |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
107 { |
5792 | 108 #if defined(CS_VER) && (CS_VER >= 2) |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
109 CXSPARSE_NAME (d) *dm = CXSPARSE_NAME(_dmperm) (&csm, 0); |
5792 | 110 #else |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
111 CXSPARSE_NAME (d) *dm = CXSPARSE_NAME(_dmperm) (&csm); |
5792 | 112 #endif |
6066 | 113 |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
114 //retval(5) = put_int (dm->rr, 5); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
115 //retval(4) = put_int (dm->cc, 5); |
5792 | 116 #if defined(CS_VER) && (CS_VER >= 2) |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
117 retval(3) = put_int (dm->s, dm->nb+1); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
118 retval(2) = put_int (dm->r, dm->nb+1); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
119 retval(1) = put_int (dm->q, nc); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
120 retval(0) = put_int (dm->p, nr); |
5792 | 121 #else |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
122 retval(3) = put_int (dm->S, dm->nb+1); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
123 retval(2) = put_int (dm->R, dm->nb+1); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
124 retval(1) = put_int (dm->Q, nc); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
125 retval(0) = put_int (dm->P, nr); |
5792 | 126 #endif |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
127 CXSPARSE_NAME (_dfree) (dm); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
128 } |
5610 | 129 } |
6066 | 130 return retval; |
131 } | |
132 #endif | |
133 | |
134 DEFUN_DLD (dmperm, args, nargout, | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
135 "-*- texinfo -*-\n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
136 @deftypefn {Loadable Function} {@var{p} =} dmperm (@var{S})\n\ |
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
137 @deftypefnx {Loadable Function} {[@var{p}, @var{q}, @var{r}, @var{S}] =} dmperm (@var{S})\n\ |
6066 | 138 \n\ |
19074
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
139 @cindex @nospell{Dulmage-Mendelsohn} decomposition\n\ |
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
140 Perform a @nospell{Dulmage-Mendelsohn} permutation of the sparse matrix\n\ |
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
141 @var{S}.\n\ |
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
142 \n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
143 With a single output argument @code{dmperm} performs the row permutations\n\ |
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
144 @var{p} such that @code{@var{S}(@var{p},:)} has no zero elements on the\n\ |
6066 | 145 diagonal.\n\ |
146 \n\ | |
147 Called with two or more output arguments, returns the row and column\n\ | |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
148 permutations, such that @code{@var{S}(@var{p}, @var{q})} is in block\n\ |
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
149 triangular form. The values of @var{r} and @var{S} define the boundaries\n\ |
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
150 of the blocks. If @var{S} is square then @code{@var{r} == @var{S}}.\n\ |
6066 | 151 \n\ |
19074
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
152 The method used is described in: @nospell{A. Pothen & C.-J. Fan.}\n\ |
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
153 @cite{Computing the Block Triangular Form of a Sparse Matrix}.\n\ |
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
154 ACM Trans. Math. Software, 16(4):303-324, 1990.\n\ |
6066 | 155 @seealso{colamd, ccolamd}\n\ |
156 @end deftypefn") | |
157 { | |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14501
diff
changeset
|
158 int nargin = args.length (); |
6066 | 159 octave_value_list retval; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11553
diff
changeset
|
160 |
6066 | 161 if (nargin != 1) |
162 { | |
163 print_usage (); | |
164 return retval; | |
165 } | |
166 | |
167 #if HAVE_CXSPARSE | |
168 retval = dmperm_internal (false, args(0), nargout); | |
5610 | 169 #else |
170 error ("dmperm: not available in this version of Octave"); | |
171 #endif | |
172 | |
173 return retval; | |
174 } | |
175 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11553
diff
changeset
|
176 /* |
7243 | 177 %!testif HAVE_CXSPARSE |
14501
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
178 %! n = 20; |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
179 %! a = speye (n,n); |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
180 %! a = a(randperm (n),:); |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
181 %! assert (a(dmperm (a),:), speye (n)); |
5610 | 182 |
7243 | 183 %!testif HAVE_CXSPARSE |
14501
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
184 %! n = 20; |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
185 %! d = 0.2; |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
186 %! a = tril (sprandn (n,n,d), -1) + speye (n,n); |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
187 %! a = a(randperm (n), randperm (n)); |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
188 %! [p,q,r,s] = dmperm (a); |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
189 %! assert (tril (a(p,q), -1), sparse (n, n)); |
5610 | 190 */ |
191 | |
6066 | 192 DEFUN_DLD (sprank, args, nargout, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
193 "-*- texinfo -*-\n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
194 @deftypefn {Loadable Function} {@var{p} =} sprank (@var{S})\n\ |
12578
f5a780d675a1
Clean up operator and function indices in documentation.
Rik <octave@nomad.inbox5.com>
parents:
11586
diff
changeset
|
195 @cindex structural rank\n\ |
6066 | 196 \n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
197 Calculate the structural rank of the sparse matrix @var{S}. Note that\n\ |
6066 | 198 only the structure of the matrix is used in this calculation based on\n\ |
19074
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
199 a @nospell{Dulmage-Mendelsohn} permutation to block triangular form. As\n\ |
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
200 such the numerical rank of the matrix @var{S} is bounded by\n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
201 @code{sprank (@var{S}) >= rank (@var{S})}. Ignoring floating point errors\n\ |
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
202 @code{sprank (@var{S}) == rank (@var{S})}.\n\ |
6066 | 203 @seealso{dmperm}\n\ |
204 @end deftypefn") | |
205 { | |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14501
diff
changeset
|
206 int nargin = args.length (); |
6066 | 207 octave_value_list retval; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11553
diff
changeset
|
208 |
6066 | 209 if (nargin != 1) |
210 { | |
211 print_usage (); | |
212 return retval; | |
213 } | |
214 | |
215 #if HAVE_CXSPARSE | |
216 retval = dmperm_internal (true, args(0), nargout); | |
217 #else | |
218 error ("sprank: not available in this version of Octave"); | |
219 #endif | |
220 | |
221 return retval; | |
222 } | |
223 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11553
diff
changeset
|
224 /* |
14501
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
225 %!testif HAVE_CXSPARSE |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
226 %! assert (sprank (speye (20)), 20) |
7243 | 227 %!testif HAVE_CXSPARSE |
14501
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
228 %! assert (sprank ([1,0,2,0;2,0,4,0]), 2) |
6066 | 229 |
14501
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
230 %!error sprank (1,2) |
6066 | 231 */ |