[BACK]Return to extern2.h CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Annotation of OpenXM/src/kan96xx/Kan/extern2.h, Revision 1.11

1.11    ! takayama    1: /* $OpenXM: OpenXM/src/kan96xx/Kan/extern2.h,v 1.10 2003/08/26 12:46:05 takayama Exp $ */
1.1       maekawa     2: /* poly.c */
                      3: void KinitKan(void);
                      4: MONOMIAL newMonomial(struct ring *ringp);
                      5: MONOMIAL monomialCopy(MONOMIAL m);
                      6: struct coeff *newCoeff(void);
                      7: MP_INT *newMP_INT();
                      8: POLY newCell(struct coeff *c,MONOMIAL m);
                      9: POLY cxx(int c,int i,int k,struct ring *ringp);
                     10: POLY bxx(MP_INT *c,int i,int k,struct ring *ringp); /* *c is not copied */
                     11: POLY cdd(int c,int i,int k,struct ring *ringp);
                     12: POLY bdd(MP_INT *c,int i,int k,struct ring *ringp); /* *c is not copied */
                     13: void errorPoly(char *s);
                     14: void warningPoly(char *s);
                     15:
                     16: /** Note that the results of all functions are read only except
                     17:   ppMult, mpMult, sp and constructors.
                     18:   The results of ppMult, mpMult, sp and constructors may be rewritten.
                     19: **/
                     20: /* poly2.c */
                     21: POLY ppAdd(POLY f,POLY g);
                     22: POLY ppSub(POLY f,POLY g);
                     23: POLY ppMult(POLY f,POLY g);
                     24: POLY ppMult_poly(POLY f,POLY g);
                     25: POLY (*mpMult)(POLY f,POLY g);
                     26: POLY mpMult_poly(POLY f,POLY g);
                     27: MONOMIAL (*monomialAdd)(MONOMIAL f,MONOMIAL g);
                     28: MONOMIAL monomialAdd_poly(MONOMIAL f,MONOMIAL g);
                     29: POLY ppAddv(POLY f,POLY g);  /* non-reentrant. It breaks f and g */
                     30: POLY ppAddv2(POLY f,POLY g,POLY top,POLY *nexttop);
                     31: /* non-reentrant. It breaks f and g */
                     32: POLY pCopy(POLY f);  /* shallow copy of poly */
                     33: POLY pcCopy(POLY f); /* shallow copy of poly and coeff */
                     34: POLY pmCopy(POLY f); /* shallow copy of poly and monomial */
                     35: POLY pcmCopy(POLY f);/* Deep copy of poly, coeff and monomial */
                     36: POLY head(POLY f);
                     37: void pvSort(POLY f);
                     38: POLY pPower(POLY f,int k);
                     39: POLY pPower_poly(POLY f,int k);
                     40: POLY pcDiv(POLY f,struct coeff *c);
                     41: POLY cpMult(struct coeff *c,POLY f); /* non-reentrant */
                     42: POLY modulop(POLY f,struct ring *ringp);
                     43: POLY modulo0(POLY f,struct ring *ringp);
                     44: POLY modulopZ(POLY f,struct coeff *pcoeff);
                     45: struct pairOfPOLY quotientByNumber(POLY f,struct coeff *pcoeff);
                     46: int pLength(POLY f);
1.7       takayama   47: struct coeff *gcdOfCoeff(POLY f);
                     48: int coeffSizeMin(POLY f);
                     49: POLY reduceContentOfPoly(POLY f,struct coeff **contp);
1.8       takayama   50: int shouldReduceContent(POLY f,int ss);
                     51:
1.1       maekawa    52:
                     53: /* poly3.c */
                     54: void initT(void);
                     55: void makeTable(struct coeff *c,struct exps e[],struct ring *ringp);
                     56: void monomialMult_diff(struct exps e[],POLY f);
                     57: POLY mpMult_diff(POLY f,POLY g);  /* It is non-reentrant!!! */
                     58: POLY mpMult_difference(POLY f,POLY g);
                     59: /* replace.c */
                     60: POLY mReplace(POLY f,int lSideX[],POLY rSideX[],int sizex,
                     61:                     int lSideD[],POLY rSideD[],int sized,int commutative);
                     62: POLY replace(POLY f,POLY lRule[],POLY rRule[],int num);
                     63: POLY replace_poly(POLY f,POLY lRule[],POLY rRule[],int num);
                     64:
                     65: /* poly4.c */
                     66: struct matrixOfPOLY *parts(POLY f,POLY v);
                     67: int pDegreeWrtV(POLY f,POLY v);
                     68: POLY homogenize(POLY f);
                     69: POLY homogenize_vec(POLY f);
                     70: int isHomogenized(POLY f);
                     71: int isHomogenized_vec(POLY f);
                     72: int containVectorVariable(POLY f);
                     73: POLY POLYToPrincipalPart(POLY f);
                     74: POLY POLYToInitW(POLY f,int w[]);
