当前位置: 首页>>代码示例>>C++>>正文


C++ group::create_group方法代码示例

本文整理汇总了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()));
 }
开发者ID:MHarland,项目名称:triqs,代码行数:9,代码来源:linear.hpp

示例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);
 }
开发者ID:cyrilmartins,项目名称:triqs,代码行数:13,代码来源:mc_generic.hpp

示例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
 }
开发者ID:JaksaVucicevic,项目名称:triqs,代码行数:15,代码来源:array_of_non_basic.hpp

示例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);
 }
开发者ID:JaksaVucicevic,项目名称:triqs,代码行数:5,代码来源:mc_measure_set.hpp

示例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);
      }
开发者ID:TRIQS,项目名称:triqs,代码行数:10,代码来源:hilbert_space.hpp

示例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());
 }
开发者ID:MHarland,项目名称:triqs,代码行数:5,代码来源:discrete.hpp

示例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"));
 }
开发者ID:dreamfrog,项目名称:triqs,代码行数:6,代码来源:matsubara.hpp

示例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());
 }
开发者ID:cyrilmartins,项目名称:triqs,代码行数:5,代码来源:cyclic_lattice.hpp

示例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);
 }
开发者ID:dhruvparamhans,项目名称:triqs,代码行数:6,代码来源:tail.hpp

示例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
 }
开发者ID:cyrilmartins,项目名称:triqs,代码行数:5,代码来源:bravais_lattice_and_brillouin_zone.cpp

示例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);
 }
开发者ID:JaksaVucicevic,项目名称:triqs,代码行数:6,代码来源:product.hpp

示例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));
 }
开发者ID:cyrilmartins,项目名称:triqs,代码行数:7,代码来源:matsubara_freq.hpp


注:本文中的h5::group::create_group方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。