17 const std::string
FILE_NAME(
"create_extensible_dataset_example.h5");
40 double t1[3][1] = {{2.0}, {2.0}, {4.0}};
41 dataset.
select({0, 0}, {3, 1}).write(t1);
47 double t2[1][3] = {{4.0, 8.0, 6.0}};
48 dataset.
select({3, 3}, {1, 3}).write(t2);
51 std::vector<std::vector<double>> result;
59 for (
auto row : result) {
61 std::cout <<
" " << col;
62 std::cout << std::endl;
67 std::cerr << err.
what() << std::endl;
void read(T &array) const
void add(const Property &property)
void resize(const std::vector< size_t > &dims)
Change the size of the dataset.
const std::string DATASET_NAME("dset")
static const int ReadWrite
Open flag: Read Write access.
static const int Truncate
Open flag: Truncate a file if already existing.
const std::string FILE_NAME("create_extensible_dataset_example.h5")
create an HDF5 DataType from a C++ type
static const size_t UNLIMITED
const char * what() const override
get the current exception error message
Selection select(const std::vector< size_t > &offset, const std::vector< size_t > &count, const std::vector< size_t > &stride=std::vector< size_t >()) const
Basic HighFive Exception class.
DataSet createDataSet(const std::string &dataset_name, const DataSpace &space, const DataType &type, const DataSetCreateProps &createProps=DataSetCreateProps(), const DataSetAccessProps &accessProps=DataSetAccessProps())
createDataSet Create a new dataset in the current file of datatype type and of size space ...
static const int Create
Open flag: Create non existing file.