1.9       takayama   75: POLY POLYToInitWS(POLY f,int w[],int s[]);
                     76: int ordWsAll(POLY f,int w[],int s[]);
1.1       maekawa    77:
                     78: POLY polyGCD(POLY f,POLY g);
                     79: int isTheSameRing(struct ring *rstack[], int rp, struct ring *newRingp);
1.5       takayama   80: POLY goDeHomogenizeS(POLY f);
                     81: POLY goHomogenize(POLY f,int u[],int v[],int ds[],int dssize,int ei,int onlyS);
                     82: POLY goHomogenize11(POLY f,int ds[],int dssize,int ei,int onlyS);
                     83: POLY goHomogenize_dsIdx(POLY f,int u[],int v[],int dsIdx,int ei,int onlyS);
                     84: POLY goHomogenize11_dsIdx(POLY f,int ds[],int dsIdx,int ei,int onlyS);
1.6       takayama   85: struct ring *newRingOverFp(struct ring *rp, int p);
                     86: int getPrime(int p);
1.1       maekawa    87:
                     88: /* coeff.c */
                     89: char *intToString(int i);
                     90: char *coeffToString(struct coeff *cp);
                     91: struct coeff *intToCoeff(int i,struct ring *ringp);
                     92: int coeffToInt(struct coeff *cp);
                     93: struct coeff *mpintToCoeff(MP_INT *b,struct ring *ringp);
                     94: struct coeff *polyToCoeff(POLY f,struct ring *ringp);
                     95: struct coeff *coeffNeg(struct coeff *c,struct ring *ringp);
                     96: void errorCoeff(char *s);
                     97: void warningCoeff(char *str);
                     98: void Cadd(struct coeff *r,struct coeff *a,struct coeff *b);
                     99: void Csub(struct coeff *r,struct coeff *a,struct coeff *b);
                    100: void Cmult(struct coeff *r,struct coeff *a,struct coeff *b);
                    101: void Cdiv(struct coeff *r,struct coeff *a,struct coeff *b);
                    102: MP_INT *BiiComb(int p,int q);  /* read only */
                    103: int iiComb(int p,int q,int P);
                    104: void CiiComb(struct coeff *r,int p,int q); /* r->val.bigp is read only */
                    105: MP_INT *BiiPoch(int p,int k);  /* read only */
                    106: int iiPoch(int p,int k,int P);
                    107: void CiiPoch(struct coeff *r,int p,int k); /* r->val.bigp is read only */
                    108: MP_INT *BiiPower(int p,int k);  /* read only */
                    109: int iiPower(int p,int k,int P);
                    110: void CiiPower(struct coeff *r,int p,int k); /* r->val.bigp is read only */
                    111: struct coeff *coeffCopy(struct coeff *c);
                    112: struct coeff *stringToUniversalNumber(char *s,int *flagp);
                    113: struct coeff *newUniversalNumber(int i);
                    114: struct coeff *newUniversalNumber2(MP_INT *i);
                    115: #define is_this_coeff_MP_INT(c) ((c)->tag == MP_INTEGER?1:0)
                    116: #define coeff_to_MP_INT(c) ((c)->val.bigp)
                    117: int coeffEqual(struct coeff *c,struct coeff *d);
                    118: int coeffGreater(struct coeff *c,struct coeff *d);
                    119: POLY coeffToPoly(struct coeff *c,struct ring *rp);
                    120: void universalNumberDiv(struct coeff *q,struct coeff *a, struct coeff *b);
                    121: int isZero(struct coeff *a);
                    122: struct coeff *universalNumberGCD(struct coeff *a,struct coeff *b);
                    123:
                    124:
                    125: /* output.c */
                    126: char *POLYToString(POLY f,int multSym,int brace);
                    127: int isOne(struct coeff *cp);
                    128: int isMinusOne(struct coeff *cp);
                    129: int isMinusOne(struct coeff *cp);
                    130: int isNegative(struct coeff *cp);
                    131: int isConstant(POLY f);
1.10      takayama  132: int isConstantAll(POLY f);
1.1       maekawa   133: void errorOutput(char *s);
                    134: int validOutputOrder(int w[],int n);
