GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
floatQR.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2015 John W. Eaton
4 Copyright (C) 2008-2009 Jaroslav Hajek
5 Copyright (C) 2009 VZLU Prague
6 
7 This file is part of Octave.
8 
9 Octave is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published by the
11 Free Software Foundation; either version 3 of the License, or (at your
12 option) any later version.
13 
14 Octave is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Octave; see the file COPYING. If not, see
21 <http://www.gnu.org/licenses/>.
22 
23 */
24 
25 #ifdef HAVE_CONFIG_H
26 #include <config.h>
27 #endif
28 
29 #include "floatQR.h"
30 #include "f77-fcn.h"
31 #include "lo-error.h"
32 #include "Range.h"
33 #include "idx-vector.h"
34 #include "oct-locbuf.h"
35 
36 #include "base-qr.cc"
37 
38 template class base_qr<FloatMatrix>;
39 
40 extern "C"
41 {
42  F77_RET_T
43  F77_FUNC (sgeqrf, SGEQRF) (const octave_idx_type&, const octave_idx_type&,
44  float*, const octave_idx_type&, float*, float*,
45  const octave_idx_type&, octave_idx_type&);
46 
47  F77_RET_T
48  F77_FUNC (sorgqr, SORGQR) (const octave_idx_type&, const octave_idx_type&,
49  const octave_idx_type&, float*,
50  const octave_idx_type&, float*, float*,
51  const octave_idx_type&, octave_idx_type&);
52 
53 #ifdef HAVE_QRUPDATE
54 
55  F77_RET_T
56  F77_FUNC (sqr1up, SQR1UP) (const octave_idx_type&, const octave_idx_type&,
57  const octave_idx_type&, float*,
58  const octave_idx_type&, float*,
59  const octave_idx_type&, float*, float*, float*);
60 
61  F77_RET_T
62  F77_FUNC (sqrinc, SQRINC) (const octave_idx_type&, const octave_idx_type&,
63  const octave_idx_type&, float*,
64  const octave_idx_type&, float*,
65  const octave_idx_type&,
66  const octave_idx_type&, const float*, float*);
67 
68  F77_RET_T
69  F77_FUNC (sqrdec, SQRDEC) (const octave_idx_type&, const octave_idx_type&,
70  const octave_idx_type&, float*,
71  const octave_idx_type&, float*,
72  const octave_idx_type&,
73  const octave_idx_type&, float*);
74 
75  F77_RET_T
76  F77_FUNC (sqrinr, SQRINR) (const octave_idx_type&, const octave_idx_type&,
77  float*, const octave_idx_type&,
78  float*, const octave_idx_type&,
79  const octave_idx_type&, const float*, float*);
80 
81  F77_RET_T
82  F77_FUNC (sqrder, SQRDER) (const octave_idx_type&, const octave_idx_type&,
83  float*, const octave_idx_type&,
84  float*, const octave_idx_type&,
85  const octave_idx_type&, float*);
86 
87  F77_RET_T
88  F77_FUNC (sqrshc, SQRSHC) (const octave_idx_type&, const octave_idx_type&,
89  const octave_idx_type&, float*,
90  const octave_idx_type&, float*,
91  const octave_idx_type&,
92  const octave_idx_type&, const octave_idx_type&,
93  float*);
94 
95 #endif
96 }
97 
99 {
100  init (a, qr_type);
101 }
102 
103 void
105 {
106  octave_idx_type m = a.rows ();
107  octave_idx_type n = a.cols ();
108 
109  octave_idx_type min_mn = m < n ? m : n;
110  OCTAVE_LOCAL_BUFFER (float, tau, min_mn);
111 
112  octave_idx_type info = 0;
113 
114  FloatMatrix afact = a;
115  if (m > n && qr_type == qr_type_std)
116  afact.resize (m, m);
117 
118  if (m > 0)
119  {
120  // workspace query.
121  float rlwork;
122  F77_XFCN (sgeqrf, SGEQRF, (m, n, afact.fortran_vec (), m, tau,
123  &rlwork, -1, info));
124 
125  // allocate buffer and do the job.
126  octave_idx_type lwork = rlwork;
127  lwork = std::max (lwork, static_cast<octave_idx_type> (1));
128  OCTAVE_LOCAL_BUFFER (float, work, lwork);
129  F77_XFCN (sgeqrf, SGEQRF, (m, n, afact.fortran_vec (), m, tau,
130  work, lwork, info));
131  }
132 
133  form (n, afact, tau, qr_type);
134 }
135 
137  float *tau, qr_type_t qr_type)
138 {
139  octave_idx_type m = afact.rows ();
140  octave_idx_type min_mn = std::min (m, n);
141  octave_idx_type info;
142 
143  if (qr_type == qr_type_raw)
144  {
145  for (octave_idx_type j = 0; j < min_mn; j++)
146  {
147  octave_idx_type limit = j < min_mn - 1 ? j : min_mn - 1;
148  for (octave_idx_type i = limit + 1; i < m; i++)
149  afact.elem (i, j) *= tau[j];
150  }
151 
152  r = afact;
153  }
154  else
155  {
156  // Attempt to minimize copying.
157  if (m >= n)
158  {
159  // afact will become q.
160  q = afact;
161  octave_idx_type k = qr_type == qr_type_economy ? n : m;
162  r = FloatMatrix (k, n);
163  for (octave_idx_type j = 0; j < n; j++)
164  {
165  octave_idx_type i = 0;
166  for (; i <= j; i++)
167  r.xelem (i, j) = afact.xelem (i, j);
168  for (; i < k; i++)
169  r.xelem (i, j) = 0;
170  }
171  afact = FloatMatrix (); // optimize memory
172  }
173  else
174  {
175  // afact will become r.
176  q = FloatMatrix (m, m);
177  for (octave_idx_type j = 0; j < m; j++)
178  for (octave_idx_type i = j + 1; i < m; i++)
179  {
180  q.xelem (i, j) = afact.xelem (i, j);
181  afact.xelem (i, j) = 0;
182  }
183  r = afact;
184  }
185 
186 
187  if (m > 0)
188  {
189  octave_idx_type k = q.columns ();
190  // workspace query.
191  float rlwork;
192  F77_XFCN (sorgqr, SORGQR, (m, k, min_mn, q.fortran_vec (), m, tau,
193  &rlwork, -1, info));
194 
195  // allocate buffer and do the job.
196  octave_idx_type lwork = rlwork;
197  lwork = std::max (lwork, static_cast<octave_idx_type> (1));
198  OCTAVE_LOCAL_BUFFER (float, work, lwork);
199  F77_XFCN (sorgqr, SORGQR, (m, k, min_mn, q.fortran_vec (), m, tau,
200  work, lwork, info));
201  }
202  }
203 }
204 
205 #ifdef HAVE_QRUPDATE
206 
207 void
209 {
210  octave_idx_type m = q.rows ();
211  octave_idx_type n = r.columns ();
212  octave_idx_type k = q.columns ();
213 
214  if (u.length () == m && v.length () == n)
215  {
216  FloatColumnVector utmp = u;
217  FloatColumnVector vtmp = v;
218  OCTAVE_LOCAL_BUFFER (float, w, 2*k);
219  F77_XFCN (sqr1up, SQR1UP, (m, n, k, q.fortran_vec (),
220  m, r.fortran_vec (), k,
221  utmp.fortran_vec (), vtmp.fortran_vec (), w));
222  }
223  else
224  (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
225 }
226 
227 void
229 {
230  octave_idx_type m = q.rows ();
231  octave_idx_type n = r.columns ();
232  octave_idx_type k = q.columns ();
233 
234  if (u.rows () == m && v.rows () == n && u.cols () == v.cols ())
235  {
236  OCTAVE_LOCAL_BUFFER (float, w, 2*k);
237  for (volatile octave_idx_type i = 0; i < u.cols (); i++)
238  {
239  FloatColumnVector utmp = u.column (i);
240  FloatColumnVector vtmp = v.column (i);
241  F77_XFCN (sqr1up, SQR1UP, (m, n, k, q.fortran_vec (),
242  m, r.fortran_vec (), k,
243  utmp.fortran_vec (), vtmp.fortran_vec (),
244  w));
245  }
246  }
247  else
248  (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
249 }
250 
251 void
253 {
254  octave_idx_type m = q.rows ();
255  octave_idx_type n = r.columns ();
256  octave_idx_type k = q.columns ();
257 
258  if (u.length () != m)
259  (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
260  else if (j < 0 || j > n)
261  (*current_liboctave_error_handler) ("qrinsert: index out of range");
262  else
263  {
264  if (k < m)
265  {
266  q.resize (m, k+1);
267  r.resize (k+1, n+1);
268  }
269  else
270  {
271  r.resize (k, n+1);
272  }
273 
274  FloatColumnVector utmp = u;
275  OCTAVE_LOCAL_BUFFER (float, w, k);
276  F77_XFCN (sqrinc, SQRINC, (m, n, k, q.fortran_vec (), q.rows (),
277  r.fortran_vec (), r.rows (), j + 1,
278  utmp.data (), w));
279  }
280 }
281 
282 void
284 {
285  octave_idx_type m = q.rows ();
286  octave_idx_type n = r.columns ();
287  octave_idx_type k = q.columns ();
288 
290  Array<octave_idx_type> js = j.sort (jsi, 0, ASCENDING);
291  octave_idx_type nj = js.length ();
292  bool dups = false;
293  for (octave_idx_type i = 0; i < nj - 1; i++)
294  dups = dups && js(i) == js(i+1);
295 
296  if (dups)
297  (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
298  else if (u.length () != m || u.columns () != nj)
299  (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
300  else if (nj > 0 && (js(0) < 0 || js(nj-1) > n))
301  (*current_liboctave_error_handler) ("qrinsert: index out of range");
302  else if (nj > 0)
303  {
304  octave_idx_type kmax = std::min (k + nj, m);
305  if (k < m)
306  {
307  q.resize (m, kmax);
308  r.resize (kmax, n + nj);
309  }
310  else
311  {
312  r.resize (k, n + nj);
313  }
314 
315  OCTAVE_LOCAL_BUFFER (float, w, kmax);
316  for (volatile octave_idx_type i = 0; i < js.length (); i++)
317  {
318  octave_idx_type ii = i;
319  FloatColumnVector utmp = u.column (jsi(i));
320  F77_XFCN (sqrinc, SQRINC, (m, n + ii, std::min (kmax, k + ii),
321  q.fortran_vec (), q.rows (),
322  r.fortran_vec (), r.rows (), js(ii) + 1,
323  utmp.data (), w));
324  }
325  }
326 }
327 
328 void
330 {
331  octave_idx_type m = q.rows ();
332  octave_idx_type k = r.rows ();
333  octave_idx_type n = r.columns ();
334 
335  if (j < 0 || j > n-1)
336  (*current_liboctave_error_handler) ("qrdelete: index out of range");
337  else
338  {
339  OCTAVE_LOCAL_BUFFER (float, w, k);
340  F77_XFCN (sqrdec, SQRDEC, (m, n, k, q.fortran_vec (), q.rows (),
341  r.fortran_vec (), r.rows (), j + 1, w));
342 
343  if (k < m)
344  {
345  q.resize (m, k-1);
346  r.resize (k-1, n-1);
347  }
348  else
349  {
350  r.resize (k, n-1);
351  }
352  }
353 }
354 
355 void
357 {
358  octave_idx_type m = q.rows ();
359  octave_idx_type n = r.columns ();
360  octave_idx_type k = q.columns ();
361 
363  Array<octave_idx_type> js = j.sort (jsi, 0, DESCENDING);
364  octave_idx_type nj = js.length ();
365  bool dups = false;
366  for (octave_idx_type i = 0; i < nj - 1; i++)
367  dups = dups && js(i) == js(i+1);
368 
369  if (dups)
370  (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
371  else if (nj > 0 && (js(0) > n-1 || js(nj-1) < 0))
372  (*current_liboctave_error_handler) ("qrinsert: index out of range");
373  else if (nj > 0)
374  {
375  OCTAVE_LOCAL_BUFFER (float, w, k);
376  for (volatile octave_idx_type i = 0; i < js.length (); i++)
377  {
378  octave_idx_type ii = i;
379  F77_XFCN (sqrdec, SQRDEC, (m, n - ii, k == m ? k : k - ii,
380  q.fortran_vec (), q.rows (),
381  r.fortran_vec (), r.rows (),
382  js(ii) + 1, w));
383  }
384  if (k < m)
385  {
386  q.resize (m, k - nj);
387  r.resize (k - nj, n - nj);
388  }
389  else
390  {
391  r.resize (k, n - nj);
392  }
393 
394  }
395 }
396 
397 void
399 {
400  octave_idx_type m = r.rows ();
401  octave_idx_type n = r.columns ();
402  octave_idx_type k = std::min (m, n);
403 
404  if (! q.is_square () || u.length () != n)
405  (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
406  else if (j < 0 || j > m)
407  (*current_liboctave_error_handler) ("qrinsert: index out of range");
408  else
409  {
410  q.resize (m + 1, m + 1);
411  r.resize (m + 1, n);
412  FloatRowVector utmp = u;
413  OCTAVE_LOCAL_BUFFER (float, w, k);
414  F77_XFCN (sqrinr, SQRINR, (m, n, q.fortran_vec (), q.rows (),
415  r.fortran_vec (), r.rows (),
416  j + 1, utmp.fortran_vec (), w));
417 
418  }
419 }
420 
421 void
423 {
424  octave_idx_type m = r.rows ();
425  octave_idx_type n = r.columns ();
426 
427  if (! q.is_square ())
428  (*current_liboctave_error_handler) ("qrdelete: dimensions mismatch");
429  else if (j < 0 || j > m-1)
430  (*current_liboctave_error_handler) ("qrdelete: index out of range");
431  else
432  {
433  OCTAVE_LOCAL_BUFFER (float, w, 2*m);
434  F77_XFCN (sqrder, SQRDER, (m, n, q.fortran_vec (), q.rows (),
435  r.fortran_vec (), r.rows (), j + 1,
436  w));
437 
438  q.resize (m - 1, m - 1);
439  r.resize (m - 1, n);
440  }
441 }
442 
443 void
445 {
446  octave_idx_type m = q.rows ();
447  octave_idx_type k = r.rows ();
448  octave_idx_type n = r.columns ();
449 
450  if (i < 0 || i > n-1 || j < 0 || j > n-1)
451  (*current_liboctave_error_handler) ("qrshift: index out of range");
452  else
453  {
454  OCTAVE_LOCAL_BUFFER (float, w, 2*k);
455  F77_XFCN (sqrshc, SQRSHC, (m, n, k,
456  q.fortran_vec (), q.rows (),
457  r.fortran_vec (), r.rows (),
458  i + 1, j + 1, w));
459  }
460 }
461 
462 #else
463 
464 // Replacement update methods.
465 
466 void
468 {
469  warn_qrupdate_once ();
470 
471  octave_idx_type m = q.rows ();
472  octave_idx_type n = r.columns ();
473 
474  if (u.length () == m && v.length () == n)
475  {
476  init (q*r + FloatMatrix (u) * FloatMatrix (v).transpose (), get_type ());
477  }
478  else
479  (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
480 }
481 
482 void
483 FloatQR::update (const FloatMatrix& u, const FloatMatrix& v)
484 {
485  warn_qrupdate_once ();
486 
487  octave_idx_type m = q.rows ();
488  octave_idx_type n = r.columns ();
489 
490  if (u.rows () == m && v.rows () == n && u.cols () == v.cols ())
491  {
492  init (q*r + u * v.transpose (), get_type ());
493  }
494  else
495  (*current_liboctave_error_handler) ("qrupdate: dimensions mismatch");
496 }
497 
498 static
499 FloatMatrix insert_col (const FloatMatrix& a, octave_idx_type i,
500  const FloatColumnVector& x)
501 {
502  FloatMatrix retval (a.rows (), a.columns () + 1);
503  retval.assign (idx_vector::colon, idx_vector (0, i),
504  a.index (idx_vector::colon, idx_vector (0, i)));
505  retval.assign (idx_vector::colon, idx_vector (i), x);
506  retval.assign (idx_vector::colon, idx_vector (i+1, retval.columns ()),
507  a.index (idx_vector::colon, idx_vector (i, a.columns ())));
508  return retval;
509 }
510 
511 static
512 FloatMatrix insert_row (const FloatMatrix& a, octave_idx_type i,
513  const FloatRowVector& x)
514 {
515  FloatMatrix retval (a.rows () + 1, a.columns ());
516  retval.assign (idx_vector (0, i), idx_vector::colon,
517  a.index (idx_vector (0, i), idx_vector::colon));
518  retval.assign (idx_vector (i), idx_vector::colon, x);
519  retval.assign (idx_vector (i+1, retval.rows ()), idx_vector::colon,
520  a.index (idx_vector (i, a.rows ()), idx_vector::colon));
521  return retval;
522 }
523 
524 static
525 FloatMatrix delete_col (const FloatMatrix& a, octave_idx_type i)
526 {
527  FloatMatrix retval = a;
528  retval.delete_elements (1, idx_vector (i));
529  return retval;
530 }
531 
532 static
533 FloatMatrix delete_row (const FloatMatrix& a, octave_idx_type i)
534 {
535  FloatMatrix retval = a;
536  retval.delete_elements (0, idx_vector (i));
537  return retval;
538 }
539 
540 static
541 FloatMatrix shift_cols (const FloatMatrix& a,
543 {
544  octave_idx_type n = a.columns ();
546  for (octave_idx_type k = 0; k < n; k++) p(k) = k;
547  if (i < j)
548  {
549  for (octave_idx_type k = i; k < j; k++) p(k) = k+1;
550  p(j) = i;
551  }
552  else if (j < i)
553  {
554  p(j) = i;
555  for (octave_idx_type k = j+1; k < i+1; k++) p(k) = k-1;
556  }
557 
558  return a.index (idx_vector::colon, idx_vector (p));
559 }
560 
561 void
563 {
564  warn_qrupdate_once ();
565 
566  octave_idx_type m = q.rows ();
567  octave_idx_type n = r.columns ();
568 
569  if (u.length () != m)
570  (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
571  else if (j < 0 || j > n)
572  (*current_liboctave_error_handler) ("qrinsert: index out of range");
573  else
574  {
575  init (::insert_col (q*r, j, u), get_type ());
576  }
577 }
578 
579 void
581 {
582  warn_qrupdate_once ();
583 
584  octave_idx_type m = q.rows ();
585  octave_idx_type n = r.columns ();
586 
588  Array<octave_idx_type> js = j.sort (jsi, 0, ASCENDING);
589  octave_idx_type nj = js.length ();
590  bool dups = false;
591  for (octave_idx_type i = 0; i < nj - 1; i++)
592  dups = dups && js(i) == js(i+1);
593 
594  if (dups)
595  (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
596  else if (u.length () != m || u.columns () != nj)
597  (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
598  else if (nj > 0 && (js(0) < 0 || js(nj-1) > n))
599  (*current_liboctave_error_handler) ("qrinsert: index out of range");
600  else if (nj > 0)
601  {
602  FloatMatrix a = q*r;
603  for (octave_idx_type i = 0; i < js.length (); i++)
604  a = ::insert_col (a, js(i), u.column (i));
605  init (a, get_type ());
606  }
607 }
608 
609 void
611 {
612  warn_qrupdate_once ();
613 
614  octave_idx_type n = r.columns ();
615 
616  if (j < 0 || j > n-1)
617  (*current_liboctave_error_handler) ("qrdelete: index out of range");
618  else
619  {
620  init (::delete_col (q*r, j), get_type ());
621  }
622 }
623 
624 void
626 {
627  warn_qrupdate_once ();
628 
629  octave_idx_type n = r.columns ();
630 
632  Array<octave_idx_type> js = j.sort (jsi, 0, DESCENDING);
633  octave_idx_type nj = js.length ();
634  bool dups = false;
635  for (octave_idx_type i = 0; i < nj - 1; i++)
636  dups = dups && js(i) == js(i+1);
637 
638  if (dups)
639  (*current_liboctave_error_handler) ("qrinsert: duplicate index detected");
640  else if (nj > 0 && (js(0) > n-1 || js(nj-1) < 0))
641  (*current_liboctave_error_handler) ("qrinsert: index out of range");
642  else if (nj > 0)
643  {
644  FloatMatrix a = q*r;
645  for (octave_idx_type i = 0; i < js.length (); i++)
646  a = ::delete_col (a, js(i));
647  init (a, get_type ());
648  }
649 }
650 
651 void
653 {
654  warn_qrupdate_once ();
655 
656  octave_idx_type m = r.rows ();
657  octave_idx_type n = r.columns ();
658 
659  if (! q.is_square () || u.length () != n)
660  (*current_liboctave_error_handler) ("qrinsert: dimensions mismatch");
661  else if (j < 0 || j > m)
662  (*current_liboctave_error_handler) ("qrinsert: index out of range");
663  else
664  {
665  init (::insert_row (q*r, j, u), get_type ());
666  }
667 }
668 
669 void
671 {
672  warn_qrupdate_once ();
673 
674  octave_idx_type m = r.rows ();
675 
676  if (! q.is_square ())
677  (*current_liboctave_error_handler) ("qrdelete: dimensions mismatch");
678  else if (j < 0 || j > m-1)
679  (*current_liboctave_error_handler) ("qrdelete: index out of range");
680  else
681  {
682  init (::delete_row (q*r, j), get_type ());
683  }
684 }
685 
686 void
688 {
689  warn_qrupdate_once ();
690 
691  octave_idx_type n = r.columns ();
692 
693  if (i < 0 || i > n-1 || j < 0 || j > n-1)
694  (*current_liboctave_error_handler) ("qrshift: index out of range");
695  else
696  {
697  init (::shift_cols (q*r, i, j), get_type ());
698  }
699 }
700 
701 #endif
void resize(octave_idx_type nr, octave_idx_type nc, float rfv=0)
Definition: fMatrix.h:134
static const idx_vector colon
Definition: idx-vector.h:492
void delete_elements(const idx_vector &i)
Deleting elements.
Definition: Array.cc:1393
FloatMatrix transpose(void) const
Definition: fMatrix.h:118
static void transpose(octave_idx_type N, const octave_idx_type *ridx, const octave_idx_type *cidx, octave_idx_type *ridx2, octave_idx_type *cidx2)
Definition: symrcm.cc:382
void insert_row(const FloatRowVector &u, octave_idx_type j)
Definition: floatQR.cc:398
T & elem(octave_idx_type n)
Definition: Array.h:380
qr_type_t get_type(void) const
#define F77_XFCN(f, F, args)
Definition: f77-fcn.h:51
void shift_cols(octave_idx_type i, octave_idx_type j)
Definition: floatQR.cc:444
FloatQR(void)
Definition: floatQR.h:40
void form(octave_idx_type n, FloatMatrix &afact, float *tau, qr_type_t qr_type)
Definition: floatQR.cc:136
octave_idx_type rows(void) const
Definition: Array.h:313
void delete_row(octave_idx_type j)
Definition: floatQR.cc:422
liboctave_error_handler current_liboctave_error_handler
Definition: lo-error.c:38
FloatMatrix r
Definition: base-qr.h:74
Array< T > sort(int dim=0, sortmode mode=ASCENDING) const
Definition: Array.cc:1766
void init(const FloatMatrix &, qr_type_t)
Definition: floatQR.cc:104
std::complex< double > w(std::complex< double > z, double relerr=0)
const T * data(void) const
Definition: Array.h:479
F77_RET_T F77_FUNC(sgeqrf, SGEQRF)(const octave_idx_type &
FloatMatrix q
Definition: base-qr.h:73
qr_type_t
Definition: base-qr.h:30
bool is_square(void) const
Definition: Array.h:470
#define F77_RET_T
Definition: f77-fcn.h:264
FloatColumnVector column(octave_idx_type i) const
Definition: fMatrix.cc:652
T & xelem(octave_idx_type n)
Definition: Array.h:353
void delete_col(octave_idx_type j)
Definition: floatQR.cc:329
void insert_col(const FloatColumnVector &u, octave_idx_type j)
Definition: floatQR.cc:252
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:233
octave_idx_type length(void) const
Number of elements in the array.
Definition: Array.h:267
void update(const FloatColumnVector &u, const FloatColumnVector &v)
Definition: floatQR.cc:208
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
Definition: oct-locbuf.h:197
void assign(const idx_vector &i, const Array< T > &rhs, const T &rfv)
Indexed assignment (always with resize & fill).
Definition: Array.cc:1140
const T * fortran_vec(void) const
Definition: Array.h:481
octave_idx_type cols(void) const
Definition: Array.h:321
octave_idx_type columns(void) const
Definition: Array.h:322
Array< T > index(const idx_vector &i) const
Indexing without resizing.
Definition: Array.cc:716
F77_RET_T const double * x
charNDArray min(char d, const charNDArray &m)
Definition: chNDArray.cc:210