function InputFeasible = applyXConstraint(this, XTable)
%

%   Copyright 2016-2022 The MathWorks, Inc.

if isempty(this.PrivOptions.XConstraintFcn)
    InputFeasible = true(height(XTable),1);
else
    try
        InputFeasible = this.PrivOptions.XConstraintFcn(XTable);
    catch me
        bayesoptim.warn('XConstraintFcnError');
        rethrow(me);
    end
    if ~(islogical(InputFeasible) && isequal(size(InputFeasible), [height(XTable),1]))
        bayesoptim.err('XConstraintFcnOutput', num2str(height(XTable)), class(InputFeasible), num2str(size(InputFeasible)));
    end
end
end
