Go to the first, previous, next, last section, table of contents.

### `dp_td`, `dp_sugar`

`dp_td(dpoly)`
  :: Gets the total degree of the head term.
`dp_sugar(dpoly)`
  :: Gets the `sugar` of a polynomial.

return
  non-negative integer
dpoly
  distributed polynomial
onoff
  flag

- Function `dp_td()` returns the total degree of the head term, i.e., the sum of all exponent of variables in that term.
- Upon creation of a distributed polynomial, an integer called `sugar` is associated. This value is the total degree of the virtually homogenized one of the original polynomial.
- The quantity `sugar` is an important guide to determine the selection strategy of critical pairs in Groebner basis computation.

    [74] dp_ord(0)$
    [75] X=<<1,2>>+<<0,1>>$
    [76] Y=<<1,2>>+<<1,0>>$
    [77] Z=X-Y;
    (-1)*<<1,0>>+(1)*<<0,1>>
    [78] dp_sugar(T);
    3

Go to the first, previous, next, last section, table of contents.