Changeset 36f8d9 in git
- Timestamp:
- Aug 11, 2004, 3:32:25 PM (20 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- e65fe97407c42bd793157749a8b4dc89f2599006
- Parents:
- f691ff55cda7f85c9d30797234f6e91f3a44b01a
- Location:
- IntegerProgramming
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
IntegerProgramming/LLL.cc
rf691ff r36f8d9 202 202 } 203 203 204 204 typedef BigInt* BigIntP; 205 205 206 206 … … 241 241 if(r==1) 242 242 { 243 H=new (BigInt*)[1];243 H=new BigIntP[1]; 244 244 H[0]=new BigInt[1]; 245 245 H[0][0]=1; … … 260 260 // number_of_vectors+1. 261 261 262 H=new (BigInt*)[number_of_vectors];262 H=new BigIntP[number_of_vectors]; 263 263 for(short n=0;n<number_of_vectors;n++) 264 264 H[n]=new BigInt[number_of_vectors]; … … 268 268 BigInt* d=new BigInt[number_of_vectors+1]; 269 269 270 BigInt** lambda=new (BigInt*)[number_of_vectors];270 BigInt** lambda=new BigIntP[number_of_vectors]; 271 271 for(short n=1;n<number_of_vectors;n++) 272 272 lambda[n]=new BigInt[n]; … … 411 411 BigInt **aux=H; 412 412 if(r>0) 413 H=new (BigInt*)[r];413 H=new BigIntP[r]; 414 414 for(short i=0;i<r;i++) 415 415 H[i]=aux[i]; … … 475 475 BigInt* d=new BigInt[number_of_vectors+1]; 476 476 477 BigInt** lambda=new (BigInt*)[number_of_vectors];477 BigInt** lambda=new BigIntP[number_of_vectors]; 478 478 for(short s=1;s<number_of_vectors;s++) 479 479 lambda[s]=new BigInt[s]; -
IntegerProgramming/LLL_lattice_to_send.cc
rf691ff r36f8d9 91 91 92 92 lll_d = new mpz_t[F + 1]; 93 lll_lambda = new (mpz_t *)[F + 1];93 lll_lambda = new mpz_t *[F + 1]; 94 94 mpz_init (lll_d[0]); 95 95 for (i = 1; i <= F; i++) { … … 194 194 aux=new char[tamano]; 195 195 fscanf (stdin, "%i, %i\n", &numF, &numC); 196 base = new (mpz_t *)[numF+1];196 base = new mpz_t *[numF+1]; 197 197 for (i = 1; i <= numF; i++) { 198 198 base[i] = new mpz_t[numC+1]; -
IntegerProgramming/matrix.cc
rf691ff r36f8d9 9 9 10 10 ////////////// constructors and destructor ////////////////////////////////// 11 typedef Integer* IntegerP; 12 typedef BigInt* BigIntP; 11 13 12 14 matrix::matrix(const short& row_number, const short& column_number) … … 28 30 // memory allocation and initialization 29 31 30 coefficients=new (Integer*)[rows];32 coefficients=new IntegerP[rows]; 31 33 for(short i=0;i<rows;i++) 32 34 coefficients[i]=new Integer[columns]; … … 55 57 // memory allocation and initialization 56 58 57 coefficients=new (Integer*)[rows];59 coefficients=new IntegerP[rows]; 58 60 for(short i=0;i<rows;i++) 59 61 coefficients[i]=new Integer[columns]; … … 98 100 } 99 101 100 coefficients=new (Integer*)[rows];102 coefficients=new IntegerP[rows]; 101 103 for(short i=0;i<rows;i++) 102 104 coefficients[i]=new Integer[columns]; … … 138 140 // memory allocation and initialization 139 141 140 coefficients=new (Integer*)[rows];142 coefficients=new IntegerP[rows]; 141 143 for(short i=0;i<rows;i++) 142 144 coefficients[i]=new Integer[columns]; … … 170 172 // memory allocation and initialization (also for H) 171 173 172 coefficients=new (Integer*)[rows];174 coefficients=new IntegerP[rows]; 173 175 for(short i=0;i<rows;i++) 174 176 coefficients[i]=new Integer[columns]; … … 179 181 if(_kernel_dimension>0) 180 182 { 181 H=new (BigInt*)[_kernel_dimension];183 H=new BigIntP[_kernel_dimension]; 182 184 for(short k=0;k<_kernel_dimension;k++) 183 185 H[k]=new (BigInt)[columns]; … … 260 262 // copy the column vectors of the actual matrix 261 263 // (They are modified by the LLL-algorithm!) 262 BigInt** b=new (BigInt*)[columns];264 BigInt** b=new BigIntP[columns]; 263 265 for(short n=0;n<columns;n++) 264 266 b[n]=new BigInt[rows];
Note: See TracChangeset
for help on using the changeset viewer.