本文整理汇总了C++中Func::maxModulo方法的典型用法代码示例。如果您正苦于以下问题:C++ Func::maxModulo方法的具体用法?C++ Func::maxModulo怎么用?C++ Func::maxModulo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Func
的用法示例。
在下文中一共展示了Func::maxModulo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: stepRectangle
double Integration::stepRectangle(double eps) const
{
Derivator* derivator = new Derivator(f);
Func g = derivator->derive();
double max = g.maxModulo(ab);
delete derivator;
return (2*eps / (max*(ab.end() - ab.begin())));
}
示例2: stepSimpson
double Integration::stepSimpson(double eps) const
{
Derivator* derivator = new Derivator(f);
Func g = derivator->derive(4);
double max = g.maxModulo(ab);
delete derivator;
return pow(180*eps / (max*(ab.end() - ab.begin())), 0.25);
}
示例3: stepTrapezoid
double Integration::stepTrapezoid(double eps) const
{
Derivator* derivator = new Derivator(f);
Func g = derivator->derive(2);
double max = g.maxModulo(ab);
delete derivator;
return sqrt(12*eps / (max*(ab.end() - ab.begin())));
}
示例4: errorSimpson
double Integration::errorSimpson() const
{
Derivator* derivator = new Derivator(f);
Func g = derivator->derive(4);
double max = g.maxModulo(ab);
double h = (ab.end() - ab.begin()) / 4;
delete derivator;
return (max * pow(h, 4) * (ab.end() - ab.begin())) / 180;
}
示例5: errorRectangle
double Integration::errorRectangle() const
{
Derivator* derivator = new Derivator(f);
Func g = derivator->derive();
double max = g.maxModulo(ab);
double h = (ab.end() - ab.begin()) / 4;
delete derivator;
return (max * h * (ab.end() - ab.begin())) / 2;
}