All Classes Namespaces Functions Typedefs Enumerations Pages
Public Member Functions | Private Attributes | List of all members
H5::MatrixSerie< T > Class Template Reference

Serie of matrices. More...

#include <matrixserie.h>

Inheritance diagram for H5::MatrixSerie< T >:
fmatvec::Atom

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
Atomoperator= (const Atom &)
 
void setMessageStreamActive (MsgType type, bool active)
 
void getMessageStream (MsgType type, boost::shared_ptr< bool > &a, boost::shared_ptr< std::ostream > &s)
 
void adoptMessageStreams (const Atom *src=NULL)
 
std::ostream & msg (MsgType type)
 
bool msgAct (MsgType type)
 

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 boost::shared_ptr< bool > &a=boost::make_shared< bool >(true), const boost::shared_ptr< std::ostream > &s=boost::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)
 

Detailed Description

template<class T>
class H5::MatrixSerie< T >

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.

Constructor & Destructor Documentation

template<class T >
H5::MatrixSerie< T >::MatrixSerie ( )

A stub constructor.

Creates a empty object.

template<class T>
H5::MatrixSerie< T >::MatrixSerie ( const CommonFG &  parent,
const std::string &  name 
)

Constructor for opening a dataset.

see open()

template<class T>
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() 
)

Dataset creating constructor.

see create()

Member Function Documentation

template<class T>
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.

template<class T>
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.

template<class T >
string H5::MatrixSerie< T >::getDescription ( )

Return the description for the dataset.

Returns the value of the string attribute named Description of the dataset.

template<class T >
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.

template<class T>
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.

template<class T>
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.


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

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML