function D = sprandsym( varargin )
%distributed.SPRANDSYM Sparse random symmetric distributed matrix.
%   D = SPRANDSYM(S)
%   D = distributed.SPRANDSYM(S)
%   D = distributed.SPRANDSYM(N,DENSITY)
%   
%   Example:
%       D = distributed.sprandsym(1000, 0.01);
%   
%   See also SPRANDSYM, distributed


%   Copyright 2016-2020 The MathWorks, Inc.

% Static method of distributed. If only one input make sure it is distributed.
if nargin==1
    A = varargin{1};
    if ~isa(A,'distributed')
        A = distributed(A);
    end
    D = distributedutil.distributedSpmdWrapper( @codistributed.sprandsym, A );
else
    D = distributed.sBuild( @codistributed.sprandsym, 'sprandsym', varargin{:} );
end

end
