function TFs = isPointOutOfBounds(this, XTbl)
% Return the logical vector TFs with the same height as XTbl, with element
% i true if any of the numeric variables in the point i are out of bounds
% of the optimizableVariables.

%   Copyright 2024 The MathWorks, Inc.

if isempty(XTbl)
    TFs = [];
    return;
end

VarSpec = this.PrivOptions.VarSpec;
IsNumeric = ~VarSpec.isCat;
X = table2array(XTbl(:,IsNumeric));
sz = [size(X,1) 1];
if isempty(X)
    TFs = false(sz);
    return;
end

LBs = repmat(VarSpec.LBs(IsNumeric), sz);
UBs = repmat(VarSpec.UBs(IsNumeric), sz);
isOutOfBoundsMat = X<LBs | X>UBs;
TFs = logical(sum(isOutOfBoundsMat, 2));
end