示例#1
0
CAMLprim value ml_gsl_linalg_QRPT_decomp2(value A, value Q, value R,
					  value TAU, value P, value NORM)
{
  int signum;
  GSL_PERMUT_OF_BIGARRAY(P);
  _DECLARE_MATRIX3(A, Q, R);
  _DECLARE_VECTOR2(TAU, NORM);
  _CONVERT_MATRIX3(A, Q, R);
  _CONVERT_VECTOR2(TAU, NORM);
  gsl_linalg_QRPT_decomp2(&m_A, &m_Q, &m_R, &v_TAU, &perm_P, &signum, &v_NORM);
  return Val_int(signum);
}
示例#2
0
    /**
     * C++ version of gsl_linalg_QRPT_decomp2().
     * @param A A matrix
     * @param q A matrix
     * @param r A matrix
     * @param tau A vector
     * @param p A permutation
     * @param signum The sign of the permutation
     * @param norm A vector used for column pivoting
     * @return Error code on failure
     */
    inline int QRPT_decomp2( matrix const& A, matrix& q, matrix& r, vector& tau,
			     permutation& p, int* signum, vector& norm ){
      return gsl_linalg_QRPT_decomp2( A.get(), q.get(), r.get(), tau.get(), p.get(), signum, norm.get() ); }