本文整理汇总了C++中h5::group::create_group方法的典型用法代码示例。如果您正苦于以下问题:C++ group::create_group方法的具体用法?C++ group::create_group怎么用?C++ group::create_group使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类h5::group
的用法示例。
在下文中一共展示了group::create_group方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: long
// -------------- HDF5 --------------------------
/// Write into HDF5
friend void h5_write(h5::group fg, std::string subgroup_name, linear_mesh const &m) {
h5::group gr = fg.create_group(subgroup_name);
h5_write(gr, "domain", m.domain());
h5_write(gr, "min", m.xmin);
h5_write(gr, "max", m.xmax);
h5_write(gr, "size", long(m.size()));
}
示例2:
/// HDF5 interface
friend void h5_write (h5::group g, std::string const & name, mc_generic const & mc){
auto gr = g.create_group(name);
h5_write(gr,"moves", mc.AllMoves);
h5_write(gr,"measures", mc.AllMeasures);
h5_write(gr,"length_monte_carlo_cycle", mc.Length_MC_Cycle);
h5_write(gr,"number_cycle_requested", mc.NCycles);
h5_write(gr,"number_warming_cycle_requested", mc.NWarmIterations);
h5_write(gr,"number_cycle_done", mc.NC);
h5_write(gr,"number_measure_done", mc.nmeasures);
h5_write(gr,"sign", mc.sign);
h5_write(gr,"sum_sign", mc.sum_sign);
}
示例3: sha
std::c14::enable_if_t<is_amv_value_or_view_class<ArrayType>::value && !has_scalar_or_string_value_type<ArrayType>::value>
h5_write(h5::group gr, std::string name, ArrayType const& a) {
if (a.is_empty()) TRIQS_RUNTIME_ERROR << " Cannot save an empty array into hdf5";
auto gr2 = gr.create_group(name);
gr2.write_triqs_hdf5_data_scheme(a);
// save the shape
array<int, 1> sha(ArrayType::rank);
for (int u = 0; u < ArrayType::rank; ++u) sha(u) = a.shape()[u];
h5_write(gr2, "shape", sha);
#ifndef __cpp_generic_lambdas
foreach(a, h5_impl::_save_lambda<ArrayType>{a, gr2});
#else
foreach(a, [&](auto... is) { h5_write(gr2, h5_impl::_h5_name(is...), a(is...)); });
#endif
}
示例4:
// HDF5 interface
friend void h5_write (h5::group g, std::string const & name, measure_set const & ms) {
auto gr = g.create_group(name);
for (auto & p : ms.m_map) h5_write(gr,p.first, p.second);
}
示例5:
/**
@param fg Parent HDF5 group to write the space to
@param name Name of the HDF5 subgroup to be created
@param hs Hilbert subspace to be written
*/
friend void h5_write(h5::group fg, std::string const &name, sub_hilbert_space const &hs) {
auto gr = fg.create_group(name);
h5_write(gr, "index", hs.index);
h5_write(gr, "fock_states", hs.fock_states);
}
示例6:
/// Write into HDF5
friend void h5_write(h5::group fg, std::string subgroup_name, discrete_mesh const &m) {
h5::group gr = fg.create_group(subgroup_name);
h5_write(gr, "domain", m.domain());
}
示例7:
/// Write into HDF5
friend void h5_write(h5::group fg, std::string subgroup_name, matsubara_domain const &d) {
h5::group gr = fg.create_group(subgroup_name);
h5_write(gr, "beta", d.beta);
h5_write(gr, "statistic", (d.statistic == Fermion ? "F" : "B"));
}
示例8:
/// Write into HDF5
friend void h5_write(h5::group fg, std::string subgroup_name, gf_mesh const& m) {
h5::group gr = fg.create_group(subgroup_name);
h5_write(gr, "dims", m.dims.to_vector());
}
示例9:
friend void h5_write(h5::group fg, std::string subgroup_name, tail_impl const &t) {
auto gr = fg.create_group(subgroup_name);
h5_write(gr, "omin", t.omin);
h5_write(gr, "mask", t._mask);
h5_write(gr, "data", t._data);
}
示例10:
/// Write into HDF5
void h5_write(h5::group fg, std::string subgroup_name, bravais_lattice const& bl) {
h5::group gr = fg.create_group(subgroup_name);
h5_write(gr, "units", bl.units_); // NOT COMPLETE
}
示例11:
/// Write into HDF5
friend void h5_write(h5::group fg, std::string subgroup_name, gf_mesh const &m) {
h5::group gr = fg.create_group(subgroup_name);
auto l = [gr](int N, auto const &m) { h5_write(gr, "MeshComponent" + std::to_string(N), m); };
triqs::tuple::for_each_enumerate(m.components(), l);
}
示例12: long
/// Write into HDF5
friend void h5_write(h5::group fg, std::string subgroup_name, gf_mesh const &m) {
h5::group gr = fg.create_group(subgroup_name);
h5_write(gr, "domain", m.domain());
h5_write(gr, "size", long(m.size()));
h5_write(gr, "positive_freq_only", (m._positive_only?1:0));
}