Addded "exact" inference method to function cpquery().