23 #if defined (HAVE_CONFIG_H) 48 (*current_liboctave_error_handler) (
"hess: requires square matrix");
60 double *
h = hess_mat.fortran_vec ();
63 double *pscale =
scale.fortran_vec ();
65 F77_XFCN (dgebal, DGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1),
66 n,
h, n, ilo, ihi, pscale, info
67 F77_CHAR_ARG_LEN (1)));
75 F77_XFCN (dgehrd, DGEHRD, (n, ilo, ihi,
h, n, ptau, pwork,
78 unitary_hess_mat = hess_mat;
79 double *z = unitary_hess_mat.fortran_vec ();
81 F77_XFCN (dorghr, DORGHR, (n, ilo, ihi, z, n, ptau, pwork,
84 F77_XFCN (dgebak, DGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
85 F77_CONST_CHAR_ARG2 (&side, 1),
86 n, ilo, ihi, pscale, n, z,
89 F77_CHAR_ARG_LEN (1)));
98 hess_mat.elem (
i, j) = 0;
111 (*current_liboctave_error_handler) (
"hess: requires square matrix");
123 float *
h = hess_mat.fortran_vec ();
126 float *pscale =
scale.fortran_vec ();
128 F77_XFCN (sgebal, SGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1),
129 n,
h, n, ilo, ihi, pscale, info
130 F77_CHAR_ARG_LEN (1)));
138 F77_XFCN (sgehrd, SGEHRD, (n, ilo, ihi,
h, n, ptau, pwork,
141 unitary_hess_mat = hess_mat;
142 float *z = unitary_hess_mat.fortran_vec ();
144 F77_XFCN (sorghr, SORGHR, (n, ilo, ihi, z, n, ptau, pwork,
147 F77_XFCN (sgebak, SGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
148 F77_CONST_CHAR_ARG2 (&side, 1),
149 n, ilo, ihi, pscale, n, z,
152 F77_CHAR_ARG_LEN (1)));
161 hess_mat.elem (
i, j) = 0;
174 (*current_liboctave_error_handler) (
"hess: requires square matrix");
186 Complex *
h = hess_mat.fortran_vec ();
189 double *pscale =
scale.fortran_vec ();
191 F77_XFCN (zgebal, ZGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1),
193 F77_CHAR_ARG_LEN (1)));
204 unitary_hess_mat = hess_mat;
205 Complex *z = unitary_hess_mat.fortran_vec ();
211 F77_XFCN (zgebak, ZGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
212 F77_CONST_CHAR_ARG2 (&side, 1),
215 F77_CHAR_ARG_LEN (1)));
224 hess_mat.elem (
i, j) = 0;
238 (*current_liboctave_error_handler) (
"hess: requires square matrix");
255 float *pscale =
scale.fortran_vec ();
257 F77_XFCN (cgebal, CGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1),
259 F77_CHAR_ARG_LEN (1)));
270 unitary_hess_mat = hess_mat;
277 F77_XFCN (cgebak, CGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
278 F77_CONST_CHAR_ARG2 (&side, 1),
281 F77_CHAR_ARG_LEN (1)));
290 hess_mat.elem (
i, j) = 0;
#define F77_DBLE_CMPLX_ARG(x)
const T * fortran_vec(void) const
#define F77_XFCN(f, F, args)
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
octave_f77_int_type F77_INT
void scale(Matrix &m, double x, double y, double z)
std::complex< float > FloatComplex
octave_idx_type init(const T &a)
std::complex< double > Complex
Vector representing the dimensions (size) of an Array.