/* g e t P r i m a l S o l u t i o n  */
returnValue QProblem_getPrimalSolution(QProblem *_THIS, real_t *const xOpt)
/* g e t P r i m a l S o l u t i o n  */
returnValue QProblem_getPrimalSolution(QProblem *_THIS, real_t *const xOpt)
{
	int i;
	if ( ( QProblem_getStatus( _THIS ) == QPS_AUXILIARYQPSOLVED ) ||
		 ( QProblem_getStatus( _THIS ) == QPS_HOMOTOPYQPSOLVED )  ||
		 ( QProblem_getStatus( _THIS ) == QPS_SOLVED ) )
	{
		for( i=0; i<QProblem_getNV( _THIS ); ++i )
			xOpt[i] = _THIS->x[i];
		return SUCCESSFUL_RETURN;
	}
	else
	{
		return RET_QP_NOT_SOLVED;
	}
}