function [y,hasAggMethod] = evaluateCustomAggMethod(aggMethod,x,varargin) %#codegen
%% EVALUATECUSTOMIMPMETHOD Evaluates custom aggregation method.
%
%   [Y,HASAGGMETHOD] = EVALUATECUSTOMAGGMETHOD(AGGMETHOD,X) Evaluates X
%   with AGGMETHOD. HASAGGMETHOD is true if AGGMETHOD exists.
%
%   Overload this function in a code generation directory for evaluating a
%   custom aggregation method. 
%
%   Examples
%     function [y,hasAggMethod] = evaluateCustomAggMethod(aggMethod,x,varargin) %#codegen
%         y = -ones('like',x);
%         hasAggMethod = false;
%         if isequal(aggMethod,uint8('customAggMethod'))
%             y(1) = customAggMethod(x,varargin{:});
%             hasAggMethod(1) = true;
%         end
%     end

%   Copyright 2018-2019 The MathWorks, Inc. 

y = -ones('like',x);
hasAggMethod = false;
end