Public Member Functions | Protected Attributes

MeshLib::CDenseMatrix Class Reference

#include <densematrix.h>

Collaboration diagram for MeshLib::CDenseMatrix:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CDenseMatrix (int row, int col)
 ~CDenseMatrix ()
double * operator[] (int idx)
void reset ()
void Gram_Schmidt_Orghonomralization ()
int row ()
int col ()

Protected Attributes

int m_row
int m_col
double ** m_ptr

Detailed Description

Definition at line 47 of file densematrix.h.


Constructor & Destructor Documentation

MeshLib::CDenseMatrix::CDenseMatrix ( int  row,
int  col 
) [inline]

Definition at line 50 of file densematrix.h.

                {
                        m_row = row;
                        m_col = col;
                        
                        m_ptr = new double*[m_row];
                        assert( m_ptr );

                        for( int i = 0 ; i < m_row ; i ++ )
                        {
                                m_ptr[i] = new double[m_col];
                                assert( m_ptr[i] );
                        };

                        reset();
                };

Here is the call graph for this function:

MeshLib::CDenseMatrix::~CDenseMatrix (  )  [inline]

Definition at line 67 of file densematrix.h.

                {
                        for( int i = 0 ; i < m_row ; i ++ )
                        {
                                delete m_ptr[i];
                        };

                        delete m_ptr;
                };


Member Function Documentation

int MeshLib::CDenseMatrix::col (  )  [inline]

Definition at line 84 of file densematrix.h.

{ return m_col; };

void MeshLib::CDenseMatrix::Gram_Schmidt_Orghonomralization (  )  [inline]

Definition at line 95 of file densematrix.h.

{
        for( int i = 0; i < m_row; i ++ )
        {
                for( int j = 0; j < i; j ++ )
                {
                        double inner = _inner_product( m_ptr[i], m_ptr[j], m_col );
                        
                        for( int k = 0; k < m_col; k ++ )
                        {
                                m_ptr[i][k] = m_ptr[i][k] - m_ptr[j][k] * inner; 
                        }
                }

                _normalize( m_ptr[i], m_col );
                if( i % 150 == 0 )
                        printf("%d/%d\n", i, m_row );

        };
};

Here is the call graph for this function:

double* MeshLib::CDenseMatrix::operator[] ( int  idx  )  [inline]

Definition at line 77 of file densematrix.h.

{ assert(0<= idx && idx < m_row ); return m_ptr[idx]; };

void MeshLib::CDenseMatrix::reset (  )  [inline]

Definition at line 116 of file densematrix.h.

{
        for( int i = 0; i < m_row; i ++ )
        {
                for( int j = 0; j < m_col; j ++ )
                {
                                m_ptr[i][j] = 0; 
                }
        };
};

Here is the caller graph for this function:

int MeshLib::CDenseMatrix::row (  )  [inline]

Definition at line 83 of file densematrix.h.

{ return m_row; };


Member Data Documentation

Definition at line 89 of file densematrix.h.

double** MeshLib::CDenseMatrix::m_ptr [protected]

Definition at line 91 of file densematrix.h.

Definition at line 84 of file densematrix.h.


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