- Timestamp:
- Dec 1, 2022, 1:47:52 PM (16 months ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- cda7950a170b64939c5389cd2f68d932d7b73850
- Parents:
- 5cc997784cbce4c118fa8bc8c2a902459d4068d4
- Location:
- kernel/linear_algebra
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/linear_algebra/MinorInterface.cc
r5cc9977 rc7e1896 32 32 { 33 33 int n = 0; if (currRing != 0) n = currRing->N; 34 int characteristic = 0; if (currRing != 0) characteristic = rChar(currRing);35 34 zeroCounter = 0; 36 35 bool result = true; … … 60 59 { 61 60 intArray[i] = n_Int(pGetCoeff(nfPolyArray[i]), currRing->cf); 62 if (characteristic != 0) intArray[i] = intArray[i] % characteristic;63 61 if (intArray[i] == 0) zeroCounter++; 64 62 } -
kernel/linear_algebra/MinorProcessor.cc
r5cc9977 rc7e1896 221 221 assume( (i >= 0) && (j >= 0) && (i >= j)); 222 222 if (j == 0 || i == j) return 1; 223 #if 0 223 224 int result = 1; 224 225 for (int k = i - j + 1; k <= i; k++) result *= k; … … 226 227 for (int k = 2; k <= j; k++) result /= k; 227 228 /* Now, result = (i - j + 1) * ... * i / 1 / 2 ... 228 229 ... / j = i! / j! / (i - j)!. */ 229 230 return result; 231 #endif 232 return binom(i,j); 230 233 } 231 234
Note: See TracChangeset
for help on using the changeset viewer.