private static void TestGetRow()
        {
            var matrix = TriangularLower.CreateFromArray(LowerInvertible10by10.Matrix);

            for (int i = 0; i < LowerInvertible10by10.Order; ++i)
            {
                Vector rowExpected = DenseStrategies.GetRow(matrix, i);
                Vector rowComputed = matrix.GetRow(i);
                comparer.AssertEqual(rowExpected, rowComputed);
            }
        }
示例#2
0
        private static void TestGetRow()
        {
            var matrix = Matrix.CreateFromArray(RectangularFullRank10by5.Matrix);

            for (int i = 0; i < RectangularFullRank10by5.NumRows; ++i)
            {
                Vector rowExpected = DenseStrategies.GetRow(matrix, i);
                Vector rowComputed = matrix.GetRow(i);
                comparer.AssertEqual(rowExpected, rowComputed);
            }
        }
示例#3
0
        private static void TestGetRow()
        {
            var matrix = SymmetricMatrix.CreateFromArray(SymmPosDef10by10.Matrix);

            for (int i = 0; i < SymmPosDef10by10.Order; ++i)
            {
                Vector rowExpected = DenseStrategies.GetRow(matrix, i);
                Vector rowComputed = matrix.GetRow(i);
                comparer.AssertEqual(rowExpected, rowComputed);
            }
        }
        private static void TestGetRow()
        {
            var matrix = SkylineMatrix.CreateFromArrays(SparsePosDef10by10.Order,
                                                        SparsePosDef10by10.SkylineValues, SparsePosDef10by10.SkylineDiagOffsets, true, true);

            for (int i = 0; i < SparsePosDef10by10.Order; ++i)
            {
                Vector rowExpected = DenseStrategies.GetRow(matrix, i);
                Vector rowComputed = matrix.GetRow(i);
                comparer.AssertEqual(rowExpected, rowComputed);
            }
        }
        private static void TestGetRow()
        {
            var matrix = CscMatrix.CreateFromArrays(SparseRectangular10by5.NumRows, SparseRectangular10by5.NumCols,
                                                    SparseRectangular10by5.CscValues, SparseRectangular10by5.CscRowIndices, SparseRectangular10by5.CscColOffsets,
                                                    true);

            for (int i = 0; i < SparseRectangular10by5.NumRows; ++i)
            {
                Vector rowExpected = DenseStrategies.GetRow(matrix, i);
                Vector rowComputed = matrix.GetRow(i);
                comparer.AssertEqual(rowExpected, rowComputed);
            }
        }
 public Vector GetRow(int rowIndex) => DenseStrategies.GetRow(this, rowIndex);