Beispiel #1
0
CAMLprim value ml_gsl_linalg_QR_Rsolve(value QR, value B, value X)
{
  _DECLARE_MATRIX(QR);
  _DECLARE_VECTOR2(B,X);
  _CONVERT_MATRIX(QR);
  _CONVERT_VECTOR2(B,X);
  gsl_linalg_QR_Rsolve(&m_QR, &v_B, &v_X);
  return Val_unit;
}
Beispiel #2
0
	void Vector::solveR ( const Matrix& r, const Vector& b ) {
		const size_t
			rows = r.countRows(),
			cols = r.countColumns();
		assert( cols == rows );
		if ( 0 == cols ) {
			assert( 0 == countDimensions() );
			// no operation in 0-dimensional space
		} else {
			gsl_linalg_QR_Rsolve( &r.matrix, &b.vector, &vector );
			// synonym of gsl_linalg_R_solve, as the code seems
		}
	}
Beispiel #3
0
 /**
  * C++ version of gsl_linalg_QR_Rsolve().
  * @param QR A QR decomposition matrix
  * @param b A vector
  * @param x A vector
  * @return Error code on failure
  */
 inline int QR_Rsolve( matrix const& QR, vector const& b, vector& x ){
   return gsl_linalg_QR_Rsolve( QR.get(), b.get(), x.get() ); }