예제 #1
0
 def test_from_stdvector_double(self):
     tmp = gpstk.vector_double(5)
     tmp[0] = 1.23
     tmp[1] = 2.34
     tmp[2] = 3.45
     tmp[3] = 4.56
     tmp[4] = 5.67
     v = gpstk.vector(tmp)
     self.assertAlmostEqual(1.23, v[0])
     self.assertAlmostEqual(2.34, v[1])
     self.assertAlmostEqual(3.45, v[2])
     self.assertAlmostEqual(4.56, v[3])
     self.assertAlmostEqual(5.67, v[4])
예제 #2
0
 def test_from_stdvector_double(self):
     tmp = gpstk.vector_double(5)
     tmp[0] = 1.23
     tmp[1] = 2.34
     tmp[2] = 3.45
     tmp[3] = 4.56
     tmp[4] = 5.67
     v = gpstk.vector(tmp)
     self.assertAlmostEqual(1.23, v[0])
     self.assertAlmostEqual(2.34, v[1])
     self.assertAlmostEqual(3.45, v[2])
     self.assertAlmostEqual(4.56, v[3])
     self.assertAlmostEqual(5.67, v[4])
예제 #3
0
 def test_vector(self):
     v = gpstk.vector_int()
     v.push_back(5)
     v.push_back(3)
     v.push_back(10)
     self.assertEqual(5, v[0])
     self.assertEqual(3, v[1])
     self.assertEqual(10, v[2])
     v = gpstk.vector_double()
     v.push_back(1.5)
     v.push_back(2.5)
     self.assertEqual(1.5, v[0])
     self.assertEqual(2.5, v[1])
     self.assertEqual(2, len(v))
예제 #4
0
파일: test_misc.py 프로젝트: rwpenney/GPSTk
 def test_vector(self):
     v = gpstk.vector_int()
     v.push_back(5)
     v.push_back(3)
     v.push_back(10)
     self.assertEqual(5, v[0])
     self.assertEqual(3, v[1])
     self.assertEqual(10, v[2])
     v = gpstk.vector_double()
     v.push_back(1.5)
     v.push_back(2.5)
     self.assertEqual(1.5, v[0])
     self.assertEqual(2.5, v[1])
     self.assertEqual(2, len(v))