24 #if defined (HAVE_CONFIG_H)
44 return noperm ? (noscal ?
'N' :
'S') : (noscal ?
'P' :
'B');
53 : balanced_mat (a),
scale (), ilo (), ihi (), job (
get_job (noperm, noscal))
64 F77_XFCN (dgebal, DGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1), n,
65 balanced_mat.fortran_vec (), n, ilo, ihi,
66 scale.fortran_vec (), info
67 F77_CHAR_ARG_LEN (1)));
75 Matrix balancing_mat (n, n, 0.0);
77 balancing_mat.
elem (
i ,
i) = 1.0;
83 F77_XFCN (dgebak, DGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
84 F77_CONST_CHAR_ARG2 (&side, 1),
85 n, ilo, ihi,
scale.data (), n,
88 F77_CHAR_ARG_LEN (1)));
96 : balanced_mat (a),
scale (), ilo (), ihi (), job (
get_job (noperm, noscal))
107 F77_XFCN (sgebal, SGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1), n,
108 balanced_mat.fortran_vec (), n, ilo, ihi,
109 scale.fortran_vec (), info
110 F77_CHAR_ARG_LEN (1)));
120 balancing_mat.
elem (
i ,
i) = 1.0;
126 F77_XFCN (sgebak, SGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
127 F77_CONST_CHAR_ARG2 (&side, 1),
128 n, ilo, ihi,
scale.data (), n,
131 F77_CHAR_ARG_LEN (1)));
133 return balancing_mat;
139 : balanced_mat (a),
scale (), ilo (), ihi (), job (
get_job (noperm, noscal))
150 F77_XFCN (zgebal, ZGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1), n,
152 scale.fortran_vec (), info
153 F77_CHAR_ARG_LEN (1)));
163 balancing_mat.
elem (
i,
i) = 1.0;
169 F77_XFCN (zgebak, ZGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
170 F77_CONST_CHAR_ARG2 (&side, 1),
171 n, ilo, ihi,
scale.data (), n,
174 F77_CHAR_ARG_LEN (1)));
176 return balancing_mat;
181 bool noperm,
bool noscal)
182 : balanced_mat (a),
scale (), ilo (), ihi (), job (
get_job (noperm, noscal))
193 F77_XFCN (cgebal, CGEBAL, (F77_CONST_CHAR_ARG2 (&job, 1), n,
195 scale.fortran_vec (), info
196 F77_CHAR_ARG_LEN (1)));
206 balancing_mat.
elem (
i,
i) = 1.0;
212 F77_XFCN (cgebak, CGEBAK, (F77_CONST_CHAR_ARG2 (&job, 1),
213 F77_CONST_CHAR_ARG2 (&side, 1),
214 n, ilo, ihi,
scale.data (), n,
217 F77_CHAR_ARG_LEN (1)));
219 return balancing_mat;
Octave interface to the compression and uncompression libraries.
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
#define F77_DBLE_CMPLX_ARG(x)
static char get_job(bool noperm, bool noscal)
T & elem(octave_idx_type n)
#define F77_XFCN(f, F, args)
octave_idx_type rows(void) const
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
aepbalance(const Matrix &a, bool noperm, bool noscal)
Matrix balancing_matrix(void) const
=val(i)}if ode{val(i)}occurs in table i
void scale(Matrix &m, double x, double y, double z)
const T * fortran_vec(void) const
octave_idx_type cols(void) const