public void MemberMultiplyNullMatrixMatrix() { FloatMatrix a = new FloatMatrix(2, 2); FloatMatrix b = null; a.Multiply(b); }
public void MemberMultiplyMatrixNonConformMatrix() { FloatMatrix a = new FloatMatrix(2); FloatMatrix b = new FloatMatrix(3, 2, 2.0f); a.Multiply(b); }
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); }
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); }
public void MemberMultiplyNullVector() { FloatMatrix a = new FloatMatrix(2); FloatVector b = null; a.Multiply(b); }
public void MemberMultiplyMatrixNonConformVector() { FloatMatrix a = new FloatMatrix(2); FloatVector b = new FloatVector(3, 2.0f); a.Multiply(b); }
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); }
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); }