1.11    ! takayama  135: char **makeDsmall(char **dvars,int n);
        !           136:
1.1       maekawa   137:
                    138: /* order.c */
                    139: void setOrderByMatrix(int order[],int n,int c, int l,int omsize);
                    140: void printOrder(struct ring *ringp);
                    141: void showRing(int level,struct ring *ringp);
                    142: int (*mmLarger)(POLY f,POLY g);
                    143: int mmLarger_matrix(POLY f,POLY g);
                    144: int mmLarger_pureLexicographic(POLY f, POLY g);
                    145: int mmLarger_tower(POLY f,POLY g);
                    146: void setFromTo(struct ring *ringp);
                    147:
                    148: /* switch.c */
                    149: void print_switch_status(void);
                    150: char *switch_function(char *fun,char *arg);
                    151: void switch_init(void);
                    152: void switch_mmLarger(char *arg);
                    153: void switch_mpMult(char *arg);
                    154: void switch_monomialAdd(char *arg);
                    155: void switch_red(char *arg);
                    156: void switch_sp(char *arg);
                    157: void switch_groebner(char *arg);
                    158: void switch_grade(char *arg);
                    159: void switch_isSameComponent(char *arg);
                    160:
                    161: /* parser.c */
                    162: POLY stringToPOLY(char *s,struct ring *ringp);
                    163: char *str2strPass0(char *s,struct ring *rp);
                    164:
                    165: /* matrix.c : Arguments are read only.*/
                    166: struct arrayOfPOLY *aaAdd(struct arrayOfPOLY *aa,struct arrayOfPOLY *bb);
                    167: struct matrixOfPOLY *aaMult(struct matrixOfPOLY *aa,struct matrixOfPOLY *bb);
                    168: struct arrayOfPOLY *newArrayOfPOLY(int size);
                    169: struct matrixOfPOLY *newMatrixOfPOLY(int m,int n);
                    170: struct arrayOfPOLY *carrayToArrayOfPOLY(POLY a[],int size);
                    171: void errorMatrix(char *s);
                    172:
                    173: /* redm.c (red.c for modules) */
                    174: int isReducible_module(POLY f,POLY g);
                    175: int (*isSameComponent)(POLY f,POLY g);
                    176: int isSameComponent_x(POLY f,POLY g);
                    177: int isSameComponent_xd(POLY f,POLY g);
                    178: POLY lcm_module(POLY f,POLY g);
                    179: int grade_module1(POLY f);
                    180: int grade_module1v(POLY f);
                    181: int grade_module2(POLY f);
                    182: int grade_firstvec(POLY f);
                    183: int grade_sugar(POLY f);
                    184: int eliminated(POLY f);
                    185: int isOrdered(POLY f);
1.4       takayama  186: int dGrade(POLY f);
                    187: int dGrade1(POLY f);
                    188: int uvGrade(POLY f, int u[],int v[],int ds[],int dssize,int ei);
                    189: int uvGrade1(POLY f, int u[],int v[],int ds[],int dssize,int ei);
1.1       maekawa   190:
                    191: /* resol.c */
                    192: struct arrayOfMonomialSyz schreyerSkelton(struct arrayOfPOLY g);
                    193: struct monomialSyz *newMonomialSyz(void);
                    194: struct arrayOfMonomialSyz enlargeArrayOfMonomialSyz(struct arrayOfMonomialSyz p);
                    195:
                    196:
                    197: /* from gradedset.h */
                    198: int (*grade)(POLY f);
                    199:
                    200: /* macro */
                    201: #define pMalloc(ringp) newCell(newCoeff(),newMonomial(ringp))
                    202:
                    203: #define xset0(f,i) f->m->e[i].x = 0
                    204: #define dset0(f,i) f->m->e[i].D = 0
                    205:
                    206: #define checkRing2(f,g) {\
                    207:   if ((f)->m->ringp != (g)->m->ringp) {\
                    208:     fprintf(stderr,"f and g must be in a same ring. Type in ctrl-\\");\
1.3       ohara     209:     getchar(); getchar(); exit(1);\
1.1       maekawa   210:     }\
                    211: }
                    212:
                    213: #define checkRing(f,g) {\
                    214:   if ((f)->m->ringp != (g)->m->ringp) {\
                    215:     warningPoly("f and g must be in a same ring. Returns 0.\n");\
                    216:     fprintf(stderr,"f=%s\n",POLYToString(f,'*',0));\
                    217:     fprintf(stderr,"g=%s\n",POLYToString(g,'*',0));\
                    218:     return(POLYNULL);\
                    219:     }\
                    220: }
                    221:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>