Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

vnl_matrix_ref< T > Class Template Reference

#include <vnl_matrix_ref.h>

Inheritance diagram for vnl_matrix_ref:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 vnl_matrix_ref (int m, int n, T *datablck)
 ~vnl_matrix_ref ()

Detailed Description

template<class T>
class vnl_matrix_ref< T >

vnl_matrix reference to user-supplied storage. vnl_matrix_ref is a vnl_matrix for which the data space has been supplied externally. This is useful for two main tasks: (a) Treating some row-based "C" matrix as a vnl_matrix in order to perform vnl_matrix operations on it. (b) Declaring a vnl_matrix that uses stack-based storage for the matrix (See MatrixFixed). Note however that the rows are still allocated on the heap. See MatrixFixed for a fully stack-based solution.

This is a dangerous class. I believe that I've covered all the bases, but it's really only intended for interfacing with the Fortran routines.

The big warning is that returning a vnl_matrix_ref pointer will free non-heap memory if deleted through a vnl_matrix pointer. This should be very difficult though, as vnl_matrix_ref objects may not be constructed using operator new, and are therefore unlikely to be the unwitting subject of an operator delete.

Definition at line 42 of file vnl_matrix_ref.h.


Constructor & Destructor Documentation

template<class T>
vnl_matrix_ref< T >::vnl_matrix_ref int    m,
int    n,
T *    datablck
[inline]
 

Definition at line 47 of file vnl_matrix_ref.h.

template<class T>
vnl_matrix_ref< T >::~vnl_matrix_ref   [inline]
 

Definition at line 54 of file vnl_matrix_ref.h.


The documentation for this class was generated from the following file:
Generated at Fri May 21 01:17:16 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000