function  [m,M,varargout]=summary_integautocorr(V,method,varargin)

%SUMMARY_INTEGAUTOCORR Compute the median,d the mean of the integrated
%                      autocorrelations of the auxiliary variables.
%
%Last Modification: 4 Sep 2008

[s1,s2]=size(V);
f=zeros(1,s2);

for i=1:s2

    if nargin==2;

        if isequal(method,'Sokald')

            f(i)=sokald_integautocorr_time(full(V(:,i)));

        else
            f(i)=integautocorr_time(full(V(:,i)),method);

        end
    else

        nlags=varargin{1};
        
        if isequal(method,'Sokald')
           
            f(i)=sokald_integautocorr_time(full(V(:,i)),nlags);

        else

            f(i)=integautocorr_time(full(V(:,i)),method,nlags);
            
        end

    end

end

m=mean(f);
M=median(f);

if nargout==3

    varargout{1}=f;

end