26 #if defined (HAVE_CONFIG_H)
51 (*current_liboctave_error_handler) (
"hess: requires square matrix");
66 double *pscale =
scale.fortran_vec ();
68 F77_XFCN (dgebal, DGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1),
69 n, h,
n, ilo, ihi, pscale, info
70 F77_CHAR_ARG_LEN (1)));
78 F77_XFCN (dgehrd, DGEHRD, (
n, ilo, ihi, h,
n, ptau, pwork,
81 unitary_hess_mat = hess_mat;
82 double *z = unitary_hess_mat.fortran_vec ();
84 F77_XFCN (dorghr, DORGHR, (
n, ilo, ihi, z,
n, ptau, pwork,
87 F77_XFCN (dgebak, DGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
88 F77_CONST_CHAR_ARG2 (&side, 1),
89 n, ilo, ihi, pscale,
n, z,
92 F77_CHAR_ARG_LEN (1)));
99 for (
F77_INT j = 0; j < a_nc; j++)
100 for (
F77_INT i = j+2; i < a_nr; i++)
101 hess_mat.elem (i, j) = 0;
114 (*current_liboctave_error_handler) (
"hess: requires square matrix");
129 float *pscale =
scale.fortran_vec ();
131 F77_XFCN (sgebal, SGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1),
132 n, h,
n, ilo, ihi, pscale, info
133 F77_CHAR_ARG_LEN (1)));
141 F77_XFCN (sgehrd, SGEHRD, (
n, ilo, ihi, h,
n, ptau, pwork,
144 unitary_hess_mat = hess_mat;
145 float *z = unitary_hess_mat.fortran_vec ();
147 F77_XFCN (sorghr, SORGHR, (
n, ilo, ihi, z,
n, ptau, pwork,
150 F77_XFCN (sgebak, SGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
151 F77_CONST_CHAR_ARG2 (&side, 1),
152 n, ilo, ihi, pscale,
n, z,
155 F77_CHAR_ARG_LEN (1)));
162 for (
F77_INT j = 0; j < a_nc; j++)
163 for (
F77_INT i = j+2; i < a_nr; i++)
164 hess_mat.elem (i, j) = 0;
177 (*current_liboctave_error_handler) (
"hess: requires square matrix");
192 double *pscale =
scale.fortran_vec ();
194 F77_XFCN (zgebal, ZGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1),
196 F77_CHAR_ARG_LEN (1)));
207 unitary_hess_mat = hess_mat;
208 Complex *z = unitary_hess_mat.fortran_vec ();
214 F77_XFCN (zgebak, ZGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
215 F77_CONST_CHAR_ARG2 (&side, 1),
218 F77_CHAR_ARG_LEN (1)));
225 for (
F77_INT j = 0; j < a_nc; j++)
226 for (
F77_INT i = j+2; i < a_nr; i++)
227 hess_mat.elem (i, j) = 0;
241 (*current_liboctave_error_handler) (
"hess: requires square matrix");
258 float *pscale =
scale.fortran_vec ();
260 F77_XFCN (cgebal, CGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1),
262 F77_CHAR_ARG_LEN (1)));
273 unitary_hess_mat = hess_mat;
280 F77_XFCN (cgebak, CGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
281 F77_CONST_CHAR_ARG2 (&side, 1),
284 F77_CHAR_ARG_LEN (1)));
291 for (
F77_INT j = 0; j < a_nc; j++)
292 for (
F77_INT i = j+2; i < a_nr; i++)
293 hess_mat.elem (i, j) = 0;
octave_idx_type cols(void) const
octave_idx_type rows(void) const
const T * fortran_vec(void) const
Size of the specified dimension.
Vector representing the dimensions (size) of an Array.
octave_idx_type init(const T &a)
#define F77_DBLE_CMPLX_ARG(x)
#define F77_XFCN(f, F, args)
octave_f77_int_type F77_INT
void scale(Matrix &m, double x, double y, double z)
std::complex< double > Complex
std::complex< float > FloatComplex