コード例 #1
0
 public V2DataOnGrid(Grid1D x, Grid1D y, string z, double w) : base(z, w)
 {
     OXY       = new Grid1D[2];
     complices = new Complex[x.count_node, y.count_node];
     OXY[0]    = x;
     OXY[1]    = y;
 }
コード例 #2
0
        public V2DataOnGrid(string filename) : base("Data", 2)
        {
            StreamReader get = new StreamReader(filename);

            try
            {
                data   = get.ReadLine();
                period = double.Parse(get.ReadLine());
                //string str1 = get.ReadLine();
                //base.data = str1;
                //int per1 = int.Parse(get.ReadLine());
                //base.period = per1;
                Grid1D[] OXY1 = new Grid1D[2];
                int      x1   = int.Parse(get.ReadLine());
                float    x2   = float.Parse(get.ReadLine());
                OXY1[0] = new Grid1D(x2, x1);
                int   y1 = int.Parse(get.ReadLine());
                float y2 = float.Parse(get.ReadLine());
                OXY1[1]   = new Grid1D(y2, y1);
                complices = new Complex[x1, y1];
                OXY       = OXY1;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                throw ex;
            }
            finally
            {
                if (get != null)
                {
                    get.Dispose();
                }
            }
        }
コード例 #3
0
        public void AddDefaults()
        {
            V2Datas = new List <V2Data>();

            Grid1D       x1 = new Grid1D(1, 3);
            V2DataOnGrid d1 = new V2DataOnGrid(x1, x1, "Grid", 2);

            d1.InitRandom(1, 5);
            Add(d1);

            V2DataCollection d2 = new V2DataCollection("Collection", 1.5);

            d2.InitRandom(3, 5, 5, 4.5, 6.9);
            Add(d2);

            Grid1D       x2 = new Grid1D(1, 3);
            V2DataOnGrid d3 = new V2DataOnGrid(x2, x2, "Grid 2", 0.5);

            d3.InitRandom(1, 4);
            Add(d3);
        }
コード例 #4
0
 public Grid1D(Grid1D obj)
 {
     step       = obj.step;
     count_node = obj.count_node;
 }