| 4 | #include "gfanlib/gfanlib.h" |
| 5 | |
| 6 | long wDeg(const poly p, const ring r, const gfan::ZVector &w) |
| 7 | { |
| 8 | long d=0; |
| 9 | for (unsigned i=0; i<w.size(); i++) |
| 10 | { |
| 11 | if (!w[i].fitsInInt()) |
| 12 | { |
| 13 | WerrorS("wDeg: overflow in weight vector"); |
| 14 | throw 0; // weightOverflow; |
| 15 | } |
| 16 | d += p_GetExp(p,i+1,r)*w[i].toInt(); |
| 17 | } |
| 18 | return d; |
| 19 | } |
| 20 | |
| 21 | gfan::ZVector WDeg(const poly p, const ring r, const gfan::ZVector &w, const gfan::ZMatrix &W) |
| 22 | { |