10 f.CreateGroup(
"/NewGroup");
13 f[
"/NewGroup"].attrs[
"Some Metadata"] =
"Created with MUQ!";
16 f[
"/NewGroup/Ones"] = Eigen::VectorXd::Ones(10);
19 auto g = f[
"/NewGroup"];
20 Eigen::VectorXd ones = g[
"/Ones"];
21 std::cout <<
"\nThe content of /NewGroup/Ones is: \n" << ones.transpose() << std::endl;
24 f[
"/NewGroup/Ones"].attrs[
"Meta2"] = Eigen::VectorXd::Random(2).eval();
27 f[
"/AnotherGroup/Zeros"] = Eigen::MatrixXd::Zero(5,5);
30 std::cout <<
"\nThe content of /AnotherGroup/Zeros is:\n" << f[
"/AnotherGroup/Zeros"].eval() << std::endl;
H5Object OpenFile(std::string const &filename)
Open an HDF5 file and return the root object.