CYCLUS
Public Member Functions | Public Attributes | List of all members
h5wrap::HomogenousTypeTable< T > Class Template Reference

Detailed Description

template<typename T>
class h5wrap::HomogenousTypeTable< T >

A class representing a high-level table contruct whose columns all have the same type T in C/C++ (and the analogous type in HDF5).

Definition at line 650 of file pyne.h.

#include <pyne.h>

Public Member Functions

 HomogenousTypeTable ()
 
 HomogenousTypeTable (hid_t h5file, std::string data_path, hid_t dtype=H5T_NATIVE_DOUBLE)
 
std::vector< T > operator[] (std::string col_name)
 
std::map< std::string, T > operator[] (int m)
 
 ~HomogenousTypeTable ()
 

Public Attributes

std::vector< std::string > cols
 
std::map< std::string, std::vector< T > > data
 
std::string path
 
int shape [2]
 

Constructor & Destructor Documentation

◆ HomogenousTypeTable() [1/2]

template<typename T >
h5wrap::HomogenousTypeTable< T >::HomogenousTypeTable ( )
inline

default constructor

Definition at line 655 of file pyne.h.

◆ ~HomogenousTypeTable()

template<typename T >
h5wrap::HomogenousTypeTable< T >::~HomogenousTypeTable ( )
inline

default destructor

Definition at line 658 of file pyne.h.

◆ HomogenousTypeTable() [2/2]

template<typename T >
h5wrap::HomogenousTypeTable< T >::HomogenousTypeTable ( hid_t  h5file,
std::string  data_path,
hid_t  dtype = H5T_NATIVE_DOUBLE 
)
inline

Constructor to load in data upon initialization.

T should roughly match dtype.

Parameters
h5fileHDF5 file id for an open file.
data_pathpath to the data in the open file.
dtypeHDF5 data type for the data set at data_path.

Definition at line 665 of file pyne.h.

Member Function Documentation

◆ operator[]() [1/2]

template<typename T >
std::vector<T> h5wrap::HomogenousTypeTable< T >::operator[] ( std::string  col_name)
inline

index into the table by column name (string)

Definition at line 715 of file pyne.h.

◆ operator[]() [2/2]

template<typename T >
std::map<std::string, T> h5wrap::HomogenousTypeTable< T >::operator[] ( int  m)
inline

index into the table by row

Definition at line 721 of file pyne.h.

Member Data Documentation

◆ cols

template<typename T >
std::vector<std::string> h5wrap::HomogenousTypeTable< T >::cols

column names

Definition at line 707 of file pyne.h.

◆ data

template<typename T >
std::map<std::string, std::vector<T> > h5wrap::HomogenousTypeTable< T >::data

mapping from column names to column data

Definition at line 709 of file pyne.h.

◆ path

template<typename T >
std::string h5wrap::HomogenousTypeTable< T >::path

path in file to the data

Definition at line 702 of file pyne.h.

◆ shape

template<typename T >
int h5wrap::HomogenousTypeTable< T >::shape[2]

table shape, rows x columns.

Definition at line 706 of file pyne.h.


The documentation for this class was generated from the following file: