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

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

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