コード例 #1
0
ファイル: HLayeredArray2.cs プロジェクト: htna/explsolv
 public HLayeredArray2(T def, long size, long blocksize)
 {
     if (HCsbLibStatic.HLayeredArray2_doselftest)
     {
         HCsbLibStatic.HLayeredArray2_selftest();
     }
     this.Size      = size;
     this.blocksize = blocksize;
     this.newarri   = delegate(long lsize) { return(new HLayeredArray1 <T>(def, lsize)); };
     this.def       = def;
     this.arrcount  = 0;
     this.arr       = new HLayeredArray1 <T> [(size - 1) / blocksize + 1];
 }
コード例 #2
0
 public HLayeredArray1(T def, long capacity1)
 {
     if (HCsbLibStatic.HLayeredArray1_doselftest)
     {
         HCsbLibStatic.HLayeredArray1_selftest();
     }
     this.capacity1 = capacity1;
     this.def       = def;
     this.count     = 0;
     this.arr       = new T[capacity1];
     for (long i = 0; i < capacity1; i++)
     {
         arr[i] = def;
     }
 }