Changeset c7e1896 in git


Ignore:
Timestamp:
Dec 1, 2022, 1:47:52 PM (2 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
Children:
cda7950a170b64939c5389cd2f68d932d7b73850
Parents:
5cc997784cbce4c118fa8bc8c2a902459d4068d4
Message:
some simplification: MinorInterface/MinorProcessor
Location:
kernel/linear_algebra
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/linear_algebra/MinorInterface.cc

    r5cc9977 rc7e1896  
    3232{
    3333  int n = 0; if (currRing != 0) n = currRing->N;
    34   int characteristic = 0; if (currRing != 0) characteristic = rChar(currRing);
    3534  zeroCounter = 0;
    3635  bool result = true;
     
    6059      {
    6160        intArray[i] = n_Int(pGetCoeff(nfPolyArray[i]), currRing->cf);
    62         if (characteristic != 0) intArray[i] = intArray[i] % characteristic;
    6361        if (intArray[i] == 0) zeroCounter++;
    6462      }
  • kernel/linear_algebra/MinorProcessor.cc

    r5cc9977 rc7e1896  
    221221  assume( (i >= 0) && (j >= 0) && (i >= j));
    222222  if (j == 0 || i == j) return 1;
     223  #if 0
    223224  int result = 1;
    224225  for (int k = i - j + 1; k <= i; k++) result *= k;
     
    226227  for (int k = 2; k <= j; k++) result /= k;
    227228  /* Now, result = (i - j + 1) * ... * i / 1 / 2 ...
    228      ... / j = i! / j! / (i - j)!. */
     229   ... / j = i! / j! / (i - j)!. */
    229230  return result;
     231  #endif
     232  return binom(i,j);
    230233}
    231234
Note: See TracChangeset for help on using the changeset viewer.