GNU Octave  4.2.1
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
__eigs__.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2005-2017 David Bateman
4 
5 This file is part of Octave.
6 
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if defined (HAVE_CONFIG_H)
24 # include "config.h"
25 #endif
26 
27 #include "defun-dld.h"
28 #include "eigs-base.h"
29 #include "error.h"
30 #include "errwarn.h"
31 #include "oct-map.h"
32 #include "ov-cx-sparse.h"
33 #include "ov-re-sparse.h"
34 #include "ov.h"
35 #include "pager.h"
36 #include "quit.h"
37 #include "unwind-prot.h"
38 #include "variables.h"
39 
40 #if defined (HAVE_ARPACK)
41 
42 // Global pointer for user defined function.
44 
45 // Have we warned about imaginary values returned from user function?
46 static bool warned_imaginary = false;
47 
48 // Is this a recursive call?
49 static int call_depth = 0;
50 
52 eigs_func (const ColumnVector &x, int &eigs_error)
53 {
56  args(0) = x;
57 
58  if (eigs_fcn)
59  {
61 
62  try
63  {
64  tmp = eigs_fcn->do_multi_index_op (1, args);
65  }
66  catch (octave::execution_exception& e)
67  {
68  err_user_supplied_eval (e, "eigs");
69  }
70 
71  if (tmp.length () && tmp(0).is_defined ())
72  {
73  if (! warned_imaginary && tmp(0).is_complex_type ())
74  {
75  warning ("eigs: ignoring imaginary part returned from user-supplied function");
76  warned_imaginary = true;
77  }
78 
79  retval = tmp(0).xvector_value ("eigs: evaluation of user-supplied function failed");
80  }
81  else
82  {
83  eigs_error = 1;
84  err_user_supplied_eval ("eigs");
85  }
86  }
87 
88  return retval;
89 }
90 
92 eigs_complex_func (const ComplexColumnVector &x, int &eigs_error)
93 {
96  args(0) = x;
97 
98  if (eigs_fcn)
99  {
101 
102  try
103  {
104  tmp = eigs_fcn->do_multi_index_op (1, args);
105  }
106  catch (octave::execution_exception& e)
107  {
108  err_user_supplied_eval (e, "eigs");
109  }
110 
111  if (tmp.length () && tmp(0).is_defined ())
112  {
113  retval = tmp(0).complex_vector_value ("eigs: evaluation of user-supplied function failed");
114  }
115  else
116  {
117  eigs_error = 1;
118  err_user_supplied_eval ("eigs");
119  }
120  }
121 
122  return retval;
123 }
124 
125 #endif
126 
127 DEFUN_DLD (__eigs__, args, nargout,
128  doc: /* -*- texinfo -*-
129 @deftypefn {} {@var{d} =} __eigs__ (@var{A})
130 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{k})
131 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{k}, @var{sigma})
132 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{k}, @var{sigma}, @var{opts})
133 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{B})
134 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{B}, @var{k})
135 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{B}, @var{k}, @var{sigma})
136 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{B}, @var{k}, @var{sigma}, @var{opts})
137 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n})
138 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{B})
139 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{k})
140 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{B}, @var{k})
141 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{k}, @var{sigma})
142 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{B}, @var{k}, @var{sigma})
143 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{k}, @var{sigma}, @var{opts})
144 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{B}, @var{k}, @var{sigma}, @var{opts})
145 @deftypefnx {} {[@var{V}, @var{d}] =} __eigs__ (@var{A}, @dots{})
146 @deftypefnx {} {[@var{V}, @var{d}] =} __eigs__ (@var{af}, @var{n}, @dots{})
147 @deftypefnx {} {[@var{V}, @var{d}, @var{flag}] =} __eigs__ (@var{A}, @dots{})
148 @deftypefnx {} {[@var{V}, @var{d}, @var{flag}] =} __eigs__ (@var{af}, @var{n}, @dots{})
149 Undocumented internal function.
150 @end deftypefn */)
151 {
152 #if defined (HAVE_ARPACK)
153 
154  int nargin = args.length ();
155 
156  if (nargin == 0)
157  print_usage ();
158 
160 
161  std::string fcn_name;
162  octave_idx_type n = 0;
163  octave_idx_type k = 6;
164  Complex sigma = 0.;
165  double sigmar, sigmai;
166  bool have_sigma = false;
167  std::string typ = "LM";
168  Matrix amm, bmm, bmt;
169  ComplexMatrix acm, bcm, bct;
170  SparseMatrix asmm, bsmm, bsmt;
171  SparseComplexMatrix ascm, bscm, bsct;
172  int b_arg = 0;
173  bool have_b = false;
174  bool have_a_fun = false;
175  bool a_is_complex = false;
176  bool b_is_complex = false;
177  bool symmetric = false;
178  bool sym_tested = false;
179  bool cholB = false;
180  bool a_is_sparse = false;
181  ColumnVector permB;
182  int arg_offset = 0;
183  double tol = std::numeric_limits<double>::epsilon ();
184  int maxit = 300;
185  int disp = 0;
186  octave_idx_type p = -1;
187  ColumnVector resid;
188  ComplexColumnVector cresid;
189  octave_idx_type info = 1;
190 
191  warned_imaginary = false;
192 
194 
195  frame.protect_var (call_depth);
196  call_depth++;
197 
198  if (call_depth > 1)
199  error ("eigs: invalid recursive call");
200 
201  if (args(0).is_function_handle () || args(0).is_inline_function ()
202  || args(0).is_string ())
203  {
204  if (args(0).is_string ())
205  {
206  std::string name = args(0).string_value ();
207  std::string fname = "function y = ";
208  fcn_name = unique_symbol_name ("__eigs_fcn__");
209  fname.append (fcn_name);
210  fname.append ("(x) y = ");
211  eigs_fcn = extract_function (args(0), "eigs", fcn_name, fname,
212  "; endfunction");
213  }
214  else
215  eigs_fcn = args(0).function_value ();
216 
217  if (! eigs_fcn)
218  error ("eigs: unknown function");
219 
220  if (nargin < 2)
221  error ("eigs: incorrect number of arguments");
222 
223  n = args(1).nint_value ();
224  arg_offset = 1;
225  have_a_fun = true;
226  }
227  else
228  {
229  if (args(0).is_complex_type ())
230  {
231  if (args(0).is_sparse_type ())
232  {
233  ascm = (args(0).sparse_complex_matrix_value ());
234  a_is_sparse = true;
235  }
236  else
237  acm = (args(0).complex_matrix_value ());
238  a_is_complex = true;
239  symmetric = false; // ARPACK doesn't special case complex symmetric
240  sym_tested = true;
241  }
242  else
243  {
244  if (args(0).is_sparse_type ())
245  {
246  asmm = (args(0).sparse_matrix_value ());
247  a_is_sparse = true;
248  }
249  else
250  {
251  amm = (args(0).matrix_value ());
252  }
253  }
254  }
255 
256  // Note hold off reading B until later to avoid issues of double
257  // copies of the matrix if B is full/real while A is complex.
258  if (nargin > 1 + arg_offset
259  && ! (args(1 + arg_offset).is_real_scalar ()))
260  {
261  if (args(1+arg_offset).is_complex_type ())
262  {
263  b_arg = 1+arg_offset;
264  have_b = true;
265  b_is_complex = true;
266  arg_offset++;
267  }
268  else
269  {
270  b_arg = 1+arg_offset;
271  have_b = true;
272  arg_offset++;
273  }
274  }
275 
276  if (nargin > (1+arg_offset))
277  k = args(1+arg_offset).nint_value ();
278 
279  if (nargin > (2+arg_offset))
280  {
281  if (args(2+arg_offset).is_string ())
282  {
283  typ = args(2+arg_offset).string_value ();
284 
285  // Use STL function to convert to upper case
286  transform (typ.begin (), typ.end (), typ.begin (), toupper);
287 
288  sigma = 0.;
289  }
290  else
291  {
292  sigma = args(2+arg_offset).xcomplex_value ("eigs: SIGMA must be a scalar or a string");
293 
294  have_sigma = true;
295  }
296  }
297 
298  sigmar = sigma.real ();
299  sigmai = sigma.imag ();
300 
301  if (nargin > (3+arg_offset))
302  {
303  if (! args(3+arg_offset).is_map ())
304  error ("eigs: OPTS argument must be a structure");
305 
306  octave_scalar_map map = args(3+arg_offset).xscalar_map_value ("eigs: OPTS argument must be a scalar structure");
307 
309 
310  // issym is ignored for complex matrix inputs
311  tmp = map.getfield ("issym");
312  if (tmp.is_defined () && ! sym_tested)
313  {
314  symmetric = tmp.double_value () != 0.;
315  sym_tested = true;
316  }
317 
318  // isreal is ignored if A is not a function
319  tmp = map.getfield ("isreal");
320  if (tmp.is_defined () && have_a_fun)
321  a_is_complex = ! (tmp.double_value () != 0.);
322 
323  tmp = map.getfield ("tol");
324  if (tmp.is_defined ())
325  tol = tmp.double_value ();
326 
327  tmp = map.getfield ("maxit");
328  if (tmp.is_defined ())
329  maxit = tmp.nint_value ();
330 
331  tmp = map.getfield ("p");
332  if (tmp.is_defined ())
333  p = tmp.nint_value ();
334 
335  tmp = map.getfield ("v0");
336  if (tmp.is_defined ())
337  {
338  if (a_is_complex || b_is_complex)
339  cresid = ComplexColumnVector (tmp.complex_vector_value ());
340  else
341  resid = ColumnVector (tmp.vector_value ());
342  }
343 
344  tmp = map.getfield ("disp");
345  if (tmp.is_defined ())
346  disp = tmp.nint_value ();
347 
348  tmp = map.getfield ("cholB");
349  if (tmp.is_defined ())
350  cholB = tmp.double_value () != 0.;
351 
352  tmp = map.getfield ("permB");
353  if (tmp.is_defined ())
354  permB = ColumnVector (tmp.vector_value ()) - 1.0;
355  }
356 
357  if (nargin > (4+arg_offset))
358  error ("eigs: incorrect number of arguments");
359 
360  // Test undeclared (no issym) matrix inputs for symmetry
361  if (! sym_tested && ! have_a_fun)
362  {
363  if (a_is_sparse)
364  symmetric = asmm.is_symmetric ();
365  else
366  symmetric = amm.is_symmetric ();
367  }
368 
369  if (have_b)
370  {
371  if (a_is_complex || b_is_complex)
372  {
373  if (a_is_sparse)
374  bscm = args(b_arg).sparse_complex_matrix_value ();
375  else
376  bcm = args(b_arg).complex_matrix_value ();
377  }
378  else
379  {
380  if (a_is_sparse)
381  bsmm = args(b_arg).sparse_matrix_value ();
382  else
383  bmm = args(b_arg).matrix_value ();
384  }
385  }
386 
387  // Mode 1 for SM mode seems unstable for some reason.
388  // Use Mode 3 instead, with sigma = 0.
389  if (! have_sigma && typ == "SM")
390  have_sigma = true;
391 
392  octave_idx_type nconv;
393  if (a_is_complex || b_is_complex)
394  {
395  ComplexMatrix eig_vec;
396  ComplexColumnVector eig_val;
397 
398  if (have_a_fun)
400  (eigs_complex_func, n, typ, sigma, k, p, info, eig_vec,
401  eig_val, cresid, octave_stdout, tol, (nargout > 1), cholB,
402  disp, maxit);
403  else if (have_sigma)
404  {
405  if (a_is_sparse)
407  (ascm, sigma, k, p, info, eig_vec, eig_val, bscm, permB,
408  cresid, octave_stdout, tol, (nargout > 1), cholB, disp,
409  maxit);
410  else
412  (acm, sigma, k, p, info, eig_vec, eig_val, bcm, permB,
413  cresid, octave_stdout, tol, (nargout > 1), cholB, disp,
414  maxit);
415  }
416  else
417  {
418  if (a_is_sparse)
420  (ascm, typ, k, p, info, eig_vec, eig_val, bscm, permB,
421  cresid, octave_stdout, tol, (nargout > 1), cholB, disp,
422  maxit);
423  else
425  (acm, typ, k, p, info, eig_vec, eig_val, bcm, permB,
426  cresid, octave_stdout, tol, (nargout > 1), cholB, disp,
427  maxit);
428  }
429 
430  if (nargout < 2)
431  retval(0) = eig_val;
432  else
433  retval = ovl (eig_vec, ComplexDiagMatrix (eig_val), double (info));
434  }
435  else if (sigmai != 0.)
436  {
437  // Promote real problem to a complex one.
438  ComplexMatrix eig_vec;
439  ComplexColumnVector eig_val;
440 
441  if (have_a_fun)
443  (eigs_complex_func, n, typ, sigma, k, p, info, eig_vec,
444  eig_val, cresid, octave_stdout, tol, (nargout > 1), cholB,
445  disp, maxit);
446  else
447  {
448  if (a_is_sparse)
450  (SparseComplexMatrix (asmm), sigma, k, p, info, eig_vec,
451  eig_val, SparseComplexMatrix (bsmm), permB, cresid,
452  octave_stdout, tol, (nargout > 1), cholB, disp, maxit);
453  else
455  (ComplexMatrix (amm), sigma, k, p, info, eig_vec,
456  eig_val, ComplexMatrix (bmm), permB, cresid,
457  octave_stdout, tol, (nargout > 1), cholB, disp, maxit);
458  }
459 
460  if (nargout < 2)
461  retval(0) = eig_val;
462  else
463  retval = ovl (eig_vec, ComplexDiagMatrix (eig_val), double (info));
464  }
465  else
466  {
467  if (symmetric)
468  {
469  Matrix eig_vec;
470  ColumnVector eig_val;
471 
472  if (have_a_fun)
473  nconv = EigsRealSymmetricFunc
474  (eigs_func, n, typ, sigmar, k, p, info, eig_vec,
475  eig_val, resid, octave_stdout, tol, (nargout > 1),
476  cholB, disp, maxit);
477  else if (have_sigma)
478  {
479  if (a_is_sparse)
481  (asmm, sigmar, k, p, info, eig_vec, eig_val, bsmm,
482  permB, resid, octave_stdout, tol, (nargout > 1),
483  cholB, disp, maxit);
484  else
486  (amm, sigmar, k, p, info, eig_vec, eig_val, bmm,
487  permB, resid, octave_stdout, tol, (nargout > 1),
488  cholB, disp, maxit);
489  }
490  else
491  {
492  if (a_is_sparse)
494  (asmm, typ, k, p, info, eig_vec, eig_val, bsmm,
495  permB, resid, octave_stdout, tol, (nargout > 1),
496  cholB, disp, maxit);
497  else
499  (amm, typ, k, p, info, eig_vec, eig_val, bmm, permB,
500  resid, octave_stdout, tol, (nargout > 1), cholB,
501  disp, maxit);
502  }
503 
504  if (nargout < 2)
505  retval(0) = eig_val;
506  else
507  retval = ovl (eig_vec, DiagMatrix (eig_val), double (info));
508  }
509  else
510  {
511  ComplexMatrix eig_vec;
512  ComplexColumnVector eig_val;
513 
514  if (have_a_fun)
516  (eigs_func, n, typ, sigmar, k, p, info, eig_vec,
517  eig_val, resid, octave_stdout, tol, (nargout > 1),
518  cholB, disp, maxit);
519  else if (have_sigma)
520  {
521  if (a_is_sparse)
523  (asmm, sigmar, k, p, info, eig_vec, eig_val, bsmm,
524  permB, resid, octave_stdout, tol, (nargout > 1),
525  cholB, disp, maxit);
526  else
528  (amm, sigmar, k, p, info, eig_vec, eig_val, bmm,
529  permB, resid, octave_stdout, tol, (nargout > 1),
530  cholB, disp, maxit);
531  }
532  else
533  {
534  if (a_is_sparse)
536  (asmm, typ, k, p, info, eig_vec, eig_val, bsmm,
537  permB, resid, octave_stdout, tol, (nargout > 1),
538  cholB, disp, maxit);
539  else
541  (amm, typ, k, p, info, eig_vec, eig_val, bmm, permB,
542  resid, octave_stdout, tol, (nargout > 1), cholB,
543  disp, maxit);
544  }
545 
546  if (nargout < 2)
547  retval(0) = eig_val;
548  else
549  retval = ovl (eig_vec, ComplexDiagMatrix (eig_val), double (info));
550  }
551  }
552 
553  if (nconv <= 0)
554  warning ("eigs: None of the %d requested eigenvalues converged", k);
555  else if (nconv < k)
556  warning ("eigs: Only %d of the %d requested eigenvalues converged",
557  nconv, k);
558 
559  if (! fcn_name.empty ())
560  clear_function (fcn_name);
561 
562  return retval;
563 
564 #else
565 
566  octave_unused_parameter (args);
567  octave_unused_parameter (nargout);
568 
569  err_disabled_feature ("eigs", "ARPACK");
570 
571 #endif
572 }
573 
574 /*
575 ## No test needed for internal helper function.
576 %!assert (1)
577 */
bool is_symmetric(void) const
Definition: dMatrix.cc:137
octave_idx_type EigsComplexNonSymmetricMatrixShift(const M &m, Complex sigma, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const M &_b, ColumnVector &permB, ComplexColumnVector &cresid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
Definition: eigs-base.cc:2623
fname
Definition: load-save.cc:754
virtual octave_value_list do_multi_index_op(int nargout, const octave_value_list &idx)
Definition: ov-base.cc:259
octave_idx_type EigsRealSymmetricFunc(EigsFunc fun, octave_idx_type n, const std::string &_typ, double sigma, octave_idx_type k, octave_idx_type p, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool, int disp, int maxit)
Definition: eigs-base.cc:1157
octave_idx_type EigsRealNonSymmetricFunc(EigsFunc fun, octave_idx_type n, const std::string &_typ, double sigmar, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool, int disp, int maxit)
Definition: eigs-base.cc:2058
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).is_integer_type())
OCTINTERP_API void print_usage(void)
Definition: defun.cc:52
octave_idx_type length(void) const
Definition: ovl.h:96
bool is_defined(void) const
Definition: ov.h:536
for large enough k
Definition: lu.cc:606
void protect_var(T &var)
void error(const char *fmt,...)
Definition: error.cc:570
ColumnVector eigs_func(const ColumnVector &x, int &eigs_error)
Definition: __eigs__.cc:52
octave_idx_type EigsRealNonSymmetricMatrix(const M &m, const std::string typ, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const M &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
Definition: eigs-base.cc:1394
disp(text)
bool is_symmetric(void) const
Definition: dSparse.cc:134
i e
Definition: data.cc:2724
Array< Complex > complex_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
Definition: ov.cc:1948
std::string unique_symbol_name(const std::string &basename)
Definition: variables.cc:491
void clear_function(const std::string &nm)
Definition: variables.cc:79
JNIEnv void * args
Definition: ov-java.cc:67
static int call_depth
Definition: __eigs__.cc:49
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable name
Definition: input.cc:871
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
Definition: ov-usr-fcn.cc:935
ComplexColumnVector eigs_complex_func(const ComplexColumnVector &x, int &eigs_error)
Definition: __eigs__.cc:92
octave_idx_type EigsRealSymmetricMatrix(const M &m, const std::string typ, octave_idx_type k, octave_idx_type p, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const M &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
Definition: eigs-base.cc:596
int nint_value(bool frc_str_conv=false) const
Definition: ov.h:753
int nargin
Definition: graphics.cc:10115
octave_idx_type EigsComplexNonSymmetricMatrix(const M &m, const std::string typ, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const M &_b, ColumnVector &permB, ComplexColumnVector &cresid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
Definition: eigs-base.cc:2343
octave_idx_type EigsRealNonSymmetricMatrixShift(const M &m, double sigmar, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const M &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
Definition: eigs-base.cc:1714
double tmp
Definition: data.cc:6300
octave_value retval
Definition: data.cc:6294
Definition: dMatrix.h:37
octave_idx_type EigsComplexNonSymmetricFunc(EigsComplexFunc fun, octave_idx_type n, const std::string &_typ, Complex sigma, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, ComplexColumnVector &cresid, std::ostream &os, double tol, bool rvec, bool, int disp, int maxit)
Definition: eigs-base.cc:2929
void warning(const char *fmt,...)
Definition: error.cc:788
octave::unwind_protect frame
Definition: graphics.cc:11584
void err_user_supplied_eval(const char *name)
Definition: errwarn.cc:142
static bool warned_imaginary
Definition: __eigs__.cc:46
#define octave_stdout
Definition: pager.h:146
octave_idx_type EigsRealSymmetricMatrixShift(const M &m, double sigma, octave_idx_type k, octave_idx_type p, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const M &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
Definition: eigs-base.cc:868
p
Definition: lu.cc:138
octave_map map(dims)
Array< double > vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
Definition: ov.cc:1798
octave_function * extract_function(const octave_value &arg, const std::string &warn_for, const std::string &fname, const std::string &header, const std::string &trailer)
Definition: variables.cc:145
ColumnVector transform(const Matrix &m, double x, double y, double z)
Definition: graphics.cc:5118
octave_value getfield(const std::string &key) const
Definition: oct-map.cc:171
#define DEFUN_DLD(name, args_name, nargout_name, doc)
Definition: defun-dld.h:45
static octave_function * eigs_fcn
Definition: __eigs__.cc:43
std::complex< double > Complex
Definition: oct-cmplx.h:31
double double_value(bool frc_str_conv=false) const
Definition: ov.h:775
void err_disabled_feature(const std::string &fcn, const std::string &feature, const std::string &pkg)
Definition: errwarn.cc:50
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition: utils.cc:854
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE * x