Ejemplo n.º 1
0
 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];
 }
Ejemplo n.º 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;
     }
 }