GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
__eigs__.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2005-2018 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
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License 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 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if defined (HAVE_CONFIG_H)
24 # include "config.h"
25 #endif
26 
27 #include <limits>
28 #include <string>
29 
30 #include "Matrix.h"
31 #include "eigs-base.h"
32 #include "unwind-prot.h"
33 
34 #include "defun-dld.h"
35 #include "error.h"
36 #include "errwarn.h"
37 #include "oct-map.h"
38 #include "ov.h"
39 #include "ovl.h"
40 #include "pager.h"
41 #include "parse.h"
42 #include "variables.h"
43 
44 #if defined (HAVE_ARPACK)
45 
46 // Global pointer for user defined function.
47 static octave_function *eigs_fcn = nullptr;
48 
49 // Have we warned about imaginary values returned from user function?
50 static bool warned_imaginary = false;
51 
52 // Is this a recursive call?
53 static int call_depth = 0;
54 
56 eigs_func (const ColumnVector& x, int& eigs_error)
57 {
59  octave_value_list args;
60  args(0) = x;
61 
62  if (eigs_fcn)
63  {
65 
66  try
67  {
68  tmp = octave::feval (eigs_fcn, args, 1);
69  }
70  catch (octave::execution_exception& e)
71  {
72  err_user_supplied_eval (e, "eigs");
73  }
74 
75  if (tmp.length () && tmp(0).is_defined ())
76  {
77  if (! warned_imaginary && tmp(0).iscomplex ())
78  {
79  warning ("eigs: ignoring imaginary part returned from user-supplied function");
80  warned_imaginary = true;
81  }
82 
83  retval = tmp(0).xvector_value ("eigs: evaluation of user-supplied function failed");
84  }
85  else
86  {
87  eigs_error = 1;
88  err_user_supplied_eval ("eigs");
89  }
90  }
91 
92  return retval;
93 }
94 
96 eigs_complex_func (const ComplexColumnVector& x, int& eigs_error)
97 {
99  octave_value_list args;
100  args(0) = x;
101 
102  if (eigs_fcn)
103  {
105 
106  try
107  {
108  tmp = octave::feval (eigs_fcn, args, 1);
109  }
110  catch (octave::execution_exception& e)
111  {
112  err_user_supplied_eval (e, "eigs");
113  }
114 
115  if (tmp.length () && tmp(0).is_defined ())
116  {
117  retval = tmp(0).complex_vector_value ("eigs: evaluation of user-supplied function failed");
118  }
119  else
120  {
121  eigs_error = 1;
122  err_user_supplied_eval ("eigs");
123  }
124  }
125 
126  return retval;
127 }
128 
129 #endif
130 
131 DEFMETHOD_DLD (__eigs__, interp, args, nargout,
132  doc: /* -*- texinfo -*-
133 @deftypefn {} {@var{d} =} __eigs__ (@var{A})
134 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{k})
135 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{k}, @var{sigma})
136 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{k}, @var{sigma}, @var{opts})
137 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{B})
138 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{B}, @var{k})
139 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{B}, @var{k}, @var{sigma})
140 @deftypefnx {} {@var{d} =} __eigs__ (@var{A}, @var{B}, @var{k}, @var{sigma}, @var{opts})
141 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n})
142 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{B})
143 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{k})
144 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{B}, @var{k})
145 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{k}, @var{sigma})
146 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{B}, @var{k}, @var{sigma})
147 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{k}, @var{sigma}, @var{opts})
148 @deftypefnx {} {@var{d} =} __eigs__ (@var{af}, @var{n}, @var{B}, @var{k}, @var{sigma}, @var{opts})
149 @deftypefnx {} {[@var{V}, @var{d}] =} __eigs__ (@var{A}, @dots{})
150 @deftypefnx {} {[@var{V}, @var{d}] =} __eigs__ (@var{af}, @var{n}, @dots{})
151 @deftypefnx {} {[@var{V}, @var{d}, @var{flag}] =} __eigs__ (@var{A}, @dots{})
152 @deftypefnx {} {[@var{V}, @var{d}, @var{flag}] =} __eigs__ (@var{af}, @var{n}, @dots{})
153 Undocumented internal function.
154 @end deftypefn */)
155 {
156 #if defined (HAVE_ARPACK)
157 
158  int nargin = args.length ();
159 
160  if (nargin == 0)
161  print_usage ();
162 
164 
165  std::string fcn_name;
166  octave_idx_type n = 0;
167  octave_idx_type k = 6;
168  Complex sigma = 0.;
169  double sigmar, sigmai;
170  bool have_sigma = false;
171  std::string typ = "LM";
172  Matrix amm, bmm, bmt;
173  ComplexMatrix acm, bcm, bct;
174  SparseMatrix asmm, bsmm, bsmt;
175  SparseComplexMatrix ascm, bscm, bsct;
176  int b_arg = 0;
177  bool have_b = false;
178  bool have_a_fun = false;
179  bool a_is_complex = false;
180  bool b_is_complex = false;
181  bool symmetric = false;
182  bool sym_tested = false;
183  bool cholB = false;
184  bool a_is_sparse = false;
185  ColumnVector permB;
186  int arg_offset = 0;
187  double tol = std::numeric_limits<double>::epsilon ();
188  int maxit = 300;
189  int disp = 0;
190  octave_idx_type p = -1;
191  ColumnVector resid;
192  ComplexColumnVector cresid;
193  octave_idx_type info = 1;
194 
195  warned_imaginary = false;
196 
198 
200  call_depth++;
201 
202  if (call_depth > 1)
203  error ("eigs: invalid recursive call");
204 
205  if (args(0).is_function_handle () || args(0).is_inline_function ()
206  || args(0).is_string ())
207  {
208  if (args(0).is_string ())
209  {
210  std::string name = args(0).string_value ();
211  std::string fname = "function y = ";
212  fcn_name = unique_symbol_name ("__eigs_fcn__");
213  fname.append (fcn_name);
214  fname.append ("(x) y = ");
215  eigs_fcn = extract_function (args(0), "eigs", fcn_name, fname,
216  "; endfunction");
217  }
218  else
219  eigs_fcn = args(0).function_value ();
220 
221  if (! eigs_fcn)
222  error ("eigs: unknown function");
223 
224  if (nargin < 2)
225  error ("eigs: incorrect number of arguments");
226 
227  n = args(1).nint_value ();
228  arg_offset = 1;
229  have_a_fun = true;
230  }
231  else
232  {
233  if (args(0).iscomplex ())
234  {
235  if (args(0).issparse ())
236  {
237  ascm = (args(0).sparse_complex_matrix_value ());
238  a_is_sparse = true;
239  }
240  else
241  acm = (args(0).complex_matrix_value ());
242  a_is_complex = true;
243  symmetric = false; // ARPACK doesn't special case complex symmetric
244  sym_tested = true;
245  }
246  else
247  {
248  if (args(0).issparse ())
249  {
250  asmm = (args(0).sparse_matrix_value ());
251  a_is_sparse = true;
252  }
253  else
254  {
255  amm = (args(0).matrix_value ());
256  }
257  }
258  }
259 
260  // Note hold off reading B until later to avoid issues of double
261  // copies of the matrix if B is full/real while A is complex.
262  if (nargin > 1 + arg_offset
263  && ! (args(1 + arg_offset).is_real_scalar ()))
264  {
265  if (args(1+arg_offset).iscomplex ())
266  {
267  b_arg = 1+arg_offset;
268  have_b = true;
269  b_is_complex = true;
270  arg_offset++;
271  }
272  else
273  {
274  b_arg = 1+arg_offset;
275  have_b = true;
276  arg_offset++;
277  }
278  }
279 
280  if (nargin > (1+arg_offset))
281  k = args(1+arg_offset).nint_value ();
282 
283  if (nargin > (2+arg_offset))
284  {
285  if (args(2+arg_offset).is_string ())
286  {
287  typ = args(2+arg_offset).string_value ();
288 
289  // Use STL function to convert to upper case
290  transform (typ.begin (), typ.end (), typ.begin (), toupper);
291 
292  sigma = 0.;
293  }
294  else
295  {
296  sigma = args(2+arg_offset).xcomplex_value ("eigs: SIGMA must be a scalar or a string");
297 
298  have_sigma = true;
299  }
300  }
301 
302  sigmar = sigma.real ();
303  sigmai = sigma.imag ();
304 
305  if (nargin > (3+arg_offset))
306  {
307  if (! args(3+arg_offset).isstruct ())
308  error ("eigs: OPTS argument must be a structure");
309 
310  octave_scalar_map map = args(3+arg_offset).xscalar_map_value ("eigs: OPTS argument must be a scalar structure");
311 
313 
314  // issym is ignored for complex matrix inputs
315  tmp = map.getfield ("issym");
316  if (tmp.is_defined () && ! sym_tested)
317  {
318  symmetric = tmp.double_value () != 0.;
319  sym_tested = true;
320  }
321 
322  // isreal is ignored if A is not a function
323  tmp = map.getfield ("isreal");
324  if (tmp.is_defined () && have_a_fun)
325  a_is_complex = ! (tmp.double_value () != 0.);
326 
327  tmp = map.getfield ("tol");
328  if (tmp.is_defined ())
329  tol = tmp.double_value ();
330 
331  tmp = map.getfield ("maxit");
332  if (tmp.is_defined ())
333  maxit = tmp.nint_value ();
334 
335  tmp = map.getfield ("p");
336  if (tmp.is_defined ())
337  p = tmp.nint_value ();
338 
339  tmp = map.getfield ("v0");
340  if (tmp.is_defined ())
341  {
342  if (a_is_complex || b_is_complex)
343  cresid = ComplexColumnVector (tmp.complex_vector_value ());
344  else
345  resid = ColumnVector (tmp.vector_value ());
346  }
347 
348  tmp = map.getfield ("disp");
349  if (tmp.is_defined ())
350  disp = tmp.nint_value ();
351 
352  tmp = map.getfield ("cholB");
353  if (tmp.is_defined ())
354  cholB = tmp.double_value () != 0.;
355 
356  tmp = map.getfield ("permB");
357  if (tmp.is_defined ())
358  permB = ColumnVector (tmp.vector_value ()) - 1.0;
359  }
360 
361  if (nargin > (4+arg_offset))
362  error ("eigs: incorrect number of arguments");
363 
364  // Test undeclared (no issym) matrix inputs for symmetry
365  if (! sym_tested && ! have_a_fun)
366  {
367  if (a_is_sparse)
368  symmetric = asmm.issymmetric ();
369  else
370  symmetric = amm.issymmetric ();
371  }
372 
373  if (have_b)
374  {
375  if (a_is_complex || b_is_complex)
376  {
377  if (a_is_sparse)
378  bscm = args(b_arg).sparse_complex_matrix_value ();
379  else
380  bcm = args(b_arg).complex_matrix_value ();
381  }
382  else
383  {
384  if (a_is_sparse)
385  bsmm = args(b_arg).sparse_matrix_value ();
386  else
387  bmm = args(b_arg).matrix_value ();
388  }
389  }
390 
391  // Mode 1 for SM mode seems unstable for some reason.
392  // Use Mode 3 instead, with sigma = 0.
393  if (! have_sigma && typ == "SM")
394  have_sigma = true;
395 
396  octave_idx_type nconv;
397  if (a_is_complex || b_is_complex)
398  {
399  ComplexMatrix eig_vec;
400  ComplexColumnVector eig_val;
401 
402  if (have_a_fun)
404  (eigs_complex_func, n, typ, sigma, k, p, info, eig_vec,
405  eig_val, cresid, octave_stdout, tol, (nargout > 1), cholB,
406  disp, maxit);
407  else if (have_sigma)
408  {
409  if (a_is_sparse)
411  (ascm, sigma, k, p, info, eig_vec, eig_val, bscm, permB,
412  cresid, octave_stdout, tol, (nargout > 1), cholB, disp,
413  maxit);
414  else
416  (acm, sigma, k, p, info, eig_vec, eig_val, bcm, permB,
417  cresid, octave_stdout, tol, (nargout > 1), cholB, disp,
418  maxit);
419  }
420  else
421  {
422  if (a_is_sparse)
424  (ascm, typ, k, p, info, eig_vec, eig_val, bscm, permB,
425  cresid, octave_stdout, tol, (nargout > 1), cholB, disp,
426  maxit);
427  else
429  (acm, typ, k, p, info, eig_vec, eig_val, bcm, permB,
430  cresid, octave_stdout, tol, (nargout > 1), cholB, disp,
431  maxit);
432  }
433 
434  if (nargout < 2)
435  retval(0) = eig_val;
436  else
437  retval = ovl (eig_vec, ComplexDiagMatrix (eig_val), double (info));
438  }
439  else if (sigmai != 0.)
440  {
441  // Promote real problem to a complex one.
442  ComplexMatrix eig_vec;
443  ComplexColumnVector eig_val;
444 
445  if (have_a_fun)
447  (eigs_complex_func, n, typ, sigma, k, p, info, eig_vec,
448  eig_val, cresid, octave_stdout, tol, (nargout > 1), cholB,
449  disp, maxit);
450  else
451  {
452  if (a_is_sparse)
454  (SparseComplexMatrix (asmm), sigma, k, p, info, eig_vec,
455  eig_val, SparseComplexMatrix (bsmm), permB, cresid,
456  octave_stdout, tol, (nargout > 1), cholB, disp, maxit);
457  else
459  (ComplexMatrix (amm), sigma, k, p, info, eig_vec,
460  eig_val, ComplexMatrix (bmm), permB, cresid,
461  octave_stdout, tol, (nargout > 1), cholB, disp, maxit);
462  }
463 
464  if (nargout < 2)
465  retval(0) = eig_val;
466  else
467  retval = ovl (eig_vec, ComplexDiagMatrix (eig_val), double (info));
468  }
469  else
470  {
471  if (symmetric)
472  {
473  Matrix eig_vec;
474  ColumnVector eig_val;
475 
476  if (have_a_fun)
477  nconv = EigsRealSymmetricFunc
478  (eigs_func, n, typ, sigmar, k, p, info, eig_vec,
479  eig_val, resid, octave_stdout, tol, (nargout > 1),
480  cholB, disp, maxit);
481  else if (have_sigma)
482  {
483  if (a_is_sparse)
485  (asmm, sigmar, k, p, info, eig_vec, eig_val, bsmm,
486  permB, resid, octave_stdout, tol, (nargout > 1),
487  cholB, disp, maxit);
488  else
490  (amm, sigmar, k, p, info, eig_vec, eig_val, bmm,
491  permB, resid, octave_stdout, tol, (nargout > 1),
492  cholB, disp, maxit);
493  }
494  else
495  {
496  if (a_is_sparse)
498  (asmm, typ, k, p, info, eig_vec, eig_val, bsmm,
499  permB, resid, octave_stdout, tol, (nargout > 1),
500  cholB, disp, maxit);
501  else
503  (amm, typ, k, p, info, eig_vec, eig_val, bmm, permB,
504  resid, octave_stdout, tol, (nargout > 1), cholB,
505  disp, maxit);
506  }
507 
508  if (nargout < 2)
509  retval(0) = eig_val;
510  else
511  retval = ovl (eig_vec, DiagMatrix (eig_val), double (info));
512  }
513  else
514  {
515  ComplexMatrix eig_vec;
516  ComplexColumnVector eig_val;
517 
518  if (have_a_fun)
520  (eigs_func, n, typ, sigmar, k, p, info, eig_vec,
521  eig_val, resid, octave_stdout, tol, (nargout > 1),
522  cholB, disp, maxit);
523  else if (have_sigma)
524  {
525  if (a_is_sparse)
527  (asmm, sigmar, k, p, info, eig_vec, eig_val, bsmm,
528  permB, resid, octave_stdout, tol, (nargout > 1),
529  cholB, disp, maxit);
530  else
532  (amm, sigmar, k, p, info, eig_vec, eig_val, bmm,
533  permB, resid, octave_stdout, tol, (nargout > 1),
534  cholB, disp, maxit);
535  }
536  else
537  {
538  if (a_is_sparse)
540  (asmm, typ, k, p, info, eig_vec, eig_val, bsmm,
541  permB, resid, octave_stdout, tol, (nargout > 1),
542  cholB, disp, maxit);
543  else
545  (amm, typ, k, p, info, eig_vec, eig_val, bmm, permB,
546  resid, octave_stdout, tol, (nargout > 1), cholB,
547  disp, maxit);
548  }
549 
550  if (nargout < 2)
551  retval(0) = eig_val;
552  else
553  retval = ovl (eig_vec, ComplexDiagMatrix (eig_val), double (info));
554  }
555  }
556 
557  if (nconv <= 0)
558  warning_with_id ("Octave:eigs:UnconvergedEigenvalues",
559  "eigs: None of the %d requested eigenvalues converged", k);
560  else if (nconv < k)
561  warning_with_id ("Octave:eigs:UnconvergedEigenvalues",
562  "eigs: Only %d of the %d requested eigenvalues converged",
563  nconv, k);
564 
565  if (! fcn_name.empty ())
566  {
567  octave::symbol_table& symtab = interp.get_symbol_table ();
568 
569  symtab.clear_function (fcn_name);
570  }
571 
572  return retval;
573 
574 #else
575 
576  octave_unused_parameter (interp);
577  octave_unused_parameter (args);
578  octave_unused_parameter (nargout);
579 
580  err_disabled_feature ("eigs", "ARPACK");
581 
582 #endif
583 }
584 
585 /*
586 ## No test needed for internal helper function.
587 %!assert (1)
588 */
OCTINTERP_API octave_value_list feval(const std::string &name, const octave_value_list &args=octave_value_list(), int nargout=0)
void warning_with_id(const char *id, const char *fmt,...)
Definition: error.cc:816
scalar structure containing the one value The second produces an empty struct array with one field and no values since being passed an empty cell array of struct array values When the value is a cell array containing a single entry this becomes a scalar struct with that single entry as the value of the field That single entry happens to be an empty cell array Finally if the value is a non scalar cell array then ode isstruct
octave_idx_type EigsRealSymmetricFunc(EigsFunc fun, octave_idx_type n_arg, const std::string &_typ, double sigma, octave_idx_type k_arg, octave_idx_type p_arg, 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:1205
fname
Definition: load-save.cc:767
octave_idx_type EigsRealNonSymmetricMatrix(const M &m, const std::string typ, octave_idx_type k_arg, octave_idx_type p_arg, 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:1460
octave_idx_type EigsComplexNonSymmetricMatrixShift(const M &m, Complex sigma, octave_idx_type k_arg, octave_idx_type p_arg, 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:2802
OCTINTERP_API void print_usage(void)
Definition: defun.cc:54
for large enough k
Definition: lu.cc:617
void error(const char *fmt,...)
Definition: error.cc:578
ColumnVector eigs_func(const ColumnVector &x, int &eigs_error)
Definition: __eigs__.cc:56
disp(ar{str})
i e
Definition: data.cc:2591
std::string unique_symbol_name(const std::string &basename)
Definition: variables.cc:498
Cell getfield(const std::string &key) const
Definition: oct-map.cc:276
#define DEFMETHOD_DLD(name, interp_name, args_name, nargout_name, doc)
Macro to define an at run time dynamically loadable builtin method.
Definition: defun-dld.h:96
octave_idx_type EigsRealNonSymmetricMatrixShift(const M &m, double sigmar, octave_idx_type k_arg, octave_idx_type p_arg, 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:1811
static int call_depth
Definition: __eigs__.cc:53
nd deftypefn *std::string name
Definition: sysdep.cc:647
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:997
ComplexColumnVector eigs_complex_func(const ComplexColumnVector &x, int &eigs_error)
Definition: __eigs__.cc:96
octave_idx_type EigsRealNonSymmetricFunc(EigsFunc fun, octave_idx_type n_arg, const std::string &_typ, double sigmar, octave_idx_type k_arg, octave_idx_type p_arg, 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:2182
double tmp
Definition: data.cc:6252
octave_value retval
Definition: data.cc:6246
octave_idx_type EigsRealSymmetricMatrix(const M &m, const std::string typ, octave_idx_type k_arg, octave_idx_type p_arg, 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:617
Definition: dMatrix.h:36
octave_idx_type EigsComplexNonSymmetricMatrix(const M &m, const std::string typ, octave_idx_type k_arg, octave_idx_type p_arg, 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:2502
void warning(const char *fmt,...)
Definition: error.cc:801
octave::unwind_protect frame
Definition: graphics.cc:12190
bool issymmetric(void) const
Definition: dMatrix.cc:135
void err_user_supplied_eval(const char *name)
Definition: errwarn.cc:148
static bool warned_imaginary
Definition: __eigs__.cc:50
octave_idx_type EigsRealSymmetricMatrixShift(const M &m, double sigma, octave_idx_type k_arg, octave_idx_type p_arg, 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:906
#define octave_stdout
Definition: pager.h:174
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).isinteger())
octave_idx_type EigsComplexNonSymmetricFunc(EigsComplexFunc fun, octave_idx_type n_arg, const std::string &_typ, Complex sigma, octave_idx_type k_arg, octave_idx_type p_arg, 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:3122
p
Definition: lu.cc:138
bool issymmetric(void) const
Definition: dSparse.cc:130
octave_map map(dims)
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:125
args.length() nargin
Definition: file-io.cc:589
ColumnVector transform(const Matrix &m, double x, double y, double z)
Definition: graphics.cc:5410
void clear_function(const std::string &name)
Definition: symtab.h:392
static octave_function * eigs_fcn
Definition: __eigs__.cc:47
std::complex< double > Complex
Definition: oct-cmplx.h:31
virtual octave_function * function_value(bool silent=false)
Definition: ov-base.cc:871
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:888
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 const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE * x