www.gusucode.com > bigdata 工具箱 matlab源码程序 > bigdata/@tall/invokeBinaryComparison.m

    function out = invokeBinaryComparison(fcnInfo, varargin)
%invokeBinaryComparison Invokes GE, LT etc.

% Copyright 2016 The MathWorks, Inc.

% This prevents this frame and anything below it being added to the gather
% error stack.
stack = createInvokeStack(fcnInfo{1});
markerFrame = matlab.bigdata.internal.InternalStackFrame(stack); %#ok<NASGU>

try
    args = invokeInputCheck(fcnInfo, varargin{:});
    
    % To handle comparing categorical data with tall char data (as per g1390878), we
    % must use SLICEFUN here. Note that this SLICEFUN invocation will normally
    % be equivalent to an ELEMENTFUN call.
    out = slicefun(str2func(fcnInfo{1}), args{:});
    out = invokeOutputInfo(fcnInfo{2}, out, args);
    
    % Now try to propagate sizes - but only in the case where the comparison was
    % elementwise (as per g1415247).
    clzs = cellfun(@tall.getClass, varargin, 'UniformOutput', false);
    if ~ismember('categorical', clzs)
        out = computeElementwiseSize(out, args);
    end

catch E
    matlab.bigdata.BigDataException.hThrowAsCallerWithSubmissionStack(E, stack(1));
end
end