|
template<typename Graph > |
std::pair< std::shared_ptr< HDFDataset >, std::shared_ptr< HDFDataset > > | setup_graph_containers (const Graph &g, const std::shared_ptr< HDFGroup > &grp) |
|
template<typename First , typename Second , typename... Tail> |
constexpr std::tuple< Tail... > | tuple_tail (const std::tuple< First, Second, Tail... > &t) |
| Builds new tuple containing all elements but the first two. More...
|
|
template<typename CoordT > |
auto | coords_container () |
|
template<EntityKind entity_kind, typename Graph , typename NWGroup , typename ItPair > |
auto | generate_write_function (const Graph &g, NWGroup &&nw_grp, std::string label, ItPair &&it_pair, std::size_t num_entities) |
|
template<EntityKind entity_kind, typename Graph , typename NWGroup , typename ItPair >
auto Utopia::DataIO::GraphUtilsHelper::generate_write_function |
( |
const Graph & |
g, |
|
|
NWGroup && |
nw_grp, |
|
|
std::string |
label, |
|
|
ItPair && |
it_pair, |
|
|
std::size_t |
num_entities |
|
) |
| |
This function generates a write function for graph entity properties.
The generated lambda function can then be called on each write specification in the adaptor tuple. It writes the specified data to a new dataset and adds attributes, fire-and-forget. Depending on the shape of the write specifications 1d or 2d datasets are written, see Utopia::DataIO::save_graph_entity_properties for more detail. Only relying on the given iterator pair, this function allows to handle vertex and edge iterations equivalently.
- Template Parameters
-
EntityKind | The kind of entity to get the data from. This can be either vertices or edges. |
Graph | |
NWGroup | |
ItPair | |
- Parameters
-
g | The graph from which to save vertex or edge properties. |
nw_grp | The HDFGroup the data should be written to. |
label | The name of the dataset to which the adaptors write data. |
it_pair | The iterator pair used to access the desired entities. |
num_entities | The number of entities of kind 'EntityKind' in graph g. |
- Returns
- auto The generated write function