Exemplo n.º 1
0
 //执行参数计算
 void Calculate()
 {
     //距离参数
     if ((intChoice & intDistance) == intDistance)
     {
         disStrategy = new DistanceStrategy(curNetwork.Number);
         disStrategy.Calculate(curNetwork);
         tabMain.TabPages.Add(tabDistance);
         LoadDistanceResult(disStrategy);
     }
     //中心度参数
     if ((intChoice & intCenter) == intCenter)
     {
         coeStrategy = new CoefficientStrategy(curNetwork.Number);
         coeStrategy.Calculate(curNetwork);
         tabMain.TabPages.Add(tabCenter);
         LoadCenterResult(coeStrategy);
     }
     //PageRank
     if ((intChoice & intPageRank) == intPageRank)
     {
         prStrategy = new PageRankStrategy(curNetwork.Number);
         prStrategy.Calculate(curNetwork, 30);
         tabMain.TabPages.Add(tabPageRank);
         LoadPageRankResult(prStrategy);
     }
     //K-Shell
     if ((intChoice & intKshell) == intKshell)
     {
         kshellStrategy = new KShellStrategy(curNetwork.Number);
         kshellStrategy.Calculate(curNetwork);
         tabMain.TabPages.Add(tabKshell);
         LoadKshellResult(kshellStrategy);
     }
 }
Exemplo n.º 2
0
        //读取Kshell计算结果
        void LoadKshellResult(KShellStrategy kshellStrategy)
        {

        }