Mercurial > octave
annotate libinterp/dldfcn/dmperm.cc @ 20939:b17fda023ca6
maint: Use new C++ archetype in more files.
Place input validation first in files.
Move declaration of retval down in function to be closer to point of usage.
Eliminate else clause after if () error.
Use "return ovl()" where it makes sense.
* find.cc, gammainc.cc, gcd.cc, getgrent.cc, getpwent.cc, givens.cc,
graphics.cc, help.cc, hess.cc, hex2num.cc, input.cc, kron.cc, load-path.cc,
load-save.cc, lookup.cc, mappers.cc, matrix_type.cc, mgorth.cc, nproc.cc,
ordschur.cc, pager.cc, pinv.cc, pr-output.cc, profiler.cc, psi.cc, quad.cc,
rcond.cc, regexp.cc, schur.cc, sighandlers.cc, sparse.cc, str2double.cc,
strfind.cc, strfns.cc, sub2ind.cc, svd.cc, sylvester.cc, symtab.cc,
syscalls.cc, sysdep.cc, time.cc, toplev.cc, tril.cc, tsearch.cc, typecast.cc,
urlwrite.cc, utils.cc, variables.cc, __delaunayn__.cc, __eigs__.cc,
__glpk__.cc, __magick_read__.cc, __osmesa_print__.cc, __voronoi__.cc, amd.cc,
audiodevinfo.cc, audioread.cc, chol.cc, colamd.cc, dmperm.cc, fftw.cc, qr.cc,
symbfact.cc, symrcm.cc, ov-bool-mat.cc, ov-cell.cc, ov-class.cc,
ov-classdef.cc, ov-fcn-handle.cc, ov-fcn-inline.cc, ov-flt-re-mat.cc,
ov-java.cc, ov-null-mat.cc, ov-oncleanup.cc, ov-re-mat.cc, ov-struct.cc,
ov-typeinfo.cc, ov-usr-fcn.cc, ov.cc, octave.cc:
Use new C++ archetype in more files.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 18 Dec 2015 15:37:22 -0800 |
parents | 61892a245653 |
children | 48b2ad5ee801 |
rev | line source |
---|---|
5610 | 1 /* |
2 | |
19697
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19040
diff
changeset
|
3 Copyright (C) 2005-2015 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 | |
20555
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
85 if (nargout <= 1 || rank) |
5610 | 86 { |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
20790
diff
changeset
|
87 #if defined (CS_VER) && (CS_VER >= 2) |
20555
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
88 octave_idx_type *jmatch = CXSPARSE_NAME (_maxtrans) (&csm, 0); |
5792 | 89 #else |
20555
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
90 octave_idx_type *jmatch = CXSPARSE_NAME (_maxtrans) (&csm); |
5792 | 91 #endif |
20555
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
92 if (rank) |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
93 { |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
94 octave_idx_type r = 0; |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
95 for (octave_idx_type i = 0; i < nc; i++) |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
96 if (jmatch[nr+i] >= 0) |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
97 r++; |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
98 retval(0) = static_cast<double>(r); |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9064
diff
changeset
|
99 } |
5610 | 100 else |
20555
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
101 retval(0) = put_int (jmatch + nr, nc); |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
102 CXSPARSE_NAME (_free) (jmatch); |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
103 } |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
104 else |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
105 { |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
20790
diff
changeset
|
106 #if defined (CS_VER) && (CS_VER >= 2) |
20555
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
107 CXSPARSE_NAME (d) *dm = CXSPARSE_NAME(_dmperm) (&csm, 0); |
5792 | 108 #else |
20555
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
109 CXSPARSE_NAME (d) *dm = CXSPARSE_NAME(_dmperm) (&csm); |
5792 | 110 #endif |
6066 | 111 |
20555
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
112 //retval(5) = put_int (dm->rr, 5); |
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
113 //retval(4) = put_int (dm->cc, 5); |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
20790
diff
changeset
|
114 #if defined (CS_VER) && (CS_VER >= 2) |
20860
61892a245653
2015 Code Sprint: dmperm.cc: use ovl().
Rik <rik@octave.org>
parents:
20853
diff
changeset
|
115 retval = ovl (put_int (dm->p, nr), put_int (dm->q, nc), |
61892a245653
2015 Code Sprint: dmperm.cc: use ovl().
Rik <rik@octave.org>
parents:
20853
diff
changeset
|
116 put_int (dm->r, dm->nb+1), put_int (dm->s, dm->nb+1)); |
5792 | 117 #else |
20860
61892a245653
2015 Code Sprint: dmperm.cc: use ovl().
Rik <rik@octave.org>
parents:
20853
diff
changeset
|
118 retval = ovl (put_int (dm->P, nr), put_int (dm->Q, nc), |
61892a245653
2015 Code Sprint: dmperm.cc: use ovl().
Rik <rik@octave.org>
parents:
20853
diff
changeset
|
119 put_int (dm->R, dm->nb+1), put_int (dm->S, dm->nb+1)); |
5792 | 120 #endif |
20555
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
121 CXSPARSE_NAME (_dfree) (dm); |
5610 | 122 } |
20555
f90c8372b7ba
eliminate many more simple uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20163
diff
changeset
|
123 |
6066 | 124 return retval; |
125 } | |
126 #endif | |
127 | |
128 DEFUN_DLD (dmperm, args, nargout, | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
129 "-*- texinfo -*-\n\ |
20853
1142cf6abc0d
2015 Code Sprint: remove class of function from docstring for all C++ files.
Rik <rik@octave.org>
parents:
20818
diff
changeset
|
130 @deftypefn {} {@var{p} =} dmperm (@var{S})\n\ |
1142cf6abc0d
2015 Code Sprint: remove class of function from docstring for all C++ files.
Rik <rik@octave.org>
parents:
20818
diff
changeset
|
131 @deftypefnx {} {[@var{p}, @var{q}, @var{r}, @var{S}] =} dmperm (@var{S})\n\ |
6066 | 132 \n\ |
19040
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
133 @cindex @nospell{Dulmage-Mendelsohn} decomposition\n\ |
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
134 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
|
135 @var{S}.\n\ |
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
136 \n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
137 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
|
138 @var{p} such that @code{@var{S}(@var{p},:)} has no zero elements on the\n\ |
6066 | 139 diagonal.\n\ |
140 \n\ | |
141 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
|
142 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
|
143 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
|
144 of the blocks. If @var{S} is square then @code{@var{r} == @var{S}}.\n\ |
6066 | 145 \n\ |
19040
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
146 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
|
147 @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
|
148 ACM Trans. Math. Software, 16(4):303-324, 1990.\n\ |
6066 | 149 @seealso{colamd, ccolamd}\n\ |
150 @end deftypefn") | |
151 { | |
20939
b17fda023ca6
maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents:
20860
diff
changeset
|
152 #if HAVE_CXSPARSE |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11553
diff
changeset
|
153 |
20818
cef0448a6ed2
eliminate unnecessary uses of nargin
John W. Eaton <jwe@octave.org>
parents:
20812
diff
changeset
|
154 if (args.length () != 1) |
20790
c2d9556d51d0
eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents:
20555
diff
changeset
|
155 print_usage (); |
6066 | 156 |
20939
b17fda023ca6
maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents:
20860
diff
changeset
|
157 return ovl (dmperm_internal (false, args(0), nargout)); |
b17fda023ca6
maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents:
20860
diff
changeset
|
158 |
5610 | 159 #else |
160 error ("dmperm: not available in this version of Octave"); | |
161 #endif | |
162 } | |
163 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11553
diff
changeset
|
164 /* |
7243 | 165 %!testif HAVE_CXSPARSE |
14501
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
166 %! n = 20; |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
167 %! a = speye (n,n); |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
168 %! a = a(randperm (n),:); |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
169 %! assert (a(dmperm (a),:), speye (n)); |
5610 | 170 |
7243 | 171 %!testif HAVE_CXSPARSE |
14501
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
172 %! n = 20; |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
173 %! d = 0.2; |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
174 %! 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
|
175 %! 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
|
176 %! [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
|
177 %! assert (tril (a(p,q), -1), sparse (n, n)); |
5610 | 178 */ |
179 | |
6066 | 180 DEFUN_DLD (sprank, args, nargout, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
181 "-*- texinfo -*-\n\ |
20853
1142cf6abc0d
2015 Code Sprint: remove class of function from docstring for all C++ files.
Rik <rik@octave.org>
parents:
20818
diff
changeset
|
182 @deftypefn {} {@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
|
183 @cindex structural rank\n\ |
6066 | 184 \n\ |
20163
075a5e2e1ba5
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
185 Calculate the structural rank of the sparse matrix @var{S}.\n\ |
075a5e2e1ba5
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
186 \n\ |
075a5e2e1ba5
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
187 Note that only the structure of the matrix is used in this calculation based\n\ |
075a5e2e1ba5
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
188 on a @nospell{Dulmage-Mendelsohn} permutation to block triangular form. As\n\ |
19040
0850b5212619
doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
189 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
|
190 @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
|
191 @code{sprank (@var{S}) == rank (@var{S})}.\n\ |
6066 | 192 @seealso{dmperm}\n\ |
193 @end deftypefn") | |
194 { | |
20939
b17fda023ca6
maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents:
20860
diff
changeset
|
195 #if HAVE_CXSPARSE |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11553
diff
changeset
|
196 |
20818
cef0448a6ed2
eliminate unnecessary uses of nargin
John W. Eaton <jwe@octave.org>
parents:
20812
diff
changeset
|
197 if (args.length () != 1) |
20790
c2d9556d51d0
eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents:
20555
diff
changeset
|
198 print_usage (); |
6066 | 199 |
20939
b17fda023ca6
maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents:
20860
diff
changeset
|
200 return ovl (dmperm_internal (true, args(0), nargout)); |
b17fda023ca6
maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents:
20860
diff
changeset
|
201 |
6066 | 202 #else |
203 error ("sprank: not available in this version of Octave"); | |
204 #endif | |
205 } | |
206 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11553
diff
changeset
|
207 /* |
14501
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
208 %!testif HAVE_CXSPARSE |
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
209 %! assert (sprank (speye (20)), 20) |
7243 | 210 %!testif HAVE_CXSPARSE |
14501
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
211 %! assert (sprank ([1,0,2,0;2,0,4,0]), 2) |
6066 | 212 |
14501
60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
213 %!error sprank (1,2) |
6066 | 214 */ |