代码拉取完成,页面将自动刷新
/*
* Copyright 2010 INRIA Saclay
*
* Use of this software is governed by the MIT license
*
* Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
* Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
* 91893 Orsay, France
*/
/* Compute the maximal value attained by the piecewise quasipolynomial
* on its domain or zero if the domain is empty.
* In the worst case, the domain is scanned completely,
* so the domain is assumed to be bounded.
*/
__isl_give isl_val *FN(PW,opt)(__isl_take PW *pw, int max)
{
int i;
isl_val *opt;
if (!pw)
return NULL;
if (pw->n == 0) {
opt = isl_val_zero(FN(PW,get_ctx)(pw));
FN(PW,free)(pw);
return opt;
}
opt = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[0].FIELD),
isl_set_copy(pw->p[0].set), max);
for (i = 1; i < pw->n; ++i) {
isl_val *opt_i;
opt_i = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[i].FIELD),
isl_set_copy(pw->p[i].set), max);
if (max)
opt = isl_val_max(opt, opt_i);
else
opt = isl_val_min(opt, opt_i);
}
FN(PW,free)(pw);
return opt;
}
__isl_give isl_val *FN(PW,max)(__isl_take PW *pw)
{
return FN(PW,opt)(pw, 1);
}
__isl_give isl_val *FN(PW,min)(__isl_take PW *pw)
{
return FN(PW,opt)(pw, 0);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。