[top][index]
search for:

RingElement _ ZZ

Synopsis:

  • Usage: g = f_d
  • Operator: _
  • Input:
  • f, an instance of class RingElement: a polynomial
  • d, an instance of class ZZ.
  • Output:
  • g, an instance of class RingElement: the sum of those terms of f whose total degree is d.
  • See also:

  • RingElement _ {...}
  • Code:

         -- ../../../Macaulay2/m2/enginering.m2:208-212
         RingElement _ ZZ := RingElement => (f,d) -> (
              u := select(terms f, t -> d === sum degree t);
              if #u === 0 then 0_(ring f)
              else sum u
              )

    [top][index]
    search for: