matrix< T > Class Template Reference

Boost Matrix class. More...

#include <doc.H>

List of all members.

Public Types

typedef size_t size_type
 Type for representing size values.

Public Member Functions

 matrix ()
 Creates empty object.
 matrix (size_type size1, size_type size2)
 Creates object w/ size1 rows, size 2 columns.
 matrix (const matrix &m)
 Copy constructor.
void resize (size_type size1, size_type size2)
 Resizes object to size1 rows, size 2 columns.
size_type size1 () const
 Returns number of rows.
size_type size2 () const
 Returns number of columns.
void clear ()
 Sets all values to 0; keeps size unchanged.
void swap (matrix &m)
 Swaps value of this object and that of the matrix m.
const T & operator() (size_type i, size_type j) const
 Returns value of element in i-th row and j-th column (C++ only).
T & operator() (size_type i, size_type j)
 Returns reference to element in i-th row and j-th column (C++ only).
get (size_type i, size_type j) const
 Returns value of element in i-th row and j-th column, if elements are a primitive type, e.g., int, double, etc.
T & get (size_type i, size_type j)
 Returns reference to element in i-th row and j-th column, if elements are non-primitive type, i.e., objects (non-C++ only).
void set (size_type i, size_type j, const T &val)
 Sets value of element in i-th row and j-th column to val (non-C++ only).


Detailed Description

template<typename T>
class matrix< T >

Boost Matrix class.

Member Typedef Documentation

template<typename T>
typedef size_t matrix< T >::size_type

Type for representing size values.


Constructor & Destructor Documentation

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

Creates empty object.

template<typename T>
matrix< T >::matrix ( size_type  size1,
size_type  size2 
)

Creates object w/ size1 rows, size 2 columns.

Matrix values are uninitialized.

template<typename T>
matrix< T >::matrix ( const matrix< T > &  m  ) 

Copy constructor.


Member Function Documentation

template<typename T>
void matrix< T >::resize ( size_type  size1,
size_type  size2 
)

Resizes object to size1 rows, size 2 columns.

Existing values are preserved, but new values are uninitialized.

template<typename T>
size_type matrix< T >::size1 (  )  const

Returns number of rows.

template<typename T>
size_type matrix< T >::size2 (  )  const

Returns number of columns.

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

Sets all values to 0; keeps size unchanged.

template<typename T>
void matrix< T >::swap ( matrix< T > &  m  ) 

Swaps value of this object and that of the matrix m.

template<typename T>
const T& matrix< T >::operator() ( size_type  i,
size_type  j 
) const

Returns value of element in i-th row and j-th column (C++ only).

For example, for a matrix m, you can use a syntax like m(2, 3) to access an element. Rows and columns are numbered starting from 0.

Note:
Only available in C++.

template<typename T>
T& matrix< T >::operator() ( size_type  i,
size_type  j 
)

Returns reference to element in i-th row and j-th column (C++ only).

For example, for a matrix m, you can use a syntax like m(3, 0) = 4 to assign an element. Rows and columns are numbered starting from 0.

Note:
Only available in C++.

template<typename T>
T matrix< T >::get ( size_type  i,
size_type  j 
) const

Returns value of element in i-th row and j-th column, if elements are a primitive type, e.g., int, double, etc.

(non-C++ only). Rows and columns are numbered starting from 0.

Note:
Only available in Java, Py, etc.

template<typename T>
T& matrix< T >::get ( size_type  i,
size_type  j 
)

Returns reference to element in i-th row and j-th column, if elements are non-primitive type, i.e., objects (non-C++ only).

Rows and columns are numbered starting from 0.

Note:
Only available in Java, Py, etc.

template<typename T>
void matrix< T >::set ( size_type  i,
size_type  j,
const T &  val 
)

Sets value of element in i-th row and j-th column to val (non-C++ only).

Rows and columns are numbered starting from 0.

Note:
Only available in Java, Py, etc.


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

Generated on Thu Nov 5 09:26:37 2009 for asr_lib by  doxygen 1.5.5