function [ output_args ] = generate_graphs( name )
%GENERATE_GRAPHS1 此处显示有关此函数的摘要
%   此处显示详细说明
    load([name '.mat']);
    X=full(X);
    d=sqrt(sum(X.^2));
    X=bsxfun(@rdivide,X,d);
    
    [n,d]=size(X);
    Ai=zeros(n,n,5);
    D=EuDist2(X);
    optt=mean(mean(D));
    clear D;
    opt1.NeighborMode='KNN';
    opt1.WeightMode='Binary';
    opt1.k=10;
    Ai(:,:,1)=constructW(X,opt1);
    Ai(:,:,1)=bsxfun(@rdivide,Ai(:,:,1),sum(Ai(:,:,1),2));
    
    opt2.NeighborMode='KNN';
    opt2.WeightMode='HeatKernel';
    opt2.k=10;
    opt2.t=0.1*optt;
    Ai(:,:,2)=constructW(X,opt2);
    Ai(:,:,2)=bsxfun(@rdivide,Ai(:,:,2),sum(Ai(:,:,2),2));
    
    opt3.NeighborMode='KNN';
    opt3.WeightMode='HeatKernel';
    opt3.k=10;
    opt3.t=optt;
    Ai(:,:,3)=constructW(X,opt3);
    Ai(:,:,3)=bsxfun(@rdivide,Ai(:,:,3),sum(Ai(:,:,3),2));

    opt4.NeighborMode='KNN';
    opt4.WeightMode='HeatKernel';
    opt4.k=10;
    opt4.t=10*optt;
    Ai(:,:,4)=constructW(X,opt4);
    Ai(:,:,4)=bsxfun(@rdivide,Ai(:,:,4),sum(Ai(:,:,4),2));

    opt5.NeighborMode='KNN';
    opt5.WeightMode='Cosine';
    opt5.k=10;
    Ai(:,:,5)=constructW(X,opt5);
    Ai(:,:,5)=bsxfun(@rdivide,Ai(:,:,5),sum(Ai(:,:,5),2));
    
    save(['graph_' name],'X','y','Ai');
    

end

