#include <H5Object.h>
Definition at line 53 of file H5Object.h.
Public Types | |
typedef std::function< void(boost::any const &, H5Object &)> | AnyWriterType |
typedef std::unordered_map< std::type_index, AnyWriterType > | AnyWriterMapType |
Public Member Functions | |
H5Object () | |
H5Object (std::shared_ptr< HDF5File > file_, std::string const &path_, bool isDataset_) | |
H5Object & | operator= (boost::any const &val) |
template<typename ScalarType , typename = typename std::enable_if<std::is_arithmetic<ScalarType>::value, ScalarType>::type> | |
H5Object & | operator= (ScalarType val) |
template<typename Derived > | |
H5Object & | operator= (Eigen::DenseBase< Derived > const &val) |
template<typename ScalarType , int fixedRows, int fixedCols> | |
H5Object & | operator= (Eigen::Matrix< ScalarType, fixedRows, fixedCols > const &val) |
H5Object & | operator= (H5Object const &otherObj) |
Performs a deep copy of the datasets and groups in otherObj into this object. More... | |
template<typename scalarType = double, int rows = Eigen::Dynamic, int cols = Eigen::Dynamic> | |
Eigen::Matrix< scalarType, rows, cols > | eval () |
H5Object & | CreatePlaceholder (std::string const &grpName) |
H5Object & | CreateGroup (std::string const &grpName) |
template<typename ScalarType > | |
H5Object & | CreateDataset (std::string const &setName, unsigned int rows, unsigned int cols=0) |
H5Object & | operator[] (std::string const &targetPath) |
BlockDataset | block (unsigned startRow, unsigned startCol, unsigned numRows, unsigned numCols) const |
BlockDataset | topLeftCorner (unsigned numRows, unsigned numCols) const |
BlockDataset | bottomLeftCorner (unsigned numRows, unsigned numCols) const |
BlockDataset | topRightCorner (unsigned numRows, unsigned numCols) const |
BlockDataset | bottomRightCorner (unsigned numRows, unsigned numCols) const |
BlockDataset | topRows (unsigned numRows) const |
BlockDataset | bottomRows (unsigned numRows) const |
BlockDataset | leftCols (unsigned numCols) const |
BlockDataset | rightCols (unsigned numCols) const |
BlockDataset | col (unsigned col) const |
BlockDataset | row (unsigned row) const |
BlockDataset | segment (unsigned startInd, unsigned numInds) const |
BlockDataset | head (unsigned numInds) const |
BlockDataset | tail (unsigned numInds) const |
unsigned | rows () const |
unsigned | cols () const |
unsigned | size () const |
double | operator() (int i) const |
double | operator() (int i, int j) const |
void | Flush () |
void | Print (std::string prefix="") const |
std::string | Path () const |
Static Public Member Functions | |
static std::shared_ptr< AnyWriterMapType > | GetAnyWriterMap () |
Public Attributes | |
std::shared_ptr< HDF5File > | file |
AttributeList | attrs |
Friends | |
H5Object | muq::Utilities::AddChildren (std::shared_ptr< HDF5File > file, std::string const &path) |
typedef std::unordered_map<std::type_index, AnyWriterType> muq::Utilities::H5Object::AnyWriterMapType |
Definition at line 69 of file H5Object.h.
typedef std::function<void(boost::any const&, H5Object& )> muq::Utilities::H5Object::AnyWriterType |
Definition at line 68 of file H5Object.h.
|
inline |
Definition at line 59 of file H5Object.h.
Referenced by CreateGroup(), and CreatePlaceholder().
|
inline |
Definition at line 61 of file H5Object.h.
BlockDataset H5Object::block | ( | unsigned | startRow, |
unsigned | startCol, | ||
unsigned | numRows, | ||
unsigned | numCols | ||
) | const |
Definition at line 119 of file H5Object.cpp.
References file, isDataset, and path.
Referenced by bottomLeftCorner(), bottomRightCorner(), bottomRows(), col(), head(), leftCols(), rightCols(), row(), segment(), tail(), topLeftCorner(), topRightCorner(), and topRows().
BlockDataset H5Object::bottomLeftCorner | ( | unsigned | numRows, |
unsigned | numCols | ||
) | const |
Definition at line 140 of file H5Object.cpp.
BlockDataset H5Object::bottomRightCorner | ( | unsigned | numRows, |
unsigned | numCols | ||
) | const |
Definition at line 150 of file H5Object.cpp.
BlockDataset H5Object::bottomRows | ( | unsigned | numRows | ) | const |
Definition at line 160 of file H5Object.cpp.
BlockDataset H5Object::col | ( | unsigned | col | ) | const |
unsigned H5Object::cols | ( | ) | const |
Definition at line 234 of file H5Object.cpp.
References file, isDataset, and path.
Referenced by bottomRightCorner(), bottomRows(), CreateDataset(), eval(), muq::Utilities::MultiIndexSet::FromHDF5(), rightCols(), topRightCorner(), and topRows().
|
inline |
Creates a dataset with a particular size and type.
Definition at line 145 of file H5Object.h.
References cols(), CreatePlaceholder(), file, path, and rows().
Referenced by muq::Approximation::BasisExpansion::ToHDF5(), and muq::Utilities::MultiIndexSet::ToHDF5().
H5Object & H5Object::CreateGroup | ( | std::string const & | grpName | ) |
Definition at line 56 of file H5Object.cpp.
References children, file, H5Object(), path, and muq::Utilities::SplitString().
H5Object & H5Object::CreatePlaceholder | ( | std::string const & | grpName | ) |
Definition at line 29 of file H5Object.cpp.
References children, file, H5Object(), path, and muq::Utilities::SplitString().
Referenced by CreateDataset(), and operator[]().
|
private |
Definition at line 6 of file H5Object.cpp.
References children, file, isDataset, and path.
Referenced by operator=().
|
inline |
Definition at line 126 of file H5Object.h.
References cols(), file, isDataset, path, and rows().
Referenced by operator=().
|
private |
void H5Object::Flush | ( | ) |
Definition at line 275 of file H5Object.cpp.
References file.
|
static |
BlockDataset H5Object::head | ( | unsigned | numInds | ) | const |
Definition at line 196 of file H5Object.cpp.
BlockDataset H5Object::leftCols | ( | unsigned | numCols | ) | const |
Definition at line 165 of file H5Object.cpp.
double H5Object::operator() | ( | int | i | ) | const |
Definition at line 255 of file H5Object.cpp.
double H5Object::operator() | ( | int | i, |
int | j | ||
) | const |
Definition at line 264 of file H5Object.cpp.
H5Object& muq::Utilities::H5Object::operator= | ( | boost::any const & | val | ) |
|
inline |
Definition at line 97 of file H5Object.h.
References eval().
|
inline |
Definition at line 103 of file H5Object.h.
Performs a deep copy of the datasets and groups in otherObj into this object.
Definition at line 13 of file H5Object.cpp.
References DeepCopy().
|
inline |
Definition at line 78 of file H5Object.h.
H5Object & H5Object::operator[] | ( | std::string const & | targetPath | ) |
Definition at line 84 of file H5Object.cpp.
References children, CreatePlaceholder(), isDataset, path, and muq::Utilities::SplitString().
|
inline |
Definition at line 201 of file H5Object.h.
References path.
Referenced by muq::Approximation::PolynomialChaosExpansion::FromHDF5().
void H5Object::Print | ( | std::string | prefix = "" | ) | const |
Definition at line 281 of file H5Object.cpp.
BlockDataset H5Object::rightCols | ( | unsigned | numCols | ) | const |
Definition at line 170 of file H5Object.cpp.
BlockDataset H5Object::row | ( | unsigned | row | ) | const |
Definition at line 183 of file H5Object.cpp.
References block(), file, isDataset, and path.
Referenced by muq::Utilities::MultiIndexSet::FromHDF5(), and muq::Utilities::MultiIndexSet::ToHDF5().
unsigned H5Object::rows | ( | ) | const |
Definition at line 225 of file H5Object.cpp.
References file, isDataset, and path.
Referenced by bottomLeftCorner(), bottomRightCorner(), CreateDataset(), eval(), muq::Utilities::MultiIndexSet::FromHDF5(), leftCols(), rightCols(), and tail().
BlockDataset H5Object::segment | ( | unsigned | startInd, |
unsigned | numInds | ||
) | const |
Definition at line 191 of file H5Object.cpp.
References block().
unsigned H5Object::size | ( | ) | const |
Definition at line 246 of file H5Object.cpp.
BlockDataset H5Object::tail | ( | unsigned | numInds | ) | const |
Definition at line 219 of file H5Object.cpp.
BlockDataset H5Object::topLeftCorner | ( | unsigned | numRows, |
unsigned | numCols | ||
) | const |
Definition at line 135 of file H5Object.cpp.
References block().
BlockDataset H5Object::topRightCorner | ( | unsigned | numRows, |
unsigned | numCols | ||
) | const |
Definition at line 145 of file H5Object.cpp.
BlockDataset H5Object::topRows | ( | unsigned | numRows | ) | const |
Definition at line 155 of file H5Object.cpp.
|
friend |
AttributeList muq::Utilities::H5Object::attrs |
Definition at line 205 of file H5Object.h.
Referenced by ExactCopy(), muq::Approximation::BasisExpansion::FromHDF5(), muq::Approximation::BasisExpansion::ToHDF5(), and muq::Approximation::PolynomialChaosExpansion::ToHDF5().
|
private |
Definition at line 221 of file H5Object.h.
Referenced by muq::Utilities::AddChildren(), CreateGroup(), CreatePlaceholder(), DeepCopy(), ExactCopy(), operator[](), and Print().
std::shared_ptr<HDF5File> muq::Utilities::H5Object::file |
Definition at line 203 of file H5Object.h.
Referenced by block(), col(), cols(), CreateDataset(), CreateGroup(), CreatePlaceholder(), DeepCopy(), eval(), ExactCopy(), Flush(), head(), operator()(), operator=(), row(), rows(), and size().
|
private |
Definition at line 223 of file H5Object.h.
Referenced by block(), col(), cols(), DeepCopy(), eval(), ExactCopy(), operator()(), operator=(), operator[](), row(), rows(), and size().
|
private |
Definition at line 219 of file H5Object.h.
Referenced by block(), col(), cols(), CreateDataset(), CreateGroup(), CreatePlaceholder(), DeepCopy(), eval(), ExactCopy(), head(), operator()(), operator=(), operator[](), Path(), Print(), row(), rows(), and size().