ACADO Toolkit  1.2.0beta
Toolkit for Automatic Control and Dynamic Optimization
Public Member Functions | Friends

Implements a templated dense matrix class. More...

#include <t_matrix.hpp>

List of all members.

Public Member Functions

 Tmatrix ()
 Default constructor.
 Tmatrix (const unsigned int nr, const unsigned int nc=1, const bool alloc=true)
 Constructor doing size assignment.
template<typename U >
 Tmatrix (const unsigned int nr, const unsigned int nc, const U &v, const bool alloc=true)
 Constructor doing size assignment and element initialization.
 Tmatrix (const Tmatrix< T > &M)
 Copy Constructor.
template<typename U >
 Tmatrix (const Tmatrix< U > &M)
 Copy Constructor doing type conversion.
 ~Tmatrix ()
 Destructor.
void resize (const unsigned int nr, const unsigned int nc=1, const bool alloc=true)
 Resets the dimension of a Tmatrix objects.
Tmatrix< T > & col (const unsigned int ic)
 Sets/retrieves value of column ic.
Tmatrix< T > & row (const unsigned int ir)
 Sets/retrieves value of row ir.
T *& pval (const unsigned int ir, const unsigned int ic)
 Sets/retrieves pointer to entry (ir,ic)
unsigned int col () const
 Retrieves number of columns.
unsigned int row () const
 Retrieves number of rows.
T * array () const
 Converts a matrix into array form (columnwise storage)
void array (const T *pM)
 Sets the elements of a matrix from an array (columnwise storage)
unsigned int getDim () const
unsigned int getNumRows () const
unsigned int getNumCols () const
Tmatrix< unsigned int > sort ()
 Other operators.
T & operator() (const unsigned int ir, const unsigned int ic)
const T & operator() (const unsigned int ir, const unsigned int ic) const
T & operator() (const unsigned int ie)
const T & operator() (const unsigned int ie) const
Tmatrix< T > & operator= (const Tmatrix< T > &M)
Tmatrix< T > & operator= (const T &m)
template<typename U >
Tmatrix< T > & operator+= (const Tmatrix< U > &M)
template<typename U >
Tmatrix< T > & operator+= (const U &m)
template<typename U >
Tmatrix< T > & operator-= (const Tmatrix< U > &M)
template<typename U >
Tmatrix< T > & operator-= (const U &m)
template<typename U >
Tmatrix< T > & operator*= (const Tmatrix< U > &M)
template<typename U >
Tmatrix< T > & operator*= (const U &m)
template<typename U >
Tmatrix< T > & operator/= (const U &m)

Friends

class Tmatrix
template<typename U >
std::ostream & operator<< (std::ostream &, const Tmatrix< U > &)
template<typename U >
Tmatrix< U > operator+ (const Tmatrix< U > &)
template<typename U , typename V >
Tmatrix< U > operator+ (const Tmatrix< U > &, const V &)
template<typename U , typename V >
Tmatrix< U > operator+ (const V &, const Tmatrix< U > &)
template<typename U , typename V >
Tmatrix< U > operator+ (const Tmatrix< U > &, const Tmatrix< V > &)
template<typename U >
Tmatrix< U > operator- (const Tmatrix< U > &)
template<typename U , typename V >
Tmatrix< U > operator- (const Tmatrix< U > &, const V &)
template<typename U , typename V >
Tmatrix< U > operator- (const U &, const Tmatrix< V > &)
template<typename U , typename V >
Tmatrix< U > operator- (const Tmatrix< U > &, const Tmatrix< V > &)
template<typename U , typename V >
Tmatrix< U > operator* (const Tmatrix< U > &, const V &)
template<typename U , typename V >
Tmatrix< U > operator* (const V &, const Tmatrix< U > &)
template<typename U , typename V >
Tmatrix< U > operator* (const Tmatrix< U > &, const Tmatrix< V > &)
template<typename U , typename V >
Tmatrix< U > operator/ (const Tmatrix< U > &, const V &)

Detailed Description

template<typename T>
class Tmatrix< T >

Implements a templated matrix class.
The class can be used to represent, e.g., interval matrices,
matrices of symbolic functions, etc..

Author:
Boris Houska

Friends And Related Function Documentation

template<typename T>
template<typename U , typename V >
Tmatrix<U> operator* ( const Tmatrix< U > &  ,
const V &   
) [friend]
template<typename T>
template<typename U , typename V >
Tmatrix<U> operator* ( const V &  ,
const Tmatrix< U > &   
) [friend]
template<typename T>
template<typename U , typename V >
Tmatrix<U> operator* ( const Tmatrix< U > &  ,
const Tmatrix< V > &   
) [friend]
template<typename T>
template<typename U >
Tmatrix<U> operator+ ( const Tmatrix< U > &  ) [friend]
template<typename T>
template<typename U , typename V >
Tmatrix<U> operator+ ( const Tmatrix< U > &  ,
const V &   
) [friend]
template<typename T>
template<typename U , typename V >
Tmatrix<U> operator+ ( const V &  ,
const Tmatrix< U > &   
) [friend]
template<typename T>
template<typename U , typename V >
Tmatrix<U> operator+ ( const Tmatrix< U > &  ,
const Tmatrix< V > &   
) [friend]
template<typename T>
template<typename U >
Tmatrix<U> operator- ( const Tmatrix< U > &  ) [friend]
template<typename T>
template<typename U , typename V >
Tmatrix<U> operator- ( const Tmatrix< U > &  ,
const V &   
) [friend]
template<typename T>
template<typename U , typename V >
Tmatrix<U> operator- ( const U &  ,
const Tmatrix< V > &   
) [friend]
template<typename T>
template<typename U , typename V >
Tmatrix<U> operator- ( const Tmatrix< U > &  ,
const Tmatrix< V > &   
) [friend]
template<typename T>
template<typename U , typename V >
Tmatrix<U> operator/ ( const Tmatrix< U > &  ,
const V &   
) [friend]
template<typename T>
template<typename U >
std::ostream& operator<< ( std::ostream &  ,
const Tmatrix< U > &   
) [friend]
template<typename T>
friend class Tmatrix [friend]

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines