Serie of matrices. More...
#include <matrixserie.h>
Public Member Functions | |
| MatrixSerie () | |
| A stub constructor. More... | |
| MatrixSerie (const MatrixSerie< T > &dataset) | |
| Copy constructor. | |
| MatrixSerie (const CommonFG &parent, const std::string &name) | |
| Constructor for opening a dataset. More... | |
| MatrixSerie (const CommonFG &parent, const std::string &name, const int rows, const int cols, int compression=FileSerie::getDefaultCompression(), int chunkSize=FileSerie::getDefaultChunkSize()) | |
| Dataset creating constructor. More... | |
| void | create (const CommonFG &parent, const std::string &name, const int rows, const int cols, int compression=FileSerie::getDefaultCompression(), int chunksize=FileSerie::getDefaultChunkSize()) |
| Creating a dataset. More... | |
| void | open (const CommonFG &parent, const std::string &name) |
| Open a dataset. More... | |
| void | setDescription (const std::string &desc) |
| Sets a description for the dataset. More... | |
| void | append (const std::vector< std::vector< T > > &matrix) |
| Append a matrix. More... | |
| unsigned int | getNumberOfMatrices () |
| Returns the number of matrices in the dataset. | |
| unsigned int | getRows () |
| Returns the number of rows of the matrix. | |
| unsigned int | getColumns () |
| Returns the number of columns of the matrix. | |
| std::vector< std::vector< T > > | getMatrix (const int number) |
| Returns the matrix at position number. More... | |
| std::string | getDescription () |
| Return the description for the dataset. More... | |
| void | extend (const hsize_t *size) |
Public Member Functions inherited from fmatvec::Atom | |
| Atom & | operator= (const Atom &) |
| void | setMessageStreamActive (MsgType type, bool activeFlag) |
| void | getMessageStream (MsgType type, std::shared_ptr< bool > &a, std::shared_ptr< std::ostream > &s) const |
| void | adoptMessageStreams (const Atom *src=nullptr) |
| std::ostream & | msg (MsgType type) const |
| bool | msgAct (MsgType type) const |
Private Attributes | |
| DataType | memDataType |
| DataSpace | memDataSpace |
| hsize_t | dims [3] |
Additional Inherited Members | |
Public Types inherited from fmatvec::Atom | |
| enum | MsgType |
Static Public Member Functions inherited from fmatvec::Atom | |
| static void | setCurrentMessageStream (MsgType type, const std::shared_ptr< bool > &a=std::make_shared< bool >(true), const std::shared_ptr< std::ostream > &s=std::make_shared< std::ostream >(std::cout.rdbuf())) |
| static std::ostream & | msgStatic (MsgType type) |
| static bool | msgActStatic (MsgType type) |
Protected Member Functions inherited from fmatvec::Atom | |
| Atom (const Atom &src) | |
Serie of matrices.
A HDF5 dataset for reading and writing a serie of data matrices. The type of the elements of the matrix (template type T) can be of:
The data is stored as a 3D array in the HDF5 file. The first dimension is the serie.
A note when using a vector-matrix-library: It is likly that the data is calculated by a vector-matrix-library. If so, and the matric object (of type T) of the library (e.g. fmatvec) has a cast-operator to std::vector<std::vector<T> > and a constructor with a single parameter of type std::vector<std::vector<T> >, then you can use the matrix-object wherever a object of type std::vector<std::vector<T> > is needed.
| H5::MatrixSerie< T >::MatrixSerie | ( | ) |
A stub constructor.
Creates a empty object.
| H5::MatrixSerie< T >::MatrixSerie | ( | const CommonFG & | parent, |
| const std::string & | name | ||
| ) |
Constructor for opening a dataset.
see open()
| H5::MatrixSerie< T >::MatrixSerie | ( | const CommonFG & | parent, |
| const std::string & | name, | ||
| const int | rows, | ||
| const int | cols, | ||
| int | compression = FileSerie::getDefaultCompression(), |
||
| int | chunkSize = FileSerie::getDefaultChunkSize() |
||
| ) |
| void H5::MatrixSerie< T >::append | ( | const std::vector< std::vector< T > > & | matrix | ) |
Append a matrix.
Appends the matrix data at the end of the dataset. The fist dimension of the HDF5 array will be incremented by this operation.
| void H5::MatrixSerie< T >::create | ( | const CommonFG & | parent, |
| const std::string & | name, | ||
| const int | rows, | ||
| const int | cols, | ||
| int | compression = FileSerie::getDefaultCompression(), |
||
| int | chunksize = FileSerie::getDefaultChunkSize() |
||
| ) |
Creating a dataset.
Creates a dataset named name as a child of position parent. By default the dataset is compressed using deflate (gzip) with compression level FileSerie::defaultCompression. Use compression to adjuste the compression level [1-9] or 0 to disable compression.
| string H5::MatrixSerie< T >::getDescription | ( | ) |
Return the description for the dataset.
Returns the value of the string attribute named Description of the dataset.
| vector< vector< T > > H5::MatrixSerie< T >::getMatrix | ( | const int | number | ) |
Returns the matrix at position number.
The first number is 0. The last avaliable number/position is getNumberOfMatrices()-1.
| void H5::MatrixSerie< T >::open | ( | const CommonFG & | parent, |
| const std::string & | name | ||
| ) |
Open a dataset.
Opens the dataset named name as a child of position parent.
| void H5::MatrixSerie< T >::setDescription | ( | const std::string & | desc | ) |
Sets a description for the dataset.
The value of desc is stored as an string attribute named Description in the dataset.