41std::shared_ptr<tatami::Matrix<Value_, Index_> >
load_dense_matrix(
const std::string& file,
const std::string& name,
bool transpose) {
42 H5::H5File fhandle(file, H5F_ACC_RDONLY);
43 auto dhandle = open_and_check_dataset<false>(fhandle, name);
45 auto dims = get_array_dimensions<2>(dhandle, name);
46 ValueStorage_ values(sanisizer::product<
decltype(std::declval<ValueStorage_>().size())>(dims[0], dims[1]));
50 return std::make_shared<tatami::DenseMatrix<Value_, Index_, ValueStorage_> >(dims[1], dims[0], std::move(values),
false);
52 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:41