示例#1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="IreliaQ" /> class.
 /// </summary>
 /// <param name="graphGenerator">
 ///     The graph generator.
 /// </param>
 /// <param name="pathfinderModule">
 ///     The pathfinder module.
 /// </param>
 public IreliaQ(
     IGraphGenerator <AStarNode, AStarEdge <AStarNode> > graphGenerator,
     PathfinderModule pathfinderModule)
 {
     this.GraphGenerator   = graphGenerator;
     this.PathfinderModule = pathfinderModule;
 }
        /// <summary>
        /// Метод, вызываемый после клика на кнопку "OK".
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonOK_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Generator = new SimpleRandom(VertexCount, MedCount, VillCount);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error");
                return;
            }

            DialogResult = true;
            Close();
        }
示例#3
0
 public GenericGraphTest()
 {
     m_Generator = new AdjacencyGraphGenerator();
 }
示例#4
0
 public GenericGraphTest()
 {
     m_Generator = null;
 }
示例#5
0
文件: Graph.cs 项目: microsoft/exsim
 /// <summary>
 /// Generates a sub-graph of this graph using an opaque graph generator
 /// </summary>
 /// <param name="generator">The generator to use</param>
 /// <returns>A graph derived from this graph</returns>
 public virtual Graph GenerateGraph(IGraphGenerator generator)
 {
     return(generator.GenerateGraph(this));
 }
示例#6
0
 public GenericGraphTest()
 {
     m_Generator = new AdjacencyGraphGenerator();
 }
示例#7
0
 public GenericGraphTest()
 {
     m_Generator = null;
 }