andres::graph
Classes | Enumerations | Functions
andres::graph::hdf5 Namespace Reference

Classes

struct  GraphTraitsHDF5< CompleteGraph< VISITOR > >
struct  GraphTraitsHDF5< Digraph< VISITOR > >
struct  GraphTraitsHDF5< Graph< VISITOR > >
struct  GraphTraitsHDF5< GridGraph< D, VISITOR > >

Enumerations

enum  FileAccessMode
enum  HDF5Version

Functions

template<class VISITOR >
void save (const hid_t, const std::string &, const CompleteGraph< VISITOR > &graph)
template<class VISITOR >
void load (const hid_t, const std::string &, CompleteGraph< VISITOR > &graph)
template<class VISITOR >
void save (const hid_t, const std::string &, const Digraph< VISITOR > &)
template<class VISITOR >
void load (const hid_t, const std::string &, Digraph< VISITOR > &)
template<class VISITOR >
void save (const hid_t, const std::string &, const Graph< VISITOR > &)
template<class VISITOR >
void load (const hid_t, const std::string &, Graph< VISITOR > &)
template<unsigned char D, class VISITOR >
void save (const hid_t, const std::string &, const GridGraph< D, VISITOR > &)
template<unsigned char D, class VISITOR >
void load (const hid_t, const std::string &, GridGraph< D, VISITOR > &)
template<class T >
hid_t uintTypeHelper ()
template<class T >
hid_t intTypeHelper ()
template<class T >
hid_t floatingTypeHelper ()
template<class T >
hid_t hdf5Type ()
template<>
hid_t hdf5Type< unsigned char > ()
template<>
hid_t hdf5Type< unsigned short > ()
template<>
hid_t hdf5Type< unsigned int > ()
template<>
hid_t hdf5Type< unsigned long > ()
template<>
hid_t hdf5Type< unsigned long long > ()
template<>
hid_t hdf5Type< char > ()
template<>
hid_t hdf5Type< signed char > ()
template<>
hid_t hdf5Type< short > ()
template<>
hid_t hdf5Type< int > ()
template<>
hid_t hdf5Type< long > ()
template<>
hid_t hdf5Type< long long > ()
template<>
hid_t hdf5Type< float > ()
template<>
hid_t hdf5Type< double > ()
hid_t createFile (const std::string &filename, HDF5Version hdf5version)
 Create an HDF5 file.
hid_t openFile (const std::string &filename, FileAccessMode fileAccessMode, HDF5Version hdf5version)
 Open an HDF5 file.
void closeFile (const hid_t &handle)
 Close an HDF5 file.
hid_t createGroup (const hid_t &parentHandle, const std::string &groupName)
 Create an HDF5 group.
hid_t openGroup (const hid_t &parentHandle, const std::string &groupName, const bool createIfNonexistent)
 Open an HDF5 group.
void closeGroup (const hid_t &handle)
 Close an HDF5 group.
template<class T >
void save (const hid_t &parentHandle, const std::string &datasetName, const std::initializer_list< std::size_t > shape, const T *const data)
 Save shaped data as HDF5 dataset.
template<class T >
void save (const hid_t &parentHandle, const std::string &datasetName, const T &data)
 Save a scalar as an HDF5 dataset.
template<class T >
void load (const hid_t &parentHandle, const std::string &datasetName, std::vector< std::size_t > &shape, std::vector< T > &data)
 Load a 2D array from an HDF5 dataset as a single vector.
template<class T >
void load (const hid_t &, const std::string &, std::vector< std::vector< T > > &)
template<class T >
void load (const hid_t &parentHandle, const std::string &datasetName, T &data)
 Load a scalar value from an HDF5 dataset.
template<>
void load (const hid_t &parentHandle, const std::string &datasetName, std::string &data)
 Load a string value from an HDF5 dataset.

Enumeration Type Documentation

Definition at line 117 of file hdf5.hxx.

Definition at line 118 of file hdf5.hxx.

Function Documentation

void andres::graph::hdf5::closeFile ( const hid_t &  handle)
inline

Close an HDF5 file.

Parameters
handleHandle to the HDF5 file.
See Also
openFile(), createFile()

Definition at line 210 of file hdf5.hxx.

void andres::graph::hdf5::closeGroup ( const hid_t &  handle)
inline

Close an HDF5 group.

Parameters
handleHDF5 handle on group to close.
See Also
openGroup(), createGroup()

Definition at line 283 of file hdf5.hxx.

hid_t andres::graph::hdf5::createFile ( const std::string &  filename,
HDF5Version  hdf5version 
)
inline

Create an HDF5 file.

Parameters
filenameName of the file.
hdf5versionHDF5 version tag.
Returns
HDF5 handle
See Also
openFile(), closeFile()

Definition at line 150 of file hdf5.hxx.

hid_t andres::graph::hdf5::createGroup ( const hid_t &  parentHandle,
const std::string &  groupName 
)
inline

Create an HDF5 group.

Parameters
parentHandleHDF5 handle on the parent group or file.
groupNameName of the group.
Returns
HDF5 handle on the created group
See Also
openGroup(), closeGroup()

Definition at line 225 of file hdf5.hxx.

template<class T >
hid_t andres::graph::hdf5::floatingTypeHelper ( )
inline

Definition at line 77 of file hdf5.hxx.

template<class T >
hid_t andres::graph::hdf5::hdf5Type ( )
inline
template<>
hid_t andres::graph::hdf5::hdf5Type< char > ( )
inline

Definition at line 98 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< double > ( )
inline

Definition at line 114 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< float > ( )
inline

Definition at line 112 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< int > ( )
inline

Definition at line 105 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< long > ( )
inline

