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

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

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