public void MX3x3Text() { var list = new List <List <int> >() { new List <int>() { 3, 2, 5 }, new List <int>() { 24, 1, 3 }, new List <int>() { 4, 5, 2 } }; var expected = new List <List <int> >() { new List <int>() { 1, 3 }, new List <int>() { 5, 2 } }; var res = CutMatrixBuilder.Build(list, 2, 3, 2, 3); Assert.IsTrue(TwoDimensionalListsComparator.Compare(res, expected)); }
public void MX3x3Test() { var mx1 = new List <List <int> >() { new List <int>() { 3, 2, 5 }, new List <int>() { 24, 1, 3 }, new List <int>() { 4, 5, 2 } }; var mx2 = new List <List <int> >() { new List <int>() { 1, 2, 3 }, new List <int>() { 4, 10, 2 }, new List <int>() { 2, 1, 4 } }; var expected = new List <List <int> >() { new List <int>() { 21, 31, 33 }, new List <int>() { 34, 61, 86 }, new List <int>() { 28, 60, 30 } }; var res = MatrixOperations.MultiplyMatrices(mx1, mx2); Assert.IsTrue(TwoDimensionalListsComparator.Compare(res, expected)); }
public void MX3x3Test(string data) { var listToCompare = new List <List <int> >() { new List <int>() { 3, 2, 5 }, new List <int>() { 24, 1, 3 }, new List <int>() { 4, 5, 2 } }; var res = MatrixStringParser.Parse(data); Assert.IsTrue(TwoDimensionalListsComparator.Compare(res, listToCompare)); }