Definition at line 107 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< long long > ( )
inline

Definition at line 109 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< short > ( )
inline

Definition at line 103 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< signed char > ( )
inline

Definition at line 101 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< unsigned char > ( )
inline

Definition at line 88 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< unsigned int > ( )
inline

Definition at line 92 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< unsigned long > ( )
inline

Definition at line 94 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< unsigned long long > ( )
inline

Definition at line 96 of file hdf5.hxx.

template<>
hid_t andres::graph::hdf5::hdf5Type< unsigned short > ( )
inline

Definition at line 90 of file hdf5.hxx.

template<class T >
hid_t andres::graph::hdf5::intTypeHelper ( )
inline

Definition at line 66 of file hdf5.hxx.

template<class VISITOR >
void andres::graph::hdf5::load ( const hid_t  parentHandle,
const std::string &  graphName,
CompleteGraph< VISITOR > &  graph 
)

Definition at line 55 of file hdf5/complete-graph.hxx.

template<class VISITOR >
void andres::graph::hdf5::load ( const hid_t  parentHandle,
const std::string &  graphName,
Digraph< VISITOR > &  graph 
)

Definition at line 66 of file hdf5/digraph.hxx.

template<class VISITOR >
void andres::graph::hdf5::load ( const hid_t  parentHandle,
const std::string &  graphName,
Graph< VISITOR > &  graph 
)

Definition at line 66 of file hdf5/graph.hxx.

template<unsigned char D, class VISITOR >
void andres::graph::hdf5::load ( const hid_t  parentHandle,
const std::string &  graphName,
GridGraph< D, VISITOR > &  graph 
)

Definition at line 61 of file hdf5/grid-graph.hxx.

template<class T >
void andres::graph::hdf5::load ( const hid_t &  parentHandle,
const std::string &  datasetName,
std::vector< std::size_t > &  shape,
std::vector< T > &  data 
)

Load a 2D array from an HDF5 dataset as a single vector.

Parameters
parentHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
shapeThe shape of the read data. If an error occures, shape is cleared and an exception is thrown.
dataRead data.

Definition at line 403 of file hdf5.hxx.

template<class T >
void andres::graph::hdf5::load ( const hid_t &  ,
const std::string &  ,
std::vector< std::vector< T > > &   
)
template<class T >
void andres::graph::hdf5::load ( const hid_t &  parentHandle,
const std::string &  datasetName,
T &  data 
)

Load a scalar value from an HDF5 dataset.

Parameters
parentHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
dataScalar.
See Also
loadHyperslab()

Definition at line 483 of file hdf5.hxx.

template<>
void andres::graph::hdf5::load ( const hid_t &  parentHandle,
const std::string &  datasetName,
std::string &  data 
)
inline

Load a string value from an HDF5 dataset.

Parameters
parentHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
datastring to hold the read data.
See Also
loadHyperslab()

Definition at line 547 of file hdf5.hxx.

hid_t andres::graph::hdf5::openFile ( const std::string &  filename,
FileAccessMode  fileAccessMode,
HDF5Version  hdf5version 
)
inline

Open an HDF5 file.

Parameters
filenameName of the file.
fileAccessModeFile access mode.
hdf5versionHDF5 version tag.
Returns
HDF5 handle
See Also
closeFile(), createFile()

Definition at line 178 of file hdf5.hxx.

hid_t andres::graph::hdf5::openGroup ( const hid_t &  parentHandle,
const std::string &  groupName,
const bool  createIfNonexistent 
)
inline

Open an HDF5 group.

Parameters
parentHandleHDF5 handle on the parent group or file.
groupNameName of the group.
createIfNonexistentif set to true, the group is newly created if it cannot be opened.
Returns
HDF5 handle on the opened group.
See Also
createGroup(), closeGroup()

Definition at line 247 of file hdf5.hxx.

template<class VISITOR >
void andres::graph::hdf5::save ( const hid_t  parentHandle,
const std::string &  graphName,
const CompleteGraph< VISITOR > &  graph 
)

Definition at line 31 of file hdf5/complete-graph.hxx.

template<class VISITOR >
void andres::graph::hdf5::save ( const hid_t  parentHandle,
const std::string &  graphName,
const Digraph< VISITOR > &  graph 
)

Definition at line 32 of file hdf5/digraph.hxx.

template<class VISITOR >
void andres::graph::hdf5::save ( const hid_t  parentHandle,
const std::string &  graphName,
const Graph< VISITOR > &  graph 
)

Definition at line 32 of file hdf5/graph.hxx.

template<unsigned char D, class VISITOR >
void andres::graph::hdf5::save ( const hid_t  parentHandle,
const std::string &  graphName,
const GridGraph< D, VISITOR > &  graph 
)

Definition at line 33 of file hdf5/grid-graph.hxx.

template<class T >
void andres::graph::hdf5::save ( const hid_t &  parentHandle,
const std::string &  datasetName,
const std::initializer_list< std::size_t >  shape,
const T *const  data 
)

Save shaped data as HDF5 dataset.

Parameters
parentHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
shapeShape of the data.
dataA total of prod(shape) values must be readable.

Definition at line 297 of file hdf5.hxx.

template<class T >
void andres::graph::hdf5::save ( const hid_t &  parentHandle,
const std::string &  datasetName,
const T &  data 
)

Save a scalar as an HDF5 dataset.

Parameters
parentHandleHandle of the parent HDF5 file or group.
datasetNameName of the HDF5 dataset.
dataScalar to save.

Definition at line 351 of file hdf5.hxx.

template<class T >
hid_t andres::graph::hdf5::uintTypeHelper ( )
inline

Definition at line 55 of file hdf5.hxx.