Beispiel #1
0
        private GridData(GridSize size, double[,] data)
        {
            if (data.GetLength(0) != size.Height || data.GetLength(1) != size.Width)
            {
                throw new ArgumentException("Dimensions don't match.");
            }

            Size   = size;
            m_Data = data;
            Bounds = new GridRegion(GridIndex.Zero, Size);
        }
        public GridRegion(GridIndex pos, GridSize size)
        {
            if (pos == null)
            {
                throw new ArgumentException("pos can't be null.");
            }

            if (size == null)
            {
                throw new ArgumentException("size can't be null.");
            }

            Pos  = pos;
            Size = size;
        }
 public static GridRegion FromSize(GridSize size) => new GridRegion(GridIndex.Zero, size);
 public static EdgeData AllocateNew(GridSize size) => new EdgeData(size, new double[size.Height, size.Width]);