38std::shared_ptr<tatami::Matrix<Value_, Index_> >
load_dense_matrix(
const std::string& file,
const std::string& name,
bool transpose) {
39 H5::H5File fhandle(file, H5F_ACC_RDONLY);
40 auto dhandle = open_and_check_dataset<false>(fhandle, name);
42 auto dims = get_array_dimensions<2>(dhandle, name);
43 ValueStorage_ values(
static_cast<size_t>(dims[0]) *
static_cast<size_t>(dims[1]));
47 return std::make_shared<tatami::DenseMatrix<Value_, Index_, ValueStorage_> >(dims[1], dims[0], std::move(values),
false);
49 return std::make_shared<tatami::DenseMatrix<Value_, Index_, ValueStorage_> >(dims[0], dims[1], std::move(values),
true);
std::shared_ptr< tatami::Matrix< Value_, Index_ > > load_dense_matrix(const std::string &file, const std::string &name, bool transpose)
Definition load_dense_matrix.hpp:38