예제 #1
0
		public void MemberMultiplyNullMatrixMatrix()
		{
			FloatMatrix a = new FloatMatrix(2, 2);
			FloatMatrix b = null;
			a.Multiply(b);
		}
예제 #2
0
		public void MemberMultiplyMatrixNonConformMatrix()
		{
			FloatMatrix a = new FloatMatrix(2);
			FloatMatrix b = new FloatMatrix(3, 2, 2.0f);
			a.Multiply(b);
		}
예제 #3
0
		public void MemberMultiplyWideMatrixLongMatrix()
		{
			FloatMatrix a = new FloatMatrix(2, 3, 1);
			FloatMatrix b = new FloatMatrix(3, 2, 2);
			a.Multiply(b);
			Assert.AreEqual(a[0, 0], 6);
			Assert.AreEqual(a[0, 1], 6);
			Assert.AreEqual(a[1, 0], 6);
			Assert.AreEqual(a[1, 1], 6);
		}
예제 #4
0
		public void MemberMultiplyMatrixMatrix()
		{
			FloatMatrix a = new FloatMatrix(2);
			a[0, 0] = 1;
			a[0, 1] = 2;
			a[1, 0] = 3;
			a[1, 1] = 4;
			FloatMatrix b = new FloatMatrix(2, 2, 2.0f);
			a.Multiply(b);
			Assert.AreEqual(a[0, 0], 6);
			Assert.AreEqual(a[0, 1], 6);
			Assert.AreEqual(a[1, 0], 14);
			Assert.AreEqual(a[1, 1], 14);
		}
예제 #5
0
		public void MemberMultiplyNullVector()
		{
			FloatMatrix a = new FloatMatrix(2);
			FloatVector b = null;
			a.Multiply(b);
		}
예제 #6
0
		public void MemberMultiplyMatrixNonConformVector()
		{
			FloatMatrix a = new FloatMatrix(2);
			FloatVector b = new FloatVector(3, 2.0f);
			a.Multiply(b);
		}
예제 #7
0
		public void MemberMultiplyVector()
		{
			FloatMatrix a = new FloatMatrix(2);
			a[0, 0] = 1;
			a[0, 1] = 2;
			a[1, 0] = 3;
			a[1, 1] = 4;
			FloatVector b = new FloatVector(2, 2.0f);
			a.Multiply(b);
			Assert.AreEqual(a[0, 0], 6);
			Assert.AreEqual(a[1, 0], 14);
			Assert.AreEqual(a.ColumnLength, 1);
			Assert.AreEqual(a.RowLength, 2);
		}
예제 #8
0
		public void MemberMultiplyFloat()
		{
			FloatMatrix a = new FloatMatrix(2);
			a[0, 0] = 1;
			a[0, 1] = 2;
			a[1, 0] = 3;
			a[1, 1] = 4;
			a.Multiply(2.0f);
			Assert.AreEqual(a[0, 0], 2);
			Assert.AreEqual(a[0, 1], 4);
			Assert.AreEqual(a[1, 0], 6);
			Assert.AreEqual(a[1, 1], 8);
		}