예제 #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);
     }
 }
예제 #2
0
        //读取PageRank计算结果
        void LoadPageRankResult(PageRankStrategy prStrategy)
        {

        }