Beispiel #1
0
        private void AddDefaultV2DataCollectionClick(object sender, RoutedEventArgs e)
        {
            V2DataCollection data_collection = new V2DataCollection(0.0, "Default info");

            data_collection.InitRandom(3, 10.0f, 10.0f, -10.0f, 10.0f);
            MainCollection.Add(data_collection);
            MainCollection.IsSave = false;
        }
Beispiel #2
0
    static void Main()
    {
        Grid1D G_1 = new Grid1D(3, 3);
        Grid1D G_2 = new Grid1D(5, 3);

        V2DataOnGrid V2_1 = new V2DataOnGrid("new_1", 5, G_1, G_2);

        V2_1.InitRandom(5, 10);
        //V2_1.NearAverage(0.9f);

        Console.WriteLine('\n' + V2_1.ToLongString());

        V2DataCollection V2C = (V2DataOnGrid)V2_1;

        Console.WriteLine('\n' + V2C.ToLongString());
        //V2C.NearAverage(0.9f);

        V2MainCollection VM_1 = new V2MainCollection();

        VM_1.AddDefaults();
        VM_1.ToString();

        Vector2 vect = new Vector2((float)101010, (float)111);

        foreach (var item in VM_1)
        {
            item.NearAverage(0.5f);
        }


        //Console.WriteLine(V2C.ToLongString());
        //Console.WriteLine(V2_1.NearAverage(0.5f));
        //Console.WriteLine(V2_1.ToString());
        //Console.WriteLine(V2_1.ToLongString());

        V2DataCollection V2C_1 = new V2DataCollection("newC_1", 6);
        V2DataCollection V2C_2 = new V2DataCollection("newC_2", 7);

        //V2C_1.InitRandom(10,10,10,-20,30);
        //Console.WriteLine(V2C_1.ToLongString());
        //V2C_1.NearAverage(0.9f);
        //Console.WriteLine(V2C_1.ToString());
        //Console.WriteLine(V2C_1.ToLongString());

        VM_1.Add(V2_1);
        VM_1.Add(V2C_1);
        VM_1.Add(V2C_2);
        //Console.WriteLine(VM_1.Count);
        VM_1.Remove("new_1", 5);
        //Console.WriteLine(VM_1.Count);
        //VM_1.AddDefaults();
        //Console.WriteLine(VM_1.Count);
    }
Beispiel #3
0
    static void Main()
    {
        Grid1D G_1 = new Grid1D(3, 3);
        Grid1D G_2 = new Grid1D(5, 3);

        V2DataOnGrid V2_1 = new V2DataOnGrid("new_1", 5, G_1, G_2);

        V2_1.InitRandom(5, 10);
        //V2_1.NearAverage(0.9f);

        Console.WriteLine('\n' + V2_1.ToLongString());

        V2DataCollection V2C = (V2DataOnGrid)V2_1;

        Console.WriteLine('\n' + V2C.ToLongString());
        //V2C.NearAverage(0.9f);

        V2MainCollection VM_1 = new V2MainCollection();

        VM_1.AddDefaults();
        VM_1.ToString();

        Vector2 vect = new Vector2((float)101010, (float)111);

        foreach (var item in VM_1)
        {
            item.NearAverage(0.5f);
        }


        //Console.WriteLine(V2C.ToLongString());
        //Console.WriteLine(V2_1.NearAverage(0.5f));
        //Console.WriteLine(V2_1.ToString());
        //Console.WriteLine(V2_1.ToLongString());

        V2DataCollection V2C_1 = new V2DataCollection("newC_1", 6);
        V2DataCollection V2C_2 = new V2DataCollection("newC_2", 7);

        //V2C_1.InitRandom(10,10,10,-20,30);
        //Console.WriteLine(V2C_1.ToLongString());
        //V2C_1.NearAverage(0.9f);
        //Console.WriteLine(V2C_1.ToString());
        //Console.WriteLine(V2C_1.ToLongString());

        VM_1.Add(V2_1);
        VM_1.Add(V2C_1);
        VM_1.Add(V2C_2);
        //Console.WriteLine(VM_1.Count);
        VM_1.Remove("new_1", 5);
        //Console.WriteLine(VM_1.Count);
        //VM_1.AddDefaults();
        //Console.WriteLine(VM_1.Count);


        V2DataCollection Lab_2_Data_Coll = new V2DataCollection("C:/Users/mrlyk/Desktop/Lab2/HomeTask/Лабораторная 2/Лаба/data.txt");

        Console.WriteLine(Lab_2_Data_Coll.ToLongString());

        V2MainCollection Lab_2_Main_Coll = new V2MainCollection();

        Lab_2_Main_Coll.AddDefaults();
        Console.WriteLine(Lab_2_Main_Coll.Mid_Value);
        Console.WriteLine(Lab_2_Main_Coll.Max_Far_Away);
        Console.WriteLine(Lab_2_Main_Coll.More_then_one);
    }