23 CPPADCG_ASSERT_UNKNOWN(x2y.size() > 0)
25 size_t maxCount = std::min<size_t>(std::max<size_t>(3ul, x2y.size() / 4), 8ul);
26 std::map<size_t, IndexPattern*> linearSections = SectionedIndexPattern::detectLinearSections(x2y, maxCount);
28 if (linearSections.size() == 1) {
29 return linearSections.begin()->second;
30 }
else if (!linearSections.empty()) {
39 CPPADCG_ASSERT_UNKNOWN(!x2y.empty())
41 size_t maxCount = std::min<size_t>(std::max<size_t>(3ul, x2y.size() / 4), 8ul);
42 std::map<size_t, IndexPattern*> linearSections = SectionedIndexPattern::detectLinearSections(x2y, maxCount);
44 if (linearSections.size() == 1) {
45 return linearSections.begin()->second;
46 }
else if (!linearSections.empty()) {