public void upper_major_not_nulls_multiple_3dim()//получится полноразмерная { //arrange List <double> list1 = new List <double>() { 1, 2, 3, 4, 5, 6 }; List <double> list2 = new List <double>() { 65, 34, 87, 12, 90, 54 }; int dim = 3; string orientation = "up_major"; double common_elt = 7; List <double> expected = new List <double>() { 100, 79, 429, 518, 321, 1239, 546, 364, 1563 }; //act Sparse_Matrix sparse = new Sparse_Matrix(); List <double> actual = sparse.triangular_matrix__any_diagonal_not_nulls_multiplication(list1, list2, dim, common_elt, orientation); //assert CollectionAssert.AreEqual(expected, actual); }
public void low_secondary_not_nulls_multiple_3dim()//получится полноразмерная { //arrange List <double> list1 = new List <double>() { 1, 2, 3, 4, 5, 6 }; List <double> list2 = new List <double>() { 56, 89, 90, 100, 654, 9 }; int dim = 3; string orientation = "low_secondary"; double common_elt = 7; List <double> expected = new List <double>() { 198, 1326, 1031, 363, 2189, 599, 663, 4397, 728 }; //act Sparse_Matrix sparse = new Sparse_Matrix(); List <double> actual = sparse.triangular_matrix__any_diagonal_not_nulls_multiplication(list1, list2, dim, common_elt, orientation); //assert CollectionAssert.AreEqual(expected, actual); }
public void lower_major_not_nulls_multiple_3dim()//получится полноразмерная { //arrange List <double> list1 = new List <double>() { 1, 2, 3, 4, 5, 6 }; List <double> list2 = new List <double>() { 65, 34, 87, 12, 90, 54 }; int dim = 3; string orientation = "low_major"; double common_elt = 7; List <double> expected = new List <double>() { 387, 1246, 434, 316, 905, 413, 502, 1003, 387 }; //act Sparse_Matrix sparse = new Sparse_Matrix(); List <double> actual = sparse.triangular_matrix__any_diagonal_not_nulls_multiplication(list1, list2, dim, common_elt, orientation); //assert CollectionAssert.AreEqual(expected, actual); }
public void up_secondary_not_nulls_multiple_3dim() { //arrange List <double> list1 = new List <double>() { 1, 2, 3, 4, 5, 6 }; List <double> list2 = new List <double>() { 234, 234, 453, 426, 453, 4 }; int dim = 3; string orientation = "up_secondary"; double common_elt = 7; List <double> expected = new List <double>() { 1098, 1161, 488, 3094, 3250, 1896, 4414, 4624, 2816 }; //act Sparse_Matrix sparse = new Sparse_Matrix(); List <double> actual = sparse.triangular_matrix__any_diagonal_not_nulls_multiplication(list1, list2, dim, common_elt, orientation); //assert CollectionAssert.AreEqual(expected, actual); }
public void low_secondary_not_nulls_multiple() { //arrange List <double> list1 = new List <double>(); list1.Add(7); List <double> list2 = new List <double>(); list2.Add(7); int dim = 1; string orientation = "low_secondary"; double common_elt = 9.9; double expected = 49; //act Sparse_Matrix sparse = new Sparse_Matrix(); double actual = (sparse.triangular_matrix__any_diagonal_not_nulls_multiplication(list1, list2, dim, common_elt, orientation)).First(); //asssert Assert.AreEqual(expected, actual); }