Definition at line 274 of file relem.cpp.
277{
278 const PolynomialRing *P =
R->cast_to_PolynomialRing();
279 if (P == nullptr)
280 {
281 ERROR(
"expected polynomial ring");
282 return nullptr;
283 }
284 if (v < 0 || v >= P->
n_vars())
285 {
286 ERROR(
"homogenization: improper ring variable");
287 return nullptr;
288 }
289 if (wts.size() == 0 || wts.size() !=
static_cast<unsigned int>(P->
n_vars()))
290 {
291 ERROR(
"homogenization: improper weight function");
292 return nullptr;
293 }
294 if (wts[v] == 0)
295 {
296 ERROR(
"homogenization: variable weight is zero");
297 return nullptr;
298 }
299
301 if (
error())
return nullptr;
303}
virtual ring_elem homogenize(const ring_elem f, int v, int deg, const std::vector< int > &wts) const =0
RingElement(const Ring *R, ring_elem f)
VALGRIND_MAKE_MEM_DEFINED & result(result)
References ERROR, error(), PolynomialRing::homogenize(), PolynomialRing::n_vars(), R, result(), RingElement(), and val.