Lines Matching refs:v1
51 vector <int> v1(numbers, numbers+10); in nthelem1() local
52 nth_element(v1.begin(), v1.begin() + v1.size() / 2, v1.end()); in nthelem1()
54 CPPUNIT_ASSERT(v1[0]==1); in nthelem1()
55 CPPUNIT_ASSERT(v1[1]==1); in nthelem1()
56 CPPUNIT_ASSERT(v1[2]==4); in nthelem1()
57 CPPUNIT_ASSERT(v1[3]==2); in nthelem1()
58 CPPUNIT_ASSERT(v1[4]==5); in nthelem1()
59 CPPUNIT_ASSERT(v1[5]==5); in nthelem1()
60 CPPUNIT_ASSERT(v1[6]==6); in nthelem1()
61 CPPUNIT_ASSERT(v1[7]==7); in nthelem1()
62 CPPUNIT_ASSERT(v1[8]==8); in nthelem1()
63 CPPUNIT_ASSERT(v1[9]==6); in nthelem1()
71 vector <int> v1(numbers, numbers+10); in nthelem2() local
72 nth_element(v1.begin(), v1.begin() + v1.size() / 2, v1.end(), greater<int>()); in nthelem2()
74 CPPUNIT_ASSERT(v1[0]==6); in nthelem2()
75 CPPUNIT_ASSERT(v1[1]==7); in nthelem2()
76 CPPUNIT_ASSERT(v1[2]==4); in nthelem2()
77 CPPUNIT_ASSERT(v1[3]==4); in nthelem2()
78 CPPUNIT_ASSERT(v1[4]==5); in nthelem2()
79 CPPUNIT_ASSERT(v1[5]==4); in nthelem2()
80 CPPUNIT_ASSERT(v1[6]==3); in nthelem2()
81 CPPUNIT_ASSERT(v1[7]==2); in nthelem2()
82 CPPUNIT_ASSERT(v1[8]==1); in nthelem2()
83 CPPUNIT_ASSERT(v1[9]==1); in nthelem2()