mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 09:00:37 +08:00
Change storage in BlockRandomAccessSparseMatrix
- TripletSparseMatrix in BlockRandomAccessSparseMatrix is replaced with BlockSparseMatrix - BlockSparseMatrix::ToCompressedRowSparseMatrix is performed in a direct sort-less way Change-Id: Ib951fda1b9394050e2c47a9721172c5e3c674801
This commit is contained in:
@@ -91,12 +91,11 @@ TEST(BlockRandomAccessSparseMatrix, GetCell) {
|
||||
Matrix::Ones(blocks[row_block_id].size, blocks[col_block_id].size);
|
||||
}
|
||||
|
||||
const TripletSparseMatrix* tsm = m.matrix();
|
||||
EXPECT_EQ(tsm->num_nonzeros(), num_nonzeros);
|
||||
EXPECT_EQ(tsm->max_num_nonzeros(), num_nonzeros);
|
||||
const BlockSparseMatrix* bsm = m.matrix();
|
||||
EXPECT_EQ(bsm->num_nonzeros(), num_nonzeros);
|
||||
|
||||
Matrix dense;
|
||||
tsm->ToDenseMatrix(&dense);
|
||||
bsm->ToDenseMatrix(&dense);
|
||||
|
||||
double kTolerance = 1e-14;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user