Changeset 5eef8d in git
- Timestamp:
- May 14, 2008, 4:08:41 PM (15 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 06879b7d7091f46b683a5e4267de4e3edc1ab70f
- Parents:
- 37d75ad2529983159dcf69a89eba6be075aa734a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipshell.cc
r37d75ad r5eef8d 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipshell.cc,v 1.18 2 2008-03-28 11:01:56Singular Exp $ */4 /* $Id: ipshell.cc,v 1.183 2008-05-14 14:08:41 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: … … 1644 1644 if (r->algring!=NULL) 1645 1645 rDecomposeCF(&(L->m[0]),r->algring,r); 1646 else 1647 { 1648 lists Lc=(lists)omAlloc0Bin(slists_bin); 1649 Lc->Init(4); 1650 // char: 1651 Lc->m[0].rtyp=INT_CMD; 1652 Lc->m[0].data=(void*)r->ch; 1653 // var: 1654 lists Lv=(lists)omAlloc0Bin(slists_bin); 1655 Lv->Init(1); 1656 Lv->m[0].rtyp=STRING_CMD; 1657 Lv->m[0].data=(void *)omStrDup(r->parameter[0]); 1658 Lc->m[1].rtyp=LIST_CMD; 1659 Lc->m[1].data=(void*)Lv; 1660 // ord: 1661 lists Lo=(lists)omAlloc0Bin(slists_bin); 1662 Lo->Init(1); 1663 lists Loo=(lists)omAlloc0Bin(slists_bin); 1664 Loo->Init(2); 1665 Loo->m[0].rtyp=STRING_CMD; 1666 Loo->m[0].data=(void *)omStrDup(rSimpleOrdStr(ringorder_lp)); 1667 intvec *iv=new intvec(1); (*iv)[0]=1; 1668 Loo->m[1].rtyp=INTVEC_CMD; 1669 Loo->m[1].data=(void *)iv; 1670 Lo->m[0].rtyp=LIST_CMD; 1671 Lo->m[0].data=(void*)Loo; 1672 1673 Lc->m[2].rtyp=LIST_CMD; 1674 Lc->m[2].data=(void*)Lo; 1675 // q-ideal: 1676 Lc->m[3].rtyp=IDEAL_CMD; 1677 Lc->m[3].data=(void *)idInit(1,1); 1678 // ---------------------- 1679 L->m[0].rtyp=LIST_CMD; 1680 L->m[0].data=(void*)Lc; 1681 } 1646 1682 if (L->m[0].rtyp==0) 1647 1683 { … … 1787 1823 ) 1788 1824 return NULL; 1825 int is_gf_char=0; 1789 1826 // 0: char/ cf - ring 1790 1827 // 1: list (var) … … 1971 2008 { 1972 2009 int l; 1973 if (((R->ch!=0) && (R->ch<2) )2010 if (((R->ch!=0) && (R->ch<2) && (is_gf_char=-1)) 1974 2011 #ifndef NV_OPS 1975 2012 || (R->ch > 32003) … … 1990 2027 else 1991 2028 { 1992 R->algring=rCompose((lists)L->m[0].Data()); 1993 if (R->algring==NULL) 1994 { 1995 WerrorS("could not create rational function coefficient field"); 1996 goto rCompose_err; 1997 } 1998 if (R->algring->ch>0) 1999 R->ch= -R->algring->ch; 2029 if (LL->m[0].Typ()==INT_CMD) 2030 { 2031 int ch=(int)(long)LL->m[0].Data(); 2032 while ((ch!=fftable[is_gf_char]) && (fftable[is_gf_char])) is_gf_char++; 2033 if (fftable[is_gf_char]==0) is_gf_char=-1; 2034 } 2035 if (is_gf_char==-1) 2036 { 2037 R->algring=rCompose((lists)L->m[0].Data()); 2038 if (R->algring==NULL) 2039 { 2040 WerrorS("could not create rational function coefficient field"); 2041 goto rCompose_err; 2042 } 2043 if (R->algring->ch>0) 2044 R->ch= -R->algring->ch; 2045 else 2046 R->ch=1; 2047 R->P=R->algring->N; 2048 R->parameter=(char**)omAlloc0(R->P*sizeof(char_ptr)); 2049 int i; 2050 for(i=R->P-1;i>=0;i--) 2051 R->parameter[i]=omStrDup(R->algring->names[i]); 2052 if (R->algring->qideal!=NULL) 2053 { 2054 if (IDELEMS(R->algring->qideal)==1) 2055 { 2056 R->minpoly=naInit(1); 2057 lnumber n=(lnumber)R->minpoly; 2058 n->z=R->algring->qideal->m[0]; 2059 R->algring->qideal->m[0]=NULL; 2060 idDelete(&(R->algring->qideal)); 2061 } 2062 else 2063 { 2064 WerrorS("not implemented yet."); 2065 } 2066 } 2067 } 2000 2068 else 2001 R->ch=1; 2002 R->P=R->algring->N; 2003 R->parameter=(char**)omAlloc0(R->P*sizeof(char_ptr)); 2004 int i; 2005 for(i=R->P-1;i>=0;i--) 2006 R->parameter[i]=omStrDup(R->algring->names[i]); 2007 if (R->algring->qideal!=NULL) 2008 { 2009 if (IDELEMS(R->algring->qideal)==1) 2010 { 2011 R->minpoly=naInit(1); 2012 lnumber n=(lnumber)R->minpoly; 2013 n->z=R->algring->qideal->m[0]; 2014 R->algring->qideal->m[0]=NULL; 2015 idDelete(&(R->algring->qideal)); 2016 } 2017 else 2018 { 2019 WerrorS("not implemented yet."); 2020 } 2069 { // gf-char 2070 R->ch=fftable[is_gf_char]; 2071 R->P=1; 2072 R->parameter=(char**)omAlloc0(1*sizeof(char_ptr)); 2073 R->parameter[0]=omStrDup((char*)((lists)(LL->m[1].Data()))->m[0].Data()); 2021 2074 } 2022 2075 }
Note: See TracChangeset
for help on using the changeset viewer.