상속: Graph
예제 #1
0
        public static void Main(string[] args)
        {
            GroupParameters p = new GroupParameters();

            p.Parse(args);

            if (p.Help)
            {
                p.ShowHelp();
                return;
            }
            if (p.ErrorMessage != string.Empty)
            {
                Console.WriteLine(p.ErrorMessage);
                p.ShowHelp();
                return;
            }

            Console.WriteLine("Creating a graph with base size: {0}, near " +
                              "connections: {1}, shortcuts {2}, group size: {3}",
                              p.Size, p.Near, p.Shortcuts, p.GroupSize);

            GroupGraph graph = new GroupGraph(p.Size, p.Near, p.Shortcuts, p.Seed,
                                              p.LatencyMap, p.GroupSize);

            Console.WriteLine("Done populating graph...");

            graph.DhtGroupQuery();
//      graph.GroupBroadcastByUnicast();
//      graph.BroadcastAverage();

            if (p.Outfile != string.Empty)
            {
                Console.WriteLine("Saving dot file to: " + p.Outfile);
                graph.WriteGraphFile(p.Outfile);
            }
        }
예제 #2
0
파일: Group.cs 프로젝트: pstjuste/brunet
    public static void Main(string[] args)
    {
      GroupParameters p = new GroupParameters();
      p.Parse(args);

      if(p.Help) {
        p.ShowHelp();
        return;
      }
      if(p.ErrorMessage != string.Empty) {
        Console.WriteLine(p.ErrorMessage);
        p.ShowHelp();
        return;
      }

      Console.WriteLine("Creating a graph with base size: {0}, near " + 
          "connections: {1}, shortcuts {2}, group size: {3}",
          p.Size, p.Near, p.Shortcuts, p.GroupSize);

      GroupGraph graph = new GroupGraph(p.Size, p.Near, p.Shortcuts, p.Seed,
          p.LatencyMap, p.GroupSize);
      Console.WriteLine("Done populating graph...");

      graph.DhtGroupQuery();
//      graph.GroupBroadcastByUnicast();
//      graph.BroadcastAverage();

      if(p.Outfile != string.Empty) {
        Console.WriteLine("Saving dot file to: " + p.Outfile);
        graph.WriteGraphFile(p.Outfile);
      }
    }