TRIQS/nda
2.0.0
Multi-dimensional array library for C++
Toggle main menu visibility
Loading...
Searching...
No Matches
doc_h5_overview.cpp
1
#include <
nda/h5.hpp
>
2
#include <
nda/nda.hpp
>
3
#include <h5/h5.hpp>
4
5
int
main() {
6
// create a 4x2 array with random values
7
auto
A =
nda::rand
(4, 2);
8
9
// write the array to an HDF5 file
10
h5::file file(
"A.h5"
,
'w'
);
11
h5::write(file,
"A"
, A);
12
}
nda::rand
auto rand(std::array< Int, Rank > const &shape)
Make an array of the given shape and initialize it with random values from the uniform distribution o...
Definition
basic_functions.hpp:154
h5.hpp
Provides HDF5 support for the nda library.
nda.hpp
Includes all relevant headers for the core nda library.
doc
examples
doc_h5_overview.cpp
Generated by
1.17.0