Changeset 24a9587 in git


Ignore:
Timestamp:
Jun 27, 2012, 1:45:03 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
cffd3e2f630fbc7b0e35afee97d6fa948cfd0b3e
Parents:
aaf761115c8487a0b7cf9172e2957b9899725c93
Message:
add: det for bigintmat
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    raaf761 r24a9587  
    38393839    p=singclap_det(m,currRing);
    38403840  res ->data = (char *)p;
     3841  return FALSE;
     3842}
     3843static BOOLEAN jjDET_BI(leftv res, leftv v)
     3844{
     3845  bigintmat * m=(bigintmat*)v->Data();
     3846  int i,j;
     3847  i=m->rows();j=m->cols();
     3848  if(i==j)
     3849    res->data = (char *)(long)singclap_det_bi(m,coeffs_BIGINT);
     3850  else
     3851  {
     3852    Werror("det of %d x %d bigintmat",i,j);
     3853    return TRUE;
     3854  }
    38413855  return FALSE;
    38423856}
  • Singular/table.h

    raaf761 r24a9587  
    8484,{D(jjNUMERATOR),  NUMERATOR_CMD,   NUMBER_CMD,     NUMBER_CMD    , ALLOW_PLURAL |ALLOW_RING}
    8585#ifdef HAVE_FACTORY
     86,{D(jjDET_BI),     DET_CMD,         BIGINT_CMD,     BIGINTMAT_CMD , ALLOW_PLURAL |ALLOW_RING}
    8687,{D(jjDET_I),      DET_CMD,         INT_CMD,        INTMAT_CMD    , ALLOW_PLURAL |ALLOW_RING}
    8788,{D(jjDET),        DET_CMD,         POLY_CMD,       MATRIX_CMD    , NO_PLURAL |ALLOW_RING}
  • libpolys/polys/clapsing.cc

    raaf761 r24a9587  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 // $Id$
    65/*
    76* ABSTRACT: interface between Singular and factory
     
    2524#include <coeffs/numbers.h>
    2625#include <coeffs/coeffs.h>
     26#include <coeffs/bigintmat.h>
    2727
    2828// #include <kernel/ffields.h>
     
    14301430  }
    14311431  int res= convFactoryISingI( determinant(M,m->rows()) ) ;
    1432   Off(SW_RATIONAL); // ?
     1432  return res;
     1433}
     1434
     1435number singclap_det_bi( bigintmat * m, const coeffs cf)
     1436{
     1437  assume(m->basecoeffs()==cf);
     1438  CFMatrix M(m->rows(),m->cols());
     1439  int i,j;
     1440  BOOLEAN setchar=TRUE;
     1441  for(i=m->rows();i>0;i--)
     1442  {
     1443    for(j=m->cols();j>0;j--)
     1444    {
     1445      M(i,j)=cf->convSingNFactoryN(BIMATELEM(*m,i,j),setchar,cf);
     1446      setchar=FALSE;
     1447    }
     1448  }
     1449  number res= cf->convFactoryNSingN( determinant(M,m->rows()),cf ) ;
    14331450  return res;
    14341451}
  • libpolys/polys/clapsing.h

    raaf761 r24a9587  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 // $Id$
    65/*
    76* ABSTRACT: interface between Singular and factory
     
    2019#include <misc/intvec.h>
    2120#include <polys/matpol.h>
     21#include <coeffs/bigintmat.h>
    2222//#include <polys/clapconv.h>
    2323//#include <kernel/longtrans.h>
     
    6262poly singclap_det( const matrix m, const ring r );
    6363int singclap_det_i( intvec * m, const ring r );
     64number singclap_det_bi( bigintmat * m, const coeffs cf);
    6465
    6566number   nChineseRemainder(number *x, number *q,int rl, const coeffs r);
Note: See TracChangeset for help on using the changeset viewer.