Skip to content

Commit

Permalink
Updates to match the latest tatami changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed May 14, 2024
1 parent 07fa357 commit cd6c1a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions include/tatami_chunked/CustomDenseChunkedMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,11 @@ class CustomDenseChunkedMatrix : public tatami::Matrix<Value_, Index_> {
return static_cast<double>(coordinator.prefer_rows_internal());
}

bool sparse() const {
bool is_sparse() const {
return false;
}

double sparse_proportion() const {
double is_sparse_proportion() const {
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions include/tatami_chunked/CustomSparseChunkedMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,11 @@ class CustomSparseChunkedMatrix : public tatami::Matrix<Value_, Index_> {
return static_cast<double>(coordinator.prefer_rows_internal());
}

bool sparse() const {
bool is_sparse() const {
return true;
}

double sparse_proportion() const {
double is_sparse_proportion() const {
return 1;
}

Expand Down
6 changes: 3 additions & 3 deletions tests/src/mock_sparse_chunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MockSimpleSparseChunkUtils {
auto full = tatami_test::simulate_sparse_vector<double>(dim.first * dim.second, 0.2, -10, 10, /* seed = */ dim.first * dim.second);
tatami::DenseRowMatrix<double, int> tmp(dim.first, dim.second, std::move(full));

auto compressed = tatami::retrieve_compressed_sparse_contents<true, double, int>(&tmp, true);
auto compressed = tatami::retrieve_compressed_sparse_contents<double, int>(&tmp, true, true);
mock = tatami_chunked::MockSimpleSparseChunk(
dim.first,
dim.second,
Expand All @@ -57,7 +57,7 @@ class MockSimpleSparseChunkUtils {

ref.reset(new tatami::CompressedSparseRowMatrix<double, int>(dim.first, dim.second, std::move(compressed.value), std::move(compressed.index), std::move(compressed.pointers)));

auto compressed2 = tatami::retrieve_compressed_sparse_contents<false, double, int>(ref.get(), true);
auto compressed2 = tatami::retrieve_compressed_sparse_contents<double, int>(ref.get(), false, true);
dcm_chunk = tatami_chunked::SimpleSparseChunkWrapper<MockSparseBlob<false> >(MockSparseBlob<false>(
dim.first,
dim.second,
Expand Down Expand Up @@ -484,7 +484,7 @@ class MockSubsettedSparseChunkUtils {
auto full = tatami_test::simulate_sparse_vector<double>(dim.first * dim.second, 0.2, -10, 10, /* seed = */ dim.first * dim.second + 1);
tatami::DenseRowMatrix<double, int> tmp(dim.first, dim.second, std::move(full));

auto compressed = tatami::retrieve_compressed_sparse_contents<true, double, int>(&tmp, true);
auto compressed = tatami::retrieve_compressed_sparse_contents<double, int>(&tmp, true, true);
mock = tatami_chunked::MockSubsettedSparseChunk(
dim.first,
dim.second,
Expand Down

0 comments on commit cd6c1a6

Please sign in to comment.