Changeset cf29809 in git
- Timestamp:
- Jun 30, 1997, 2:31:44 PM (27 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- c404887f96dfef9cbd021add3ee8d350244f6087
- Parents:
- 7adb5028d58cd523bb79d18cb12bbde01aa25097
- Location:
- Singular
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/clapsing.cc
r7adb502 rcf29809 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapsing.cc,v 1. 8 1997-06-17 10:59:33Singular Exp $5 // $Id: clapsing.cc,v 1.9 1997-06-30 12:31:38 Singular Exp $ 6 6 /* 7 7 * ABSTRACT: interface between Singular and factory … … 599 599 poly singclap_det( const matrix m ) 600 600 { 601 int r=m->rows(); 602 if (r!=m->cols()) 603 { 604 Werror("det of %d x %d matrix",r,m->cols()); 605 return NULL; 606 } 601 607 poly res=NULL; 602 608 if ( nGetChar() == 0 || nGetChar() > 1 ) 603 609 { 604 610 setCharacteristic( nGetChar() ); 605 CFMatrix M( m->rows(),m->cols());611 CFMatrix M(r,r); 606 612 int i,j; 607 for(i=1;i<= m->rows();i++)608 { 609 for(j=1;j<= m->cols();j++)613 for(i=1;i<=r;i++) 614 { 615 for(j=1;j<=r;j++) 610 616 { 611 617 M(i,j)=convSingPClapP(MATELEM(m,i,j)); 612 618 } 613 619 } 614 res= convClapPSingP( determinant(M, m->rows())) ;615 } 616 // and over Q(a) / Fp(a) 617 else if (( nGetChar()==1 ) /* Q(a) */ 618 || (nGetChar() <-1)) /* Fp(a) */ 619 { 620 if (nGetChar()==1) setCharacteristic( 0 ); 621 else setCharacteristic( -nGetChar() ); 622 CFMatrix M( m->rows(),m->cols());620 res= convClapPSingP( determinant(M,r) ) ; 621 } 622 // and over Q(a) / Fp(a) 623 else if (( nGetChar()==1 ) /* Q(a) */ 624 || (nGetChar() <-1)) /* Fp(a) */ 625 { 626 if (nGetChar()==1) setCharacteristic( 0 ); 627 else setCharacteristic( -nGetChar() ); 628 CFMatrix M(r,r); 623 629 poly res; 624 630 if (currRing->minpoly!=NULL) … … 627 633 Variable a=rootOf(mipo); 628 634 int i,j; 629 for(i=1;i<= m->rows();i++)630 { 631 for(j=1;j<= m->cols();j++)635 for(i=1;i<=r;i++) 636 { 637 for(j=1;j<=r;j++) 632 638 { 633 639 M(i,j)=convSingAPClapAP(MATELEM(m,i,j),a); 634 640 } 635 641 } 636 res= convClapAPSingAP( determinant(M, m->rows())) ;642 res= convClapAPSingAP( determinant(M,r) ) ; 637 643 } 638 644 else 639 645 { 640 646 int i,j; 641 for(i=1;i<= m->rows();i++)642 { 643 for(j=1;j<= m->cols();j++)647 for(i=1;i<=r;i++) 648 { 649 for(j=1;j<=r;j++) 644 650 { 645 651 M(i,j)=convSingTrPClapP(MATELEM(m,i,j)); 646 652 } 647 653 } 648 res= convClapPSingTrP( determinant(M, m->rows()));654 res= convClapPSingTrP( determinant(M,r) ); 649 655 } 650 656 } -
Singular/ideals.cc
r7adb502 rcf29809 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1. 9 1997-06-17 09:44:22Singular Exp $ */4 /* $Id: ideals.cc,v 1.10 1997-06-30 12:31:40 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - all basic methods to manipulate ideals … … 1930 1930 ideal I=idInit(1,1); 1931 1931 I->m[0]=pOne(); 1932 return I; 1932 return I; 1933 1933 } 1934 1934 if (deg == 1) … … 2158 2158 ideal idMinors(matrix a, int ar) 2159 2159 { 2160 if(ar<=0) 2161 { 2162 Werror("%d-th minor ",ar); 2163 return NULL; 2164 } 2160 2165 int i,j,k,size; 2161 2166 int *rowchoise,*colchoise; … … 2940 2945 for (j=IDELEMS(res)-1;j>=0;j--) 2941 2946 { 2942 if ((res->m[j]!=NULL) && (pIsConstantComp(res->m[j])) && 2947 if ((res->m[j]!=NULL) && (pIsConstantComp(res->m[j])) && 2943 2948 (pNext(res->m[j])==NULL)) 2944 2949 { -
Singular/iparith.cc
r7adb502 rcf29809 2281 2281 static BOOLEAN jjDET_I(leftv res, leftv v) 2282 2282 { 2283 intvec * m=(intvec*)v->Data(); 2283 2284 int i,j; 2284 intvec * m=(intvec*)v->Data(); 2285 res->data = (char *)singclap_det_i(m); 2285 i=m->rows();j=m->cols(); 2286 if(i==j) 2287 res->data = (char *)singclap_det_i(m); 2288 else 2289 { 2290 Werror("det of %d x %d intmat",i,j); 2291 return TRUE; 2292 } 2286 2293 return FALSE; 2287 2294 }
Note: See TracChangeset
for help on using the changeset viewer.