[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.7

1.7     ! takayama    1: /* $OpenXM: OpenXM/src/kan96xx/Kan/extern2.h,v 1.6 2003/08/19 08:02:09 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.1       maekawa    50:
                     51: /* poly3.c */
                     52: void initT(void);
                     53: void makeTable(struct coeff *c,struct exps e[],struct ring *ringp);
                     54: void monomialMult_diff(struct exps e[],POLY f);
                     55: POLY mpMult_diff(POLY f,POLY g);  /* It is non-reentrant!!! */
                     56: POLY mpMult_difference(POLY f,POLY g);
                     57: /* replace.c */
                     58: POLY mReplace(POLY f,int lSideX[],POLY rSideX[],int sizex,
                     59:                     int lSideD[],POLY rSideD[],int sized,int commutative);
                     60: POLY replace(POLY f,POLY lRule[],POLY rRule[],int num);
                     61: POLY replace_poly(POLY f,POLY lRule[],POLY rRule[],int num);
                     62:
                     63: /* poly4.c */
                     64: struct matrixOfPOLY *parts(POLY f,POLY v);
                     65: int pDegreeWrtV(POLY f,POLY v);
                     66: POLY homogenize(POLY f);
                     67: POLY homogenize_vec(POLY f);
                     68: int isHomogenized(POLY f);
                     69: int isHomogenized_vec(POLY f);
                     70: int containVectorVariable(POLY f);
                     71: POLY POLYToPrincipalPart(POLY f);
                     72: POLY POLYToInitW(POLY f,int w[]);
                     73:
                     74: POLY polyGCD(POLY f,POLY g);
                     75: int isTheSameRing(struct ring *rstack[], int rp, struct ring *newRingp);
1.5       takayama   76: POLY goDeHomogenizeS(POLY f);
                     77: POLY goHomogenize(POLY f,int u[],int v[],int ds[],int dssize,int ei,int onlyS);
                     78: POLY goHomogenize11(POLY f,int ds[],int dssize,int ei,int onlyS);
                     79: POLY goHomogenize_dsIdx(POLY f,int u[],int v[],int dsIdx,int ei,int onlyS);
                     80: POLY goHomogenize11_dsIdx(POLY f,int ds[],int dsIdx,int ei,int onlyS);
1.6       takayama   81: struct ring *newRingOverFp(struct ring *rp, int p);
                     82: int getPrime(int p);
1.1       maekawa    83:
                     84: /* coeff.c */
                     85: char *intToString(int i);
                     86: char *coeffToString(struct coeff *cp);
                     87: struct coeff *intToCoeff(int i,struct ring *ringp);
                     88: int coeffToInt(struct coeff *cp);
                     89: struct coeff *mpintToCoeff(MP_INT *b,struct ring *ringp);
                     90: struct coeff *polyToCoeff(POLY f,struct ring *ringp);
                     91: struct coeff *coeffNeg(struct coeff *c,struct ring *ringp);
                     92: void errorCoeff(char *s);
                     93: void warningCoeff(char *str);
                     94: void Cadd(struct coeff *r,struct coeff *a,struct coeff *b);
                     95: void Csub(struct coeff *r,struct coeff *a,struct coeff *b);
                     96: void Cmult(struct coeff *r,struct coeff *a,struct coeff *b);
                     97: void Cdiv(struct coeff *r,struct coeff *a,struct coeff *b);
                     98: MP_INT *BiiComb(int p,int q);  /* read only */
                     99: int iiComb(int p,int q,int P);
                    100: void CiiComb(struct coeff *r,int p,int q); /* r->val.bigp is read only */
                    101: MP_INT *BiiPoch(int p,int k);  /* read only */
                    102: int iiPoch(int p,int k,int P);
                    103: void CiiPoch(struct coeff *r,int p,int k); /* r->val.bigp is read only */
                    104: MP_INT *BiiPower(int p,int k);  /* read only */
                    105: int iiPower(int p,int k,int P);
                    106: void CiiPower(struct coeff *r,int p,int k); /* r->val.bigp is read only */
                    107: struct coeff *coeffCopy(struct coeff *c);
                    108: struct coeff *stringToUniversalNumber(char *s,int *flagp);
                    109: struct coeff *newUniversalNumber(int i);
                    110: struct coeff *newUniversalNumber2(MP_INT *i);
                    111: #define is_this_coeff_MP_INT(c) ((c)->tag == MP_INTEGER?1:0)
                    112: #define coeff_to_MP_INT(c) ((c)->val.bigp)
                    113: int coeffEqual(struct coeff *c,struct coeff *d);
                    114: int coeffGreater(struct coeff *c,struct coeff *d);
                    115: POLY coeffToPoly(struct coeff *c,struct ring *rp);
                    116: void universalNumberDiv(struct coeff *q,struct coeff *a, struct coeff *b);
                    117: int isZero(struct coeff *a);
                    118: struct coeff *universalNumberGCD(struct coeff *a,struct coeff *b);
                    119:
                    120:
                    121: /* output.c */
                    122: char *POLYToString(POLY f,int multSym,int brace);
                    123: int isOne(struct coeff *cp);
                    124: int isMinusOne(struct coeff *cp);
                    125: int isMinusOne(struct coeff *cp);
                    126: int isNegative(struct coeff *cp);
                    127: int isConstant(POLY f);
                    128: void errorOutput(char *s);
                    129: int validOutputOrder(int w[],int n);
                    130:
                    131: /* order.c */
                    132: void setOrderByMatrix(int order[],int n,int c, int l,int omsize);
                    133: void printOrder(struct ring *ringp);
                    134: void showRing(int level,struct ring *ringp);
                    135: int (*mmLarger)(POLY f,POLY g);
                    136: int mmLarger_matrix(POLY f,POLY g);
                    137: int mmLarger_pureLexicographic(POLY f, POLY g);
                    138: int mmLarger_tower(POLY f,POLY g);
                    139: void setFromTo(struct ring *ringp);
                    140:
                    141: /* switch.c */
                    142: void print_switch_status(void);
                    143: char *switch_function(char *fun,char *arg);
                    144: void switch_init(void);
                    145: void switch_mmLarger(char *arg);
                    146: void switch_mpMult(char *arg);
                    147: void switch_monomialAdd(char *arg);
                    148: void switch_red(char *arg);
                    149: void switch_sp(char *arg);
                    150: void switch_groebner(char *arg);
                    151: void switch_grade(char *arg);
                    152: void switch_isSameComponent(char *arg);
                    153:
                    154: /* parser.c */
                    155: POLY stringToPOLY(char *s,struct ring *ringp);
                    156: char *str2strPass0(char *s,struct ring *rp);
                    157:
                    158: /* matrix.c : Arguments are read only.*/
                    159: struct arrayOfPOLY *aaAdd(struct arrayOfPOLY *aa,struct arrayOfPOLY *bb);
                    160: struct matrixOfPOLY *aaMult(struct matrixOfPOLY *aa,struct matrixOfPOLY *bb);
                    161: struct arrayOfPOLY *newArrayOfPOLY(int size);
                    162: struct matrixOfPOLY *newMatrixOfPOLY(int m,int n);
                    163: struct arrayOfPOLY *carrayToArrayOfPOLY(POLY a[],int size);
                    164: void errorMatrix(char *s);
                    165:
                    166: /* redm.c (red.c for modules) */
                    167: int isReducible_module(POLY f,POLY g);
                    168: int (*isSameComponent)(POLY f,POLY g);
                    169: int isSameComponent_x(POLY f,POLY g);
                    170: int isSameComponent_xd(POLY f,POLY g);
                    171: POLY lcm_module(POLY f,POLY g);
                    172: int grade_module1(POLY f);
                    173: int grade_module1v(POLY f);
                    174: int grade_module2(POLY f);
                    175: int grade_firstvec(POLY f);
                    176: int grade_sugar(POLY f);
                    177: int eliminated(POLY f);
                    178: int isOrdered(POLY f);
1.4       takayama  179: int dGrade(POLY f);
                    180: int dGrade1(POLY f);
                    181: int uvGrade(POLY f, int u[],int v[],int ds[],int dssize,int ei);
                    182: int uvGrade1(POLY f, int u[],int v[],int ds[],int dssize,int ei);
1.1       maekawa   183:
                    184: /* resol.c */
                    185: struct arrayOfMonomialSyz schreyerSkelton(struct arrayOfPOLY g);
                    186: struct monomialSyz *newMonomialSyz(void);
                    187: struct arrayOfMonomialSyz enlargeArrayOfMonomialSyz(struct arrayOfMonomialSyz p);
                    188:
                    189:
                    190: /* from gradedset.h */
                    191: int (*grade)(POLY f);
                    192:
                    193: /* macro */
                    194: #define pMalloc(ringp) newCell(newCoeff(),newMonomial(ringp))
                    195:
                    196: #define xset0(f,i) f->m->e[i].x = 0
                    197: #define dset0(f,i) f->m->e[i].D = 0
                    198:
                    199: #define checkRing2(f,g) {\
                    200:   if ((f)->m->ringp != (g)->m->ringp) {\
                    201:     fprintf(stderr,"f and g must be in a same ring. Type in ctrl-\\");\
1.3       ohara     202:     getchar(); getchar(); exit(1);\
1.1       maekawa   203:     }\
                    204: }
                    205:
                    206: #define checkRing(f,g) {\
                    207:   if ((f)->m->ringp != (g)->m->ringp) {\
                    208:     warningPoly("f and g must be in a same ring. Returns 0.\n");\
                    209:     fprintf(stderr,"f=%s\n",POLYToString(f,'*',0));\
                    210:     fprintf(stderr,"g=%s\n",POLYToString(g,'*',0));\
                    211:     return(POLYNULL);\
                    212:     }\
                    213: }
                    214:

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