using System; using System.Collections.Generic; using System.Linq; using System.Text; using Azimuth.DenseLinearAlgebra; namespace Azimuth.UnitTests.DenseLinearAlgebra { public class MatrixTransposeTests : UnitTestSharp.TestFixture { public void Basic() { var original = new RectangularMatrix( new Scalar[,] { { 1, 2, 3, }, { 4, 5, 6, } }); var transpose = original.Transpose(); CheckEqual(1, transpose[0, 0]); CheckEqual(2, transpose[1, 0]); CheckEqual(3, transpose[2, 0]); CheckEqual(4, transpose[0, 1]); CheckEqual(5, transpose[1, 1]); CheckEqual(6, transpose[2, 1]); CheckEqual(2, transpose.ColumnCount); CheckEqual(3, transpose.RowCount); } } }