本文整理汇总了C++中Pair::end方法的典型用法代码示例。如果您正苦于以下问题:C++ Pair::end方法的具体用法?C++ Pair::end怎么用?C++ Pair::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pair
的用法示例。
在下文中一共展示了Pair::end方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
Counter myCounter;
Pair initialSegment = myCounter.returnInitialSegment();
printf("Topic: \"Numerical methods of resolution of the nonlinear algebraical and transcendental equations\"\n");
qDebug() << "Initial data: Segment from" << initialSegment.start() << "to" << initialSegment.end()<<
"; our function is " << myCounter.returnFunctionView()<< "; err is " << myCounter.returnErr();
QList<QList<Result> > results = myCounter.seeResult();
QList<Pair> segments = myCounter.seeSegments();
int countOfRoots = segments.count();
for (int j = 0; j < 5; j++) {
printf("\n");
switch (j) {
case 0:
printf("Bijection method\n");
break;
case 1:
printf("Newton method\n");
break;
case 2:
printf("Modified Newton method\n");
break;
case 3:
printf("Chord method");
break;
case 4:
printf("Simple iteration method\n");
break;
default:
break;
}
QList<Result> curRes = results.takeFirst();
for (int i = 0; i < countOfRoots; i++) {
Pair curSegment = segments.at(i);
qDebug() << "Start segment is" << curSegment.start() << curSegment.end();
qDebug() << "Count of steps:" << curRes[i].countOfSteps;
qDebug() << "Approximate solution:" << curRes[i].root;
qDebug() << "Value of discrepancy:" << curRes[i].errInFunction;
}
}
return a.exec();
}