26 #if defined (HAVE_CONFIG_H)
43 get_job (
bool noperm,
bool noscal)
45 return noperm ? (noscal ?
'N' :
'S') : (noscal ?
'P' :
'B');
53 : m_balanced_mat (a), m_scale (), m_ilo (), m_ihi (),
54 m_job (get_job (noperm, noscal))
59 (*current_liboctave_error_handler)
60 (
"aepbalance: requires square matrix");
68 t_ilo, t_ihi,
m_scale.fortran_vec (), info
69 F77_CHAR_ARG_LEN (1)));
79 F77_INT n = to_f77_int (m_balanced_mat.rows ());
83 balancing_mat.
elem (i, i) = 1.0;
86 F77_INT t_ilo = to_f77_int (m_ilo);
87 F77_INT t_ihi = to_f77_int (m_ihi);
91 F77_XFCN (dgebak, DGEBAK, (F77_CONST_CHAR_ARG2 (&m_job, 1),
92 F77_CONST_CHAR_ARG2 (&side, 1),
93 n, t_ilo, t_ihi, m_scale.data (),
n,
96 F77_CHAR_ARG_LEN (1)));
105 : m_balanced_mat (a), m_scale (), m_ilo (), m_ihi (),
106 m_job (get_job (noperm, noscal))
111 (*current_liboctave_error_handler)
112 (
"aepbalance: requires square matrix");
120 t_ihi,
m_scale.fortran_vec (), info
121 F77_CHAR_ARG_LEN (1)));
131 F77_INT n = to_f77_int (m_balanced_mat.rows ());
135 balancing_mat.
elem (i, i) = 1.0;
138 F77_INT t_ilo = to_f77_int (m_ilo);
139 F77_INT t_ihi = to_f77_int (m_ihi);
143 F77_XFCN (sgebak, SGEBAK, (F77_CONST_CHAR_ARG2 (&m_job, 1),
144 F77_CONST_CHAR_ARG2 (&side, 1),
145 n, t_ilo, t_ihi, m_scale.data (),
n,
148 F77_CHAR_ARG_LEN (1)));
150 return balancing_mat;
157 : m_balanced_mat (a), m_scale (), m_ilo (), m_ihi (),
158 m_job (get_job (noperm, noscal))
163 (*current_liboctave_error_handler)
164 (
"aepbalance: requires square matrix");
171 (F77_CONST_CHAR_ARG2 (&
m_job, 1),
n,
173 n, t_ilo, t_ihi,
m_scale.fortran_vec (), info
174 F77_CHAR_ARG_LEN (1)));
184 F77_INT n = to_f77_int (m_balanced_mat.rows ());
188 balancing_mat.
elem (i, i) = 1.0;
191 F77_INT t_ilo = to_f77_int (m_ilo);
192 F77_INT t_ihi = to_f77_int (m_ihi);
197 (F77_CONST_CHAR_ARG2 (&m_job, 1),
198 F77_CONST_CHAR_ARG2 (&side, 1),
199 n, t_ilo, t_ihi, m_scale.data (),
n,
203 F77_CHAR_ARG_LEN (1)));
205 return balancing_mat;
211 bool noperm,
bool noscal)
212 : m_balanced_mat (a), m_scale (), m_ilo (), m_ihi (),
213 m_job (get_job (noperm, noscal))
218 (*current_liboctave_error_handler)
219 (
"aepbalance: requires square matrix");
227 n, t_ilo, t_ihi,
m_scale.fortran_vec (), info
228 F77_CHAR_ARG_LEN (1)));
238 F77_INT n = to_f77_int (m_balanced_mat.rows ());
242 balancing_mat.
elem (i, i) = 1.0;
245 F77_INT t_ilo = to_f77_int (m_ilo);
246 F77_INT t_ihi = to_f77_int (m_ihi);
250 F77_XFCN (cgebak, CGEBAK, (F77_CONST_CHAR_ARG2 (&m_job, 1),
251 F77_CONST_CHAR_ARG2 (&side, 1),
252 n, t_ilo, t_ihi, m_scale.data (),
n,
256 F77_CHAR_ARG_LEN (1)));
258 return balancing_mat;
271 OCTAVE_END_NAMESPACE(math)
272 OCTAVE_END_NAMESPACE(
octave)
T & elem(octave_idx_type n)
Size of the specified dimension.
T * fortran_vec()
Size of the specified dimension.
octave_idx_type rows() const
octave_idx_type cols() const
MT balancing_matrix() const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define F77_DBLE_CMPLX_ARG(x)
#define F77_XFCN(f, F, args)
octave_f77_int_type F77_INT