Back to index

fet  5.18.0
Public Member Functions | Private Attributes
Matrix1D< T > Class Template Reference

#include <matrix.h>

Inheritance diagram for Matrix1D< T >:
Inheritance graph
[legend]
Collaboration diagram for Matrix1D< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Matrix1D ()
 ~Matrix1D ()
void clear ()
void resize (int _d1)
T & operator[] (int i)

Private Attributes

int d1
T * a

Detailed Description

template<typename T>
class Matrix1D< T >

Definition at line 75 of file matrix.h.


Constructor & Destructor Documentation

template<typename T >
Matrix1D< T >::Matrix1D ( )

Definition at line 206 of file matrix.h.

{
       d1=-1;
}
template<typename T >
Matrix1D< T >::~Matrix1D ( )

Definition at line 211 of file matrix.h.

{
       this->clear();
}

Member Function Documentation

template<typename T >
void Matrix1D< T >::clear ( )

Definition at line 216 of file matrix.h.

{
       if(d1>=0){
              assert(d1>0);
              delete[] a;
       }
       d1=-1;
}

Here is the caller graph for this function:

template<typename T >
T & Matrix1D< T >::operator[] ( int  i) [inline]

Definition at line 241 of file matrix.h.

{
       return a[i];
}
template<typename T >
void Matrix1D< T >::resize ( int  _d1)

Definition at line 225 of file matrix.h.

{
       if(_d1<=0){
              this->clear();
              return;
       }

       if(d1!=_d1){
              this->clear();

              d1=_d1;

              a=new T[d1];
       }
}

Here is the caller graph for this function:


Member Data Documentation

template<typename T>
T* Matrix1D< T >::a [private]

Definition at line 80 of file matrix.h.

template<typename T>
int Matrix1D< T >::d1 [private]

Definition at line 78 of file matrix.h.


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