public void ZeroLengthVectorTestsforConstructor1()
 {
   ComplexFloatVector cfv = new ComplexFloatVector(1);
   cfv.RemoveAt(0);
   ComplexFloatLevinson cfl = new ComplexFloatLevinson(cfv, cfv);
 }
 public void ZeroVectorLengthTestforStaticInverse()
 {
   ComplexFloatVector LC = new ComplexFloatVector(1);
   LC.RemoveAt(0);
   ComplexFloatMatrix X = ComplexFloatLevinson.Inverse(LC, LC);
 }
 public void ZeroVectorLengthTestforStaticSolveMatrix()
 {
   ComplexFloatVector LC = new ComplexFloatVector(1);
   LC.RemoveAt(0);
   ComplexFloatMatrix X = ComplexFloatLevinson.Solve(LC, TR10, ComplexFloatMatrix.CreateIdentity(10));
 }
 public void ZeroVectorLengthTestforStaticSolveVector()
 {
   ComplexFloatVector LC = new ComplexFloatVector(1);
   LC.RemoveAt(0);
   ComplexFloatVector X = ComplexFloatLevinson.Solve(LC, TR10, Y10);
 }
Exemplo n.º 5
0
		public void IList()
		{
			ComplexFloatVector a = new ComplexFloatVector(new ComplexFloat[4] { 0, 1, 2, 3 });

			Assert.AreEqual(a.IsFixedSize, false);
			Assert.AreEqual(a.IsReadOnly, false);

			a.Add((ComplexFloat)4.0);
			Assert.AreEqual(a.Length, 5);
			Assert.AreEqual(a[4], (ComplexFloat)4);
			Assert.AreEqual(a.Contains((ComplexFloat)4.0), true);

			a.Insert(1, (ComplexFloat)5.0);
			Assert.AreEqual(a.Length, 6);
			Assert.AreEqual(a.Contains((ComplexFloat)5.0), true);
			Assert.AreEqual(a[0], (ComplexFloat)0);
			Assert.AreEqual(a[1], (ComplexFloat)5);
			Assert.AreEqual(a[2], (ComplexFloat)1);
			Assert.AreEqual(a[3], (ComplexFloat)2);
			Assert.AreEqual(a[4], (ComplexFloat)3);
			Assert.AreEqual(a[5], (ComplexFloat)4);

			a.Remove((ComplexFloat)5.0);
			Assert.AreEqual(a.Length, 5);
			Assert.AreEqual(a.Contains((ComplexFloat)5.0), false);
			Assert.AreEqual(a[0], (ComplexFloat)0);
			Assert.AreEqual(a[1], (ComplexFloat)1);
			Assert.AreEqual(a[2], (ComplexFloat)2);
			Assert.AreEqual(a[3], (ComplexFloat)3);
			Assert.AreEqual(a[4], (ComplexFloat)4);

			a.RemoveAt(2);
			Assert.AreEqual(a.Length, 4);
			Assert.AreEqual(a.Contains((ComplexFloat)2.0), false);
			Assert.AreEqual(a[0], (ComplexFloat)0);
			Assert.AreEqual(a[1], (ComplexFloat)1);
			Assert.AreEqual(a[2], (ComplexFloat)3);
			Assert.AreEqual(a[3], (ComplexFloat)4);
		}
 public void ZeroLengthVectorTestsforConstructor1()
 {
   ComplexFloatVector cdv = new ComplexFloatVector(1, 0.0f);
   cdv.RemoveAt(0);
   ComplexFloatSymmetricLevinson cdsl = new ComplexFloatSymmetricLevinson(cdv);
 }