Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
concepts::DenseIWrapper< Scalar > Class Template Reference

Input wrapper for Concepts::DenseMatrices. More...

#include <denseIWrapper.hh>

Collaboration diagram for concepts::DenseIWrapper< Scalar >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef concepts::DenseMatrix
< Scalar > 
MatrixType
 Type of the resulting matrix.
typedef ArrayDenseWrapper Type

Public Member Functions

 DenseIWrapper (MatrixType &matrix)
 Constructor.
void get_matrix ()
 Completes the operation.
void imagType (const MATtype &type)
void isComplex (bool isComplex)
void name (const std::string &) const
bytepi ()
bytepr ()
void realType (const MATtype &type)
void size (const miINT32_t &rows, const miINT32_t &cols)

Private Types

typedef std::complex< RealScalarComplexScalar
typedef NumTraits< Scalar >::Real RealScalar

Private Member Functions

template<class Other >
void copy (bool real=true)

Private Attributes

miINT32_t cols_
MATtype imagType_
bool isComplex_
MatrixTypematrix_
bool matrixPrepared
std::string piCopy_
std::string prCopy_
MATtype realType_
miINT32_t rows_

Detailed Description

template<class Scalar>
class concepts::DenseIWrapper< Scalar >

Input wrapper for Concepts::DenseMatrices.

Wrapper for complex or Real concepts::DenseMatrix but works only with column-major matrices with 32-bit indices starting from zero.

This is a template wrapper: you must explicitely express the requested scalar type as template parameter. The resulting matrix will contain that specified type of data independently of the actual data type stored in the MAT-file. If these types match, and the matrix is real, the performance of the wrapper will be very good; otherwise, a relatively slow copy operation will be performed, resulting in a lost of performance.

Note that if the given scalar type is not complex, only the real part of the matrix will be read and copied. The imaginary part won't be read. Vice versa, if that scalar is complex, but the stored matrix is real, the imaginary part of the resulting matrix will be zero.

Definition at line 30 of file denseIWrapper.hh.


Member Typedef Documentation

template<class Scalar >
typedef std::complex<RealScalar> concepts::DenseIWrapper< Scalar >::ComplexScalar [private]

Definition at line 44 of file denseIWrapper.hh.

template<class Scalar >
typedef concepts::DenseMatrix<Scalar> concepts::DenseIWrapper< Scalar >::MatrixType

Type of the resulting matrix.

Constructor needs such type.

Definition at line 40 of file denseIWrapper.hh.

template<class Scalar >
typedef NumTraits<Scalar>::Real concepts::DenseIWrapper< Scalar >::RealScalar [private]

Definition at line 43 of file denseIWrapper.hh.

template<class Scalar >
typedef ArrayDenseWrapper concepts::DenseIWrapper< Scalar >::Type

Definition at line 34 of file denseIWrapper.hh.


Constructor & Destructor Documentation

template<class Scalar >
concepts::DenseIWrapper< Scalar >::DenseIWrapper ( MatrixType matrix) [inline]

Constructor.

The constructor take as argument a reference to a matrix, which will be filled with the data of the MAT-file. You have to construct the matrix before the construction of this wrapper and ensure that it will exist until the input operation reaches the end.

The matrix will be automatically resized and all data inside the matrix will be overwritten and lost.

Definition at line 70 of file denseIWrapper.hh.


Member Function Documentation

template<class Scalar >
template<class Other >
void concepts::DenseIWrapper< Scalar >::copy ( bool  real = true) [inline, private]

Definition at line 115 of file denseIWrapper.hh.

template<class Scalar >
void concepts::DenseIWrapper< Scalar >::get_matrix ( ) [inline]

Completes the operation.

During the actual operation, some data can be directly written on the matrix, while other data can be stored elsewhere and wait until the end of the operation.

Please make sure to call this method after the read operation (i.e. after InputDevice::readArray) and before any other operation on the matrix.

This method does not return anything, it just prepares the matrix by writing any temporary information.

Definition at line 150 of file denseIWrapper.hh.

template<class Scalar >
void concepts::DenseIWrapper< Scalar >::imagType ( const MATtype type) [inline]

Definition at line 103 of file denseIWrapper.hh.

template<class Scalar >
void concepts::DenseIWrapper< Scalar >::isComplex ( bool  isComplex) [inline]

Definition at line 72 of file denseIWrapper.hh.

template<class Scalar >
void concepts::DenseIWrapper< Scalar >::name ( const std::string &  ) const [inline]

Definition at line 87 of file denseIWrapper.hh.

template<class Scalar >
byte* concepts::DenseIWrapper< Scalar >::pi ( ) [inline]

Definition at line 107 of file denseIWrapper.hh.

Here is the call graph for this function:

template<class Scalar >
byte* concepts::DenseIWrapper< Scalar >::pr ( ) [inline]

Definition at line 93 of file denseIWrapper.hh.

Here is the call graph for this function:

template<class Scalar >
void concepts::DenseIWrapper< Scalar >::realType ( const MATtype type) [inline]

Definition at line 89 of file denseIWrapper.hh.

template<class Scalar >
void concepts::DenseIWrapper< Scalar >::size ( const miINT32_t rows,
const miINT32_t cols 
) [inline]

Definition at line 76 of file denseIWrapper.hh.


Member Data Documentation

template<class Scalar >
miINT32_t concepts::DenseIWrapper< Scalar >::cols_ [private]

Definition at line 49 of file denseIWrapper.hh.

template<class Scalar >
MATtype concepts::DenseIWrapper< Scalar >::imagType_ [private]

Definition at line 48 of file denseIWrapper.hh.

template<class Scalar >
bool concepts::DenseIWrapper< Scalar >::isComplex_ [private]

Definition at line 47 of file denseIWrapper.hh.

template<class Scalar >
MatrixType& concepts::DenseIWrapper< Scalar >::matrix_ [private]

Definition at line 52 of file denseIWrapper.hh.

template<class Scalar >
bool concepts::DenseIWrapper< Scalar >::matrixPrepared [private]

Definition at line 53 of file denseIWrapper.hh.

template<class Scalar >
std::string concepts::DenseIWrapper< Scalar >::piCopy_ [private]

Definition at line 56 of file denseIWrapper.hh.

template<class Scalar >
std::string concepts::DenseIWrapper< Scalar >::prCopy_ [private]

Definition at line 56 of file denseIWrapper.hh.

template<class Scalar >
MATtype concepts::DenseIWrapper< Scalar >::realType_ [private]

Definition at line 48 of file denseIWrapper.hh.

template<class Scalar >
miINT32_t concepts::DenseIWrapper< Scalar >::rows_ [private]

Definition at line 49 of file denseIWrapper.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)