/// <summary>
    /// Konstruktor für minimalen Spannbaum
    /// </summary>
    /// <param name="g">GeoGraph aus dem ein 
    /// minimaler Spannbaum erstellt werden soll</param>
    public MinimumSpanningTree(GeoGraph g)
    {
        this.sourceGraph = g;
        this.form = new Form();
        this.form.Show();

        computeMinimumSpanningTree();
    }
Beispiel #2
0
    /// <summary>
    /// Konstruktor für minimalen Spannbaum
    /// </summary>
    /// <param name="g">GeoGraph aus dem ein
    /// minimaler Spannbaum erstellt werden soll</param>
    public MinimumSpanningTree(GeoGraph g)
    {
        this.sourceGraph = g;
        this.form        = new Form();
        this.form.Show();

        computeMinimumSpanningTree();
    }
Beispiel #3
0
    // Use this for initialization
    void Start()
    {
        GeoGraph[] maps = this.GetComponentsInChildren <GeoGraph> (true);
        foreach (GeoGraph i in maps)
        {
            if (i.CompareTag("china"))
            {
                m_Map0 = i;
            }
            else if (i.CompareTag("beijing"))
            {
                m_Map1 = i;
            }
        }
        TabChanged += m_Map0.OnTabChanged;
        TabChanged += m_Map1.OnTabChanged;

        ShowMap(MapType.MapChina);          // display China map on startup, it's directed graph.

        s_instance = this;
    }
        /// <summary>
        /// Einstiegspunkt des Programms
        /// </summary>
        public static void Main()
        {
            // Wir legen ein neues Array an und testen unser Programm!
            Point[] pArray = new Point[10];
            pArray[0] = new Point(8, 24);
            pArray[1] = new Point(9, 12);
            pArray[2] = new Point(3, 7);
            pArray[3] = new Point(13, 30);
            pArray[4] = new Point(12, 9);
            pArray[5] = new Point(4, 8);
            pArray[6] = new Point(8, 28);
            pArray[7] = new Point(10, 11);
            pArray[8] = new Point(28, 12);
            pArray[9] = new Point(6, 18);

            // Erstellung eines neuen Geographen
            GeoGraph g = new GeoGraph(pArray);

            // Erstellung eines minimalen Spannbaums
            MinimumSpanningTree tree = new MinimumSpanningTree(g);

            // Damit das Fenster offen bleibt, müssen wir hier Console.ReadKey() ausführen:
            Console.ReadKey();
        }
        /// <summary>
        /// Einstiegspunkt des Programms
        /// </summary>
        public static void Main()
        {
            // Wir legen ein neues Array an und testen unser Programm!
            Point[] pArray = new Point[10];
            pArray[0] = new Point(8, 24);
            pArray[1] = new Point(9, 12);
            pArray[2] = new Point(3, 7);
            pArray[3] = new Point(13, 30);
            pArray[4] = new Point(12, 9);
            pArray[5] = new Point(4, 8);
            pArray[6] = new Point(8, 28);
            pArray[7] = new Point(10, 11);
            pArray[8] = new Point(28, 12);
            pArray[9] = new Point(6, 18);

            // Erstellung eines neuen Geographen
            GeoGraph g = new GeoGraph(pArray);

            // Erstellung eines minimalen Spannbaums
            MinimumSpanningTree tree = new MinimumSpanningTree(g);

            // Damit das Fenster offen bleibt, müssen wir hier Console.ReadKey() ausführen:
            Console.ReadKey();
        }