GNU Octave 7.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
matrix_type.cc
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2005-2022 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if defined (HAVE_CONFIG_H)
27# include "config.h"
28#endif
29
30#include <algorithm>
31
32#include "ov.h"
33#include "defun.h"
34#include "error.h"
35#include "ov-re-mat.h"
36#include "ov-cx-mat.h"
37#include "ov-re-sparse.h"
38#include "ov-cx-sparse.h"
39#include "MatrixType.h"
40#include "oct-locbuf.h"
41
42OCTAVE_NAMESPACE_BEGIN
43
44DEFUN (matrix_type, args, ,
45 doc: /* -*- texinfo -*-
46@deftypefn {} {@var{type} =} matrix_type (@var{A})
47@deftypefnx {} {@var{type} =} matrix_type (@var{A}, "nocompute")
48@deftypefnx {} {@var{A} =} matrix_type (@var{A}, @var{type})
49@deftypefnx {} {@var{A} =} matrix_type (@var{A}, "upper", @var{perm})
50@deftypefnx {} {@var{A} =} matrix_type (@var{A}, "lower", @var{perm})
51@deftypefnx {} {@var{A} =} matrix_type (@var{A}, "banded", @var{nl}, @var{nu})
52Identify the matrix type or mark a matrix as a particular type.
53
54This allows more rapid solutions of linear equations involving @var{A} to be
55performed.
56
57Called with a single argument, @code{matrix_type} returns the type of the
58matrix and caches it for future use.
59
60Called with more than one argument, @code{matrix_type} allows the type of
61the matrix to be defined.
62
63If the option @qcode{"nocompute"} is given, the function will not attempt
64to guess the type if it is still unknown. This is useful for debugging
65purposes.
66
67The possible matrix types depend on whether the matrix is full or sparse,
68and can be one of the following
69
70@table @asis
71@item @qcode{"unknown"}
72Remove any previously cached matrix type, and mark type as unknown.
73
74@item @qcode{"full"}
75Mark the matrix as full.
76
77@item @qcode{"positive definite"}
78Probable full positive definite matrix.
79
80@item @qcode{"diagonal"}
81Diagonal matrix. (Sparse matrices only)
82
83@item @qcode{"permuted diagonal"}
84Permuted Diagonal matrix. The permutation does not need to be specifically
85indicated, as the structure of the matrix explicitly gives this. (Sparse
86matrices only)
87
88@item @qcode{"upper"}
89Upper triangular. If the optional third argument @var{perm} is given, the
90matrix is assumed to be a permuted upper triangular with the permutations
91defined by the vector @var{perm}.
92
93@item @qcode{"lower"}
94Lower triangular. If the optional third argument @var{perm} is given, the
95matrix is assumed to be a permuted lower triangular with the permutations
96defined by the vector @var{perm}.
97
98@item @qcode{"banded"}
99@itemx @qcode{"banded positive definite"}
100Banded matrix with the band size of @var{nl} below the diagonal and @var{nu}
101above it. If @var{nl} and @var{nu} are 1, then the matrix is tridiagonal
102and treated with specialized code. In addition the matrix can be marked as
103probably a positive definite. (Sparse matrices only)
104
105@item @qcode{"singular"}
106The matrix is assumed to be singular and will be treated with a minimum norm
107solution.
108
109@end table
110
111Note that the matrix type will be discovered automatically on the first
112attempt to solve a linear equation involving @var{A}. Therefore
113@code{matrix_type} is only useful to give Octave hints of the matrix type.
114Incorrectly defining the matrix type will result in incorrect results from
115solutions of linear equations; it is entirely @strong{the responsibility of
116the user} to correctly identify the matrix type.
117
118Also, the test for positive definiteness is a low-cost test for a Hermitian
119matrix with a real positive diagonal. This does not guarantee that the
120matrix is positive definite, but only that it is a probable candidate. When
121such a matrix is factorized, a Cholesky@tie{}factorization is first
122attempted, and if that fails the matrix is then treated with an
123LU@tie{}factorization. Once the matrix has been factorized,
124@code{matrix_type} will return the correct classification of the matrix.
125@end deftypefn */)
126{
127 int nargin = args.length ();
128
129 if (nargin == 0 || nargin > 4)
130 print_usage ();
131
132 bool autocomp = true;
133 if (nargin == 2 && args(1).is_string ()
134 && args(1).string_value () == "nocompute")
135 {
136 nargin = 1;
137 autocomp = false;
138 }
139
140 octave_value retval;
141
142 if (args(0).is_scalar_type ())
143 {
144 if (nargin == 1)
145 retval = octave_value ("Diagonal");
146 else
147 retval = args(0);
148 }
149 else if (args(0).issparse ())
150 {
151 if (nargin == 1)
152 {
153 MatrixType mattyp;
154
155 if (args(0).iscomplex ())
156 {
157 mattyp = args(0).matrix_type ();
158
159 if (mattyp.is_unknown () && autocomp)
160 {
162 = args(0).sparse_complex_matrix_value ();
163
164 mattyp = MatrixType (m);
165 args(0).matrix_type (mattyp);
166 }
167 }
168 else
169 {
170 mattyp = args(0).matrix_type ();
171
172 if (mattyp.is_unknown () && autocomp)
173 {
174 SparseMatrix m = args(0).sparse_matrix_value ();
175
176 mattyp = MatrixType (m);
177 args(0).matrix_type (mattyp);
178 }
179 }
180
181 int typ = mattyp.type ();
182
183 if (typ == MatrixType::Diagonal)
184 retval = octave_value ("Diagonal");
185 else if (typ == MatrixType::Permuted_Diagonal)
186 retval = octave_value ("Permuted Diagonal");
187 else if (typ == MatrixType::Upper)
188 retval = octave_value ("Upper");
189 else if (typ == MatrixType::Permuted_Upper)
190 retval = octave_value ("Permuted Upper");
191 else if (typ == MatrixType::Lower)
192 retval = octave_value ("Lower");
193 else if (typ == MatrixType::Permuted_Lower)
194 retval = octave_value ("Permuted Lower");
195 else if (typ == MatrixType::Banded)
196 retval = octave_value ("Banded");
197 else if (typ == MatrixType::Banded_Hermitian)
198 retval = octave_value ("Banded Positive Definite");
199 else if (typ == MatrixType::Tridiagonal)
200 retval = octave_value ("Tridiagonal");
201 else if (typ == MatrixType::Tridiagonal_Hermitian)
202 retval = octave_value ("Tridiagonal Positive Definite");
203 else if (typ == MatrixType::Hermitian)
204 retval = octave_value ("Positive Definite");
205 else if (typ == MatrixType::Rectangular)
206 {
207 if (args(0).rows () == args(0).columns ())
208 retval = octave_value ("Singular");
209 else
210 retval = octave_value ("Rectangular");
211 }
212 else if (typ == MatrixType::Full)
213 retval = octave_value ("Full");
214 else
215 retval = octave_value ("Unknown");
216 }
217 else
218 {
219 // Ok, we're changing the matrix type
220 std::string str_typ = args(1).xstring_value ("matrix_type: TYPE must be a string");
221
222 // FIXME: why do I have to explicitly call the constructor?
223 MatrixType mattyp = MatrixType ();
224
225 octave_idx_type nl = 0;
226 octave_idx_type nu = 0;
227
228 // Use STL function to convert to lower case
229 std::transform (str_typ.begin (), str_typ.end (),
230 str_typ.begin (), tolower);
231
232 if (str_typ == "diagonal")
233 mattyp.mark_as_diagonal ();
234 if (str_typ == "permuted diagonal")
236 else if (str_typ == "upper")
237 mattyp.mark_as_upper_triangular ();
238 else if (str_typ == "lower")
239 mattyp.mark_as_lower_triangular ();
240 else if (str_typ == "banded"
241 || str_typ == "banded positive definite")
242 {
243 if (nargin != 4)
244 error ("matrix_type: banded matrix type requires 4 arguments");
245
246 nl = args(2).xnint_value ("matrix_type: band size NL, NU must be integers");
247 nu = args(3).xnint_value ("matrix_type: band size NL, NU must be integers");
248
249 if (nl == 1 && nu == 1)
250 mattyp.mark_as_tridiagonal ();
251 else
252 mattyp.mark_as_banded (nu, nl);
253
254 if (str_typ == "banded positive definite")
255 mattyp.mark_as_symmetric ();
256 }
257 else if (str_typ == "positive definite")
258 {
259 mattyp.mark_as_full ();
260 mattyp.mark_as_symmetric ();
261 }
262 else if (str_typ == "singular")
263 mattyp.mark_as_rectangular ();
264 else if (str_typ == "full")
265 mattyp.mark_as_full ();
266 else if (str_typ == "unknown")
267 mattyp.invalidate_type ();
268 else
269 error ("matrix_type: Unknown matrix type %s", str_typ.c_str ());
270
271 if (nargin == 3
272 && (str_typ == "upper" || str_typ == "lower"))
273 {
274 const ColumnVector perm = args(2).xvector_value ("matrix_type: Invalid permutation vector PERM");
275
276 octave_idx_type len = perm.numel ();
277 dim_vector dv = args(0).dims ();
278
279 if (len != dv(0))
280 error ("matrix_type: Invalid permutation vector PERM");
281
283
284 for (octave_idx_type i = 0; i < len; i++)
285 p[i] = static_cast<octave_idx_type> (perm (i)) - 1;
286
287 mattyp.mark_as_permuted (len, p);
288 }
289 else if (nargin != 2
290 && str_typ != "banded positive definite"
291 && str_typ != "banded")
292 error ("matrix_type: Invalid number of arguments");
293
294 // Set the matrix type
295 if (args(0).iscomplex ())
296 retval = octave_value (args(0).sparse_complex_matrix_value (),
297 mattyp);
298 else
299 retval = octave_value (args(0).sparse_matrix_value (),
300 mattyp);
301 }
302 }
303 else
304 {
305 if (nargin == 1)
306 {
307 MatrixType mattyp;
308
309 if (args(0).iscomplex ())
310 {
311 mattyp = args(0).matrix_type ();
312
313 if (mattyp.is_unknown () && autocomp)
314 {
315 if (args(0).is_single_type ())
316 {
318 m = args(0).float_complex_matrix_value ();
319
320 mattyp = MatrixType (m);
321 args(0).matrix_type (mattyp);
322 }
323 else
324 {
325 ComplexMatrix m = args(0).complex_matrix_value ();
326
327 mattyp = MatrixType (m);
328 args(0).matrix_type (mattyp);
329 }
330 }
331 }
332 else
333 {
334 mattyp = args(0).matrix_type ();
335
336 if (mattyp.is_unknown () && autocomp)
337 {
338 if (args(0).is_single_type ())
339 {
340 FloatMatrix m = args(0).float_matrix_value ();
341
342 mattyp = MatrixType (m);
343 args(0).matrix_type (mattyp);
344 }
345 else
346 {
347 Matrix m = args(0).matrix_value ();
348
349 mattyp = MatrixType (m);
350 args(0).matrix_type (mattyp);
351 }
352 }
353 }
354
355 int typ = mattyp.type ();
356
357 if (typ == MatrixType::Upper)
358 retval = octave_value ("Upper");
359 else if (typ == MatrixType::Permuted_Upper)
360 retval = octave_value ("Permuted Upper");
361 else if (typ == MatrixType::Lower)
362 retval = octave_value ("Lower");
363 else if (typ == MatrixType::Permuted_Lower)
364 retval = octave_value ("Permuted Lower");
365 else if (typ == MatrixType::Hermitian)
366 retval = octave_value ("Positive Definite");
367 else if (typ == MatrixType::Rectangular)
368 {
369 if (args(0).rows () == args(0).columns ())
370 retval = octave_value ("Singular");
371 else
372 retval = octave_value ("Rectangular");
373 }
374 else if (typ == MatrixType::Full)
375 retval = octave_value ("Full");
376 else
377 retval = octave_value ("Unknown");
378 }
379 else
380 {
381 // Ok, we're changing the matrix type
382 std::string str_typ = args(1).xstring_value ("matrix_type: TYPE must be a string");
383
384 // FIXME: why do I have to explicitly call the constructor?
386
387 // Use STL function to convert to lower case
388 std::transform (str_typ.begin (), str_typ.end (),
389 str_typ.begin (), tolower);
390
391 if (str_typ == "upper")
392 mattyp.mark_as_upper_triangular ();
393 else if (str_typ == "lower")
394 mattyp.mark_as_lower_triangular ();
395 else if (str_typ == "positive definite")
396 {
397 mattyp.mark_as_full ();
398 mattyp.mark_as_symmetric ();
399 }
400 else if (str_typ == "singular")
401 mattyp.mark_as_rectangular ();
402 else if (str_typ == "full")
403 mattyp.mark_as_full ();
404 else if (str_typ == "unknown")
405 mattyp.invalidate_type ();
406 else
407 error ("matrix_type: Unknown matrix type %s", str_typ.c_str ());
408
409 if (nargin == 3 && (str_typ == "upper" || str_typ == "lower"))
410 {
411 const ColumnVector perm = args(2).xvector_value ("matrix_type: Invalid permutation vector PERM");
412
413 octave_idx_type len = perm.numel ();
414 dim_vector dv = args(0).dims ();
415
416 if (len != dv(0))
417 error ("matrix_type: Invalid permutation vector PERM");
418
420
421 for (octave_idx_type i = 0; i < len; i++)
422 p[i] = static_cast<octave_idx_type> (perm (i)) - 1;
423
424 mattyp.mark_as_permuted (len, p);
425 }
426 else if (nargin != 2)
427 error ("matrix_type: Invalid number of arguments");
428
429 // Set the matrix type
430 if (args(0).is_single_type ())
431 {
432 if (args(0).iscomplex ())
433 retval = octave_value (args(0).float_complex_matrix_value (),
434 mattyp);
435 else
436 retval = octave_value (args(0).float_matrix_value (),
437 mattyp);
438 }
439 else
440 {
441 if (args(0).iscomplex ())
442 retval = octave_value (args(0).complex_matrix_value (),
443 mattyp);
444 else
445 retval = octave_value (args(0).matrix_value (), mattyp);
446 }
447 }
448 }
449
450 return retval;
451}
452
453/*
454## FIXME:
455## Disable tests for lower under-determined and upper over-determined
456## matrices as this detection is disabled in MatrixType due to issues
457## of non minimum norm solution being found.
458
459%!assert (matrix_type (speye (10,10)), "Diagonal")
460%!assert (matrix_type (speye (10,10)([2:10,1],:)), "Permuted Diagonal")
461%!assert (matrix_type ([[speye(10,10);sparse(1,10)],[1;sparse(9,1);1]]), "Upper")
462%!assert (matrix_type ([[speye(10,10);sparse(1,10)],[1;sparse(9,1);1]](:,[2,1,3:11])), "Permuted Upper")
463%!assert (matrix_type ([speye(10,10),sparse(10,1);1,sparse(1,9),1]), "Lower")
464%!assert (matrix_type ([speye(10,10),sparse(10,1);1,sparse(1,9),1]([2,1,3:11],:)), "Permuted Lower")
465
466%!test
467%! bnd = spparms ("bandden");
468%! spparms ("bandden", 0.5);
469%! a = spdiags (rand (10,3)-0.5,[-1,0,1],10,10);
470%! assert (matrix_type (a), "Tridiagonal");
471%! assert (matrix_type (a'+a+2*speye (10)), "Tridiagonal Positive Definite");
472%! spparms ("bandden", bnd);
473%!test
474%! bnd=spparms ("bandden");
475%! spparms ("bandden", 0.5);
476%! a = spdiags (randn (10,4),[-2:1],10,10);
477%! assert (matrix_type (a), "Banded");
478%! assert (matrix_type (a'*a), "Banded Positive Definite");
479%! spparms ("bandden", bnd);
480%!test
481%! a = [speye(10,10),[sparse(9,1);1];-1,sparse(1,9),1];
482%! assert (matrix_type (a), "Full");
483%! assert (matrix_type (a'*a), "Positive Definite");
484
485%!assert (matrix_type (speye (10,11)), "Diagonal")
486%!assert (matrix_type (speye (10,11)([2:10,1],:)), "Permuted Diagonal")
487%!assert (matrix_type (speye (11,10)), "Diagonal")
488%!assert (matrix_type (speye (11,10)([2:11,1],:)), "Permuted Diagonal")
489%#!assert (matrix_type ([[speye(10,10);sparse(1,10)],[[1,1];sparse(9,2);[1,1]]]), "Upper")
490%#!assert (matrix_type ([[speye(10,10);sparse(1,10)],[[1,1];sparse(9,2);[1,1]]](:,[2,1,3:12])), "Permuted Upper")
491%!assert (matrix_type ([speye(11,9),[1;sparse(8,1);1;0]]), "Upper")
492%!assert (matrix_type ([speye(11,9),[1;sparse(8,1);1;0]](:,[2,1,3:10])), "Permuted Upper")
493%#!assert (matrix_type ([speye(10,10),sparse(10,1);[1;1],sparse(2,9),[1;1]]), "Lower")
494%#!assert (matrix_type ([speye(10,10),sparse(10,1);[1;1],sparse(2,9),[1;1]]([2,1,3:12],:)), "Permuted Lower")
495%!assert (matrix_type ([speye(9,11);[1,sparse(1,8),1,0]]), "Lower")
496%!assert (matrix_type ([speye(9,11);[1,sparse(1,8),1,0]]([2,1,3:10],:)), "Permuted Lower")
497%!assert (matrix_type (spdiags (randn (10,4),[-2:1],10,9)), "Rectangular")
498
499%!assert (matrix_type (1i*speye (10,10)), "Diagonal")
500%!assert (matrix_type (1i*speye (10,10)([2:10,1],:)), "Permuted Diagonal")
501%!assert (matrix_type ([[speye(10,10);sparse(1,10)],[1i;sparse(9,1);1]]), "Upper")
502%!assert (matrix_type ([[speye(10,10);sparse(1,10)],[1i;sparse(9,1);1]](:,[2,1,3:11])), "Permuted Upper")
503%!assert (matrix_type ([speye(10,10),sparse(10,1);1i,sparse(1,9),1]), "Lower")
504%!assert (matrix_type ([speye(10,10),sparse(10,1);1i,sparse(1,9),1]([2,1,3:11],:)), "Permuted Lower")
505
506%!test
507%! bnd = spparms ("bandden");
508%! spparms ("bandden", 0.5);
509%! assert (matrix_type (spdiags (1i*randn (10,3),[-1,0,1],10,10)), "Tridiagonal");
510%! a = 1i*(rand (9,1)-0.5);
511%! a = [[a;0],ones(10,1),[0;-a]];
512%! assert (matrix_type (spdiags (a,[-1,0,1],10,10)), "Tridiagonal Positive Definite");
513%! spparms ("bandden", bnd);
514%!test
515%! bnd = spparms ("bandden");
516%! spparms ("bandden", 0.5);
517%! assert (matrix_type (spdiags (1i*randn (10,4),[-2:1],10,10)), "Banded");
518%! a = 1i*(rand (9,2)-0.5);
519%! a = [[a;[0,0]],ones(10,1),[[0;-a(:,2)],[0;0;-a(1:8,1)]]];
520%! assert (matrix_type (spdiags (a,[-2:2],10,10)), "Banded Positive Definite");
521%! spparms ("bandden", bnd);
522%!test
523%! a = [speye(10,10),[sparse(9,1);1i];-1,sparse(1,9),1];
524%! assert (matrix_type (a), "Full");
525%! assert (matrix_type (a'*a), "Positive Definite");
526
527%!assert (matrix_type (1i*speye (10,11)), "Diagonal")
528%!assert (matrix_type (1i*speye (10,11)([2:10,1],:)), "Permuted Diagonal")
529%!assert (matrix_type (1i*speye (11,10)), "Diagonal")
530%!assert (matrix_type (1i*speye (11,10)([2:11,1],:)), "Permuted Diagonal")
531%#!assert (matrix_type ([[speye(10,10);sparse(1,10)],[[1i,1i];sparse(9,2);[1i,1i]]]), "Upper")
532%#!assert (matrix_type ([[speye(10,10);sparse(1,10)],[[1i,1i];sparse(9,2);[1i,1i]]](:,[2,1,3:12])), "Permuted Upper")
533%!assert (matrix_type ([speye(11,9),[1i;sparse(8,1);1i;0]]), "Upper")
534%!assert (matrix_type ([speye(11,9),[1i;sparse(8,1);1i;0]](:,[2,1,3:10])), "Permuted Upper")
535%#!assert (matrix_type ([speye(10,10),sparse(10,1);[1i;1i],sparse(2,9),[1i;1i]]), "Lower")
536%#!assert (matrix_type ([speye(10,10),sparse(10,1);[1i;1i],sparse(2,9),[1i;1i]]([2,1,3:12],:)), "Permuted Lower")
537%!assert (matrix_type ([speye(9,11);[1i,sparse(1,8),1i,0]]), "Lower")
538%!assert (matrix_type ([speye(9,11);[1i,sparse(1,8),1i,0]]([2,1,3:10],:)), "Permuted Lower")
539%!assert (matrix_type (1i*spdiags(randn(10,4),[-2:1],10,9)), "Rectangular")
540
541%!test
542%! a = matrix_type (spdiags (randn (10,3),[-1,0,1],10,10), "Singular");
543%! assert (matrix_type (a), "Singular");
544
545%!assert (matrix_type (triu (ones (10,10))), "Upper")
546%!assert (matrix_type (triu (ones (10,10),-1)), "Full")
547%!assert (matrix_type (tril (ones (10,10))), "Lower")
548%!assert (matrix_type (tril (ones (10,10),1)), "Full")
549%!assert (matrix_type (10*eye (10,10) + ones (10,10)), "Positive Definite")
550%!assert (matrix_type (ones (11,10)), "Rectangular")
551%!test
552%! a = matrix_type (ones (10,10), "Singular");
553%! assert (matrix_type (a), "Singular");
554
555%!assert (matrix_type (triu (1i*ones (10,10))), "Upper")
556%!assert (matrix_type (triu (1i*ones (10,10),-1)), "Full")
557%!assert (matrix_type (tril (1i*ones (10,10))), "Lower")
558%!assert (matrix_type (tril (1i*ones (10,10),1)), "Full")
559%!assert (matrix_type (10*eye (10,10) + 1i*triu (ones (10,10),1) -1i*tril (ones (10,10),-1)), "Positive Definite")
560%!assert (matrix_type (ones (11,10)), "Rectangular")
561%!test
562%! a = matrix_type (ones (10,10), "Singular");
563%! assert (matrix_type (a), "Singular");
564*/
565
566OCTAVE_NAMESPACE_END
octave_idx_type numel(void) const
Number of elements in the array.
Definition: Array.h:411
void mark_as_full(void)
Definition: MatrixType.h:153
void invalidate_type(void)
Definition: MatrixType.h:138
void mark_as_permuted_diagonal(void)
Definition: MatrixType.h:142
void mark_as_rectangular(void)
Definition: MatrixType.h:155
@ Tridiagonal_Hermitian
Definition: MatrixType.h:53
@ Permuted_Lower
Definition: MatrixType.h:48
@ Banded_Hermitian
Definition: MatrixType.h:51
@ Permuted_Diagonal
Definition: MatrixType.h:44
@ Permuted_Upper
Definition: MatrixType.h:47
OCTAVE_API void mark_as_permuted(const octave_idx_type np, const octave_idx_type *p)
Definition: MatrixType.cc:934
bool is_unknown(void) const
Definition: MatrixType.h:132
void mark_as_upper_triangular(void)
Definition: MatrixType.h:144
void mark_as_banded(const octave_idx_type ku, const octave_idx_type kl)
Definition: MatrixType.h:150
void mark_as_lower_triangular(void)
Definition: MatrixType.h:146
void mark_as_tridiagonal(void)
Definition: MatrixType.h:148
OCTAVE_API int type(bool quiet=true)
Definition: MatrixType.cc:656
void mark_as_diagonal(void)
Definition: MatrixType.h:140
OCTAVE_API void mark_as_symmetric(void)
Definition: MatrixType.cc:903
Definition: dMatrix.h:42
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:94
OCTINTERP_API void print_usage(void)
Definition: defun-int.h:72
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
Definition: defun.h:56
void error(const char *fmt,...)
Definition: error.cc:980
ColumnVector transform(const Matrix &m, double x, double y, double z)
Definition: graphics.cc:5861
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
Definition: oct-locbuf.h:44
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
F77_RET_T len
Definition: xerbla.cc:61