Пример #1
0
    internal TopOfCell(IXYZDataSet CellBottom, IXYDataSet TopoGraphy)
    {
      _data = new Matrix3d(CellBottom.Data[0].RowCount, CellBottom.Data[0].ColumnCount, CellBottom.Data.LayerCount);

      for (int i = 0; i < _data.LayerCount - 1; i++)
      {
        _data[i] = CellBottom.Data[i + 1];
      }

      _data[_data.LayerCount - 1] = TopoGraphy.Data;
    }
Пример #2
0
        /// <summary>
        /// Returns a Matrix3D with the data for the TimeStep, Item
        /// TimeStep counts from 0, Item from 1.
        /// 
        /// </summary>
        /// <param name="TimeStep"></param>
        /// <param name="Item"></param>
        /// <returns></returns>
        public Matrix3d GetData(int TimeStep, int Item)
        {
            Dictionary<int, CacheEntry> _timeValues;
              CacheEntry cen;

              if (!_bufferData.TryGetValue(Item, out _timeValues))
              {
            _timeValues = new Dictionary<int, CacheEntry>();
            _bufferData.Add(Item, _timeValues);
              }
              if (!_timeValues.TryGetValue(TimeStep, out cen))
              {
            ReadItemTimeStep(TimeStep, Item);
            Matrix3d _data = new Matrix3d(_numberOfRows, _numberOfColumns, _numberOfLayers, dfsdata);
            cen = new CacheEntry(AbsoluteFileName, Item, TimeStep, _data);
            _timeValues.Add(TimeStep, cen);
            CheckBuffer();
              }
              else
            AccessList.Remove(cen);

              AccessList.AddLast(cen);
              return cen.Data3d;
        }