VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols > Class Template Reference

#include <vnl_matrix_fixed.h>

List of all members.


Detailed Description

template<class T, unsigned int num_rows, unsigned int num_cols>
class VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >

Fixed size, stack-stored, space-efficient matrix.

vnl_matrix_fixed is a fixed-length, stack storage vector. It has the same storage size as a C-style array. It is not related via inheritance to vnl_matrix. However, it can be converted cheaply to a vnl_matrix_ref.

Read the overview documentation of vnl_vector_fixed. The text there applies here.

Definition at line 109 of file vnl_matrix_fixed.h.


Public Types

typedef vnl_matrix_fixed<
T, num_rows, num_cols > 
self
typedef unsigned int size_type
typedef vnl_c_vector< T
>::abs_t 
abs_t
 Type def for norms.
typedef T element_type
typedef T * iterator
 Iterators.
typedef T const * const_iterator
 Const iterators.

Public Member Functions

 vnl_matrix_fixed ()
 Construct an empty num_rows*num_cols matrix.
 vnl_matrix_fixed (unsigned n, unsigned m)
 Construct an empty num_rows*num_cols matrix.
 vnl_matrix_fixed (T value)
 Construct an m*n matrix and fill with value.
 vnl_matrix_fixed (const T *datablck)
 Construct an m*n Matrix and copy data into it row-wise.
 vnl_matrix_fixed (const vnl_matrix_fixed &rhs)
 Construct an m*n Matrix and copy rhs into it.
 vnl_matrix_fixed (const vnl_matrix< T > &rhs)
 Construct an m*n Matrix and copy rhs into it.
 ~vnl_matrix_fixed ()
vnl_matrix_fixed & operator= (T const &v)
 Set all elements to value v.
vnl_matrix_fixed & operator= (const vnl_matrix< T > &rhs)
 Copy a vnl_matrix into this.
vnl_matrix_fixed & operator= (const vnl_matrix_fixed &rhs)
 Copy another vnl_matrix_fixed<T,m,n> into this.
unsigned rows () const
 Return number of rows.
unsigned columns () const
 Return number of columns.
unsigned cols () const
 Return number of columns.
unsigned size () const
 Return number of elements.
void put (unsigned r, unsigned c, T const &v)
 set element.
get (unsigned r, unsigned c) const
 get element.
T * operator[] (unsigned r)
 return pointer to given row.
T const * operator[] (unsigned r) const
 return pointer to given row.
T & operator() (unsigned r, unsigned c)
 Access an element for reading or writing.
T const & operator() (unsigned r, unsigned c) const
 Access an element for reading.
void fill (T)
 Set all elements of matrix to specified value.
void fill_diagonal (T)
 Set all diagonal elements of matrix to specified value.
void copy_in (T const *)
 Fill (laminate) this matrix with the given data.
void set (T const *d)
 Fill (laminate) this matrix with the given data.
void copy_out (T *) const
 Fill the given array with this matrix.
void inplace_transpose ()
 Transpose this matrix efficiently, if it is a square matrix.
vnl_matrix_fixed & operator+= (T s)
 Add s to each element of lhs matrix in situ.
vnl_matrix_fixed & operator-= (T s)
 Subtract s from each element of lhs matrix in situ.
vnl_matrix_fixed & operator *= (T s)
vnl_matrix_fixed & operator/= (T s)
vnl_matrix_fixed & operator+= (vnl_matrix_fixed const &m)
vnl_matrix_fixed & operator+= (vnl_matrix< T > const &m)
vnl_matrix_fixed & operator-= (vnl_matrix_fixed const &m)
vnl_matrix_fixed & operator-= (vnl_matrix< T > const &m)
vnl_matrix_fixed operator- () const
 Negate all elements of matrix.
vnl_matrix_fixed & operator *= (vnl_matrix_fixed< T, num_cols, num_cols > const &s)
vnl_matrix_fixed apply (T(*f)(T)) const
 Make a new matrix by applying function to each element.
vnl_matrix_fixed apply (T(*f)(T const &)) const
 Make a new matrix by applying function to each element.
vnl_matrix_fixed< T, num_cols,
num_rows > 
transpose () const
 Return transpose.
vnl_matrix_fixed< T, num_cols,
num_rows > 
conjugate_transpose () const
 Return conjugate transpose.
vnl_matrix_fixed & update (vnl_matrix< T > const &, unsigned top=0, unsigned left=0)
 Set values of this matrix to those of M, starting at [top,left].
void set_column (unsigned i, T const *v)
 Set the elements of the i'th column to v[j] (No bounds checking).
void set_column (unsigned i, T value)
 Set the elements of the i'th column to value.
void set_column (unsigned j, vnl_vector< T > const &v)
 Set j-th column to v.
void set_column (unsigned j, vnl_vector_fixed< T, num_rows > const &v)
 Set j-th column to v.
void set_columns (unsigned starting_column, vnl_matrix< T > const &M)
 Set columns to those in M, starting at starting_column.
void set_row (unsigned i, T const *v)
 Set the elements of the i'th row to v[j] (No bounds checking).
void set_row (unsigned i, T value)
 Set the elements of the i'th row to value.
void set_row (unsigned i, vnl_vector< T > const &)
 Set the i-th row.
void set_row (unsigned i, vnl_vector_fixed< T, num_cols > const &)
 Set the i-th row.
vnl_matrix< T > extract (unsigned r, unsigned c, unsigned top=0, unsigned left=0) const
 Extract a sub-matrix of size r x c, starting at (top,left).
void extract (vnl_matrix< T > &sub_matrix, unsigned top=0, unsigned left=0) const
 Extract a sub-matrix starting at (top,left).
vnl_vector_fixed< T, num_cols > get_row (unsigned row) const
 Get a vector equal to the given row.
vnl_vector_fixed< T, num_rows > get_column (unsigned col) const
 Get a vector equal to the given column.
vnl_matrix< T > get_n_rows (unsigned rowstart, unsigned n) const
 Get n rows beginning at rowstart.
vnl_matrix< T > get_n_columns (unsigned colstart, unsigned n) const
 Get n columns beginning at colstart.
void set_identity ()
 Set this matrix to an identity matrix.
void flipud ()
 Reverse order of rows.
void fliplr ()
 Reverse order of columns.
void normalize_rows ()
 Normalize each row so it is a unit vector.
void normalize_columns ()
 Normalize each column so it is a unit vector.
void scale_row (unsigned row, T value)
 Scale elements in given row by a factor of T.
void scale_column (unsigned col, T value)
 Scale elements in given column by a factor of T.
abs_t array_one_norm () const
 Return sum of absolute values of elements.
abs_t array_two_norm () const
 Return square root of sum of squared absolute element values.
abs_t array_inf_norm () const
 Return largest absolute element value.
abs_t absolute_value_sum () const
 Return sum of absolute values of elements.
abs_t absolute_value_max () const
 Return largest absolute value.
abs_t operator_one_norm () const
abs_t operator_inf_norm () const
abs_t frobenius_norm () const
 Return Frobenius norm of matrix (sqrt of sum of squares of its elements).
abs_t fro_norm () const
 Return Frobenius norm of matrix (sqrt of sum of squares of its elements).
abs_t rms () const
 Return RMS of all elements.
min_value () const
 Return minimum value of elements.
max_value () const
 Return maximum value of elements.
unsigned arg_min () const
 Return location of minimum value of elements.
unsigned arg_max () const
 Return location of maximum value of elements.
mean () const
 Return mean of all matrix elements.
bool empty () const
 Return true iff the size is zero.
bool is_identity () const
 Return true if all elements equal to identity.
bool is_identity (double tol) const
 Return true if all elements equal to identity, within given tolerance.
bool is_zero () const
 Return true if all elements equal to zero.
bool is_zero (double tol) const
 Return true if all elements equal to zero, within given tolerance.
bool is_finite () const
 Return true if finite.
bool has_nans () const
 Return true if matrix contains NaNs.
void assert_size (unsigned nr_rows, unsigned nr_cols) const
 abort if size is not as expected.
void assert_finite () const
 abort if matrix contains any INFs or NANs.
bool read_ascii (vcl_istream &s)
T const * data_block () const
 Access the contiguous block storing the elements in the matrix row-wise. O(1).
T * data_block ()
 Access the contiguous block storing the elements in the matrix row-wise. O(1).
vnl_matrix_ref< T > as_ref ()
 Explicit conversion to a vnl_matrix_ref.
const vnl_matrix_ref< T > as_ref () const
 Explicit conversion to a vnl_matrix_ref.
 operator const vnl_matrix_ref () const
 Cheap conversion to vnl_matrix_ref.
const vnl_matrix< T > as_matrix () const
 Convert to a vnl_matrix.
iterator begin ()
 Iterator pointing to start of data.
iterator end ()
 Iterator pointing to element beyond end of data.
const_iterator begin () const
 Iterator pointing to start of data.
const_iterator end () const
 Iterator pointing to element beyond end of data.
bool operator_eq (vnl_matrix_fixed const &rhs) const
 Return true if *this == rhs.
bool operator== (vnl_matrix< T > const &that) const
 Equality operator.
bool operator!= (vnl_matrix< T > const &that) const
 Inequality operator.
void print (vcl_ostream &os) const
 Print matrix to os in some hopefully sensible format.

Static Public Member Functions

static void add (const T *a, const T *b, T *r)
static void add (const T *a, T b, T *r)
static void sub (const T *a, const T *b, T *r)
static void sub (const T *a, T b, T *r)
static void sub (T a, const T *b, T *r)
static void mul (const T *a, const T *b, T *r)
static void mul (const T *a, T b, T *r)
static void div (const T *a, const T *b, T *r)
static void div (const T *a, T b, T *r)
static bool equal (const T *a, const T *b)

Private Member Functions

void assert_finite_internal () const
void assert_size_internal (unsigned, unsigned) const

Private Attributes

data_ [num_rows][num_cols]

Member Typedef Documentation

template<class T, unsigned int num_rows, unsigned int num_cols>
typedef vnl_matrix_fixed<T,num_rows,num_cols> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::self

Definition at line 112 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
typedef unsigned int VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::size_type

Definition at line 113 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
typedef vnl_c_vector<T>::abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::abs_t

Type def for norms.

Definition at line 459 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
typedef T VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::element_type

Definition at line 596 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
typedef T* VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::iterator

Iterators.

Definition at line 599 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
typedef T const* VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::const_iterator

Const iterators.

Definition at line 606 of file vnl_matrix_fixed.h.


Constructor & Destructor Documentation

template<class T, unsigned int num_rows, unsigned int num_cols>
VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::~vnl_matrix_fixed (  )  [inline]

Definition at line 168 of file vnl_matrix_fixed.h.


Member Function Documentation

template<class T, unsigned int num_rows, unsigned int num_cols>
VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::vnl_matrix_fixed (  )  [inline]

Construct an empty num_rows*num_cols matrix.

Definition at line 121 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::vnl_matrix_fixed ( unsigned  n,
unsigned  m 
) [inline]

Construct an empty num_rows*num_cols matrix.

The sole purpose of this constructor is to match the interface of vnl_matrix, so that algorithms can template over the matrix type itself. It is illegal to call this constructor without n==num_rows and m==num_cols.

Definition at line 129 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::vnl_matrix_fixed ( value  )  [inline, explicit]

Construct an m*n matrix and fill with value.

Definition at line 135 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::vnl_matrix_fixed ( const T *  datablck  )  [inline, explicit]

Construct an m*n Matrix and copy data into it row-wise.

Definition at line 144 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::vnl_matrix_fixed ( const vnl_matrix_fixed &  rhs  )  [inline]

Construct an m*n Matrix and copy rhs into it.

Abort if rhs is not the same size.

Definition at line 151 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::vnl_matrix_fixed ( const vnl_matrix< T > &  rhs  )  [inline]

Construct an m*n Matrix and copy rhs into it.

Abort if rhs is not the same size.

Definition at line 158 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator= ( T const &  v  )  [inline]

Set all elements to value v.

Complexity $O(r.c)$

Definition at line 172 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator= ( const vnl_matrix< T > &  rhs  )  [inline]

Copy a vnl_matrix into this.

Abort if rhs is not the same size.

Definition at line 176 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator= ( const vnl_matrix_fixed &  rhs  )  [inline]

Copy another vnl_matrix_fixed<T,m,n> into this.

Definition at line 184 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
unsigned VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::rows (  )  const [inline]

Return number of rows.

Definition at line 193 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
unsigned VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::columns (  )  const [inline]

Return number of columns.

A synonym for cols()

Definition at line 197 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
unsigned VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::cols (  )  const [inline]

Return number of columns.

A synonym for columns()

Definition at line 201 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
unsigned VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::size (  )  const [inline]

Return number of elements.

This equals rows() * cols()

Definition at line 205 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::put ( unsigned  r,
unsigned  c,
T const &  v 
) [inline]

set element.

Definition at line 208 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
T VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::get ( unsigned  r,
unsigned  c 
) const [inline]

get element.

Definition at line 211 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
T* VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator[] ( unsigned  r  )  [inline]

return pointer to given row.

No boundary checking here.

Definition at line 215 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
T const* VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator[] ( unsigned  r  )  const [inline]

return pointer to given row.

No boundary checking here.

Definition at line 219 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
T& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator() ( unsigned  r,
unsigned  c 
) [inline]

Access an element for reading or writing.

There are assert style boundary checks - define NDEBUG to turn them off.

Definition at line 223 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
T const& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator() ( unsigned  r,
unsigned  c 
) const [inline]

Access an element for reading.

There are assert style boundary checks - define NDEBUG to turn them off.

Definition at line 234 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::fill (  ) 

Set all elements of matrix to specified value.

Complexity $O(r.c)$

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::fill_diagonal (  ) 

Set all diagonal elements of matrix to specified value.

Complexity $O(\min(r,c))$

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::copy_in ( T const *   ) 

Fill (laminate) this matrix with the given data.

We assume that p points to a contiguous rows*cols array, stored rowwise.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set ( T const *  d  )  [inline]

Fill (laminate) this matrix with the given data.

A synonym for copy_in()

Definition at line 259 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::copy_out ( T *   )  const

Fill the given array with this matrix.

We assume that p points to a contiguous rows*cols array, stored rowwise. No bounds checking on the array

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::inplace_transpose (  ) 

Transpose this matrix efficiently, if it is a square matrix.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator+= ( s  )  [inline]

Add s to each element of lhs matrix in situ.

Definition at line 276 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator-= ( s  )  [inline]

Subtract s from each element of lhs matrix in situ.

Definition at line 282 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator *= ( s  )  [inline]

Definition at line 288 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator/= ( s  )  [inline]

Definition at line 294 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator+= ( vnl_matrix_fixed const &  m  )  [inline]

Definition at line 300 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator+= ( vnl_matrix< T > const &  m  )  [inline]

Definition at line 306 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator-= ( vnl_matrix_fixed const &  m  )  [inline]

Definition at line 313 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator-= ( vnl_matrix< T > const &  m  )  [inline]

Definition at line 319 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator- (  )  const [inline]

Negate all elements of matrix.

Definition at line 327 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator *= ( vnl_matrix_fixed< T, num_cols, num_cols > const &  s  )  [inline]

Definition at line 335 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::apply ( T(*)(T)  f  )  const

Make a new matrix by applying function to each element.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::apply ( T(*)(T const &)  f  )  const

Make a new matrix by applying function to each element.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed<T,num_cols,num_rows> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::transpose (  )  const

Return transpose.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed<T,num_cols,num_rows> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::conjugate_transpose (  )  const

Return conjugate transpose.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::update ( vnl_matrix< T > const &  ,
unsigned  top = 0,
unsigned  left = 0 
)

Set values of this matrix to those of M, starting at [top,left].

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set_column ( unsigned  i,
T const *  v 
)

Set the elements of the i'th column to v[j] (No bounds checking).

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set_column ( unsigned  i,
value 
)

Set the elements of the i'th column to value.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set_column ( unsigned  j,
vnl_vector< T > const &  v 
)

Set j-th column to v.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set_column ( unsigned  j,
vnl_vector_fixed< T, num_rows > const &  v 
)

Set j-th column to v.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set_columns ( unsigned  starting_column,
vnl_matrix< T > const &  M 
)

Set columns to those in M, starting at starting_column.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set_row ( unsigned  i,
T const *  v 
)

Set the elements of the i'th row to v[j] (No bounds checking).

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set_row ( unsigned  i,
value 
)

Set the elements of the i'th row to value.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set_row ( unsigned  i,
vnl_vector< T > const &   
)

Set the i-th row.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set_row ( unsigned  i,
vnl_vector_fixed< T, num_cols > const &   
)

Set the i-th row.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix<T> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::extract ( unsigned  r,
unsigned  c,
unsigned  top = 0,
unsigned  left = 0 
) const

Extract a sub-matrix of size r x c, starting at (top,left).

Thus it contains elements [top,top+r-1][left,left+c-1]

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::extract ( vnl_matrix< T > &  sub_matrix,
unsigned  top = 0,
unsigned  left = 0 
) const

Extract a sub-matrix starting at (top,left).

The output is stored in sub_matrix, and it should have the required size on entry. Thus the result will contain elements [top,top+sub_matrix.rows()-1][left,left+sub_matrix.cols()-1]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_vector_fixed<T,num_cols> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::get_row ( unsigned  row  )  const

Get a vector equal to the given row.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_vector_fixed<T,num_rows> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::get_column ( unsigned  col  )  const

Get a vector equal to the given column.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix<T> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::get_n_rows ( unsigned  rowstart,
unsigned  n 
) const

Get n rows beginning at rowstart.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix<T> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::get_n_columns ( unsigned  colstart,
unsigned  n 
) const

Get n columns beginning at colstart.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::set_identity (  ) 

Set this matrix to an identity matrix.

Abort if the matrix is not square

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::flipud (  ) 

Reverse order of rows.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::fliplr (  ) 

Reverse order of columns.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::normalize_rows (  ) 

Normalize each row so it is a unit vector.

Zero rows are ignored

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::normalize_columns (  ) 

Normalize each column so it is a unit vector.

Zero columns are ignored

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::scale_row ( unsigned  row,
value 
)

Scale elements in given row by a factor of T.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::scale_column ( unsigned  col,
value 
)

Scale elements in given column by a factor of T.

template<class T, unsigned int num_rows, unsigned int num_cols>
abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::array_one_norm (  )  const [inline]

Return sum of absolute values of elements.

Definition at line 462 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::array_two_norm (  )  const [inline]

Return square root of sum of squared absolute element values.

Definition at line 465 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::array_inf_norm (  )  const [inline]

Return largest absolute element value.

Definition at line 468 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::absolute_value_sum (  )  const [inline]

Return sum of absolute values of elements.

Definition at line 471 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::absolute_value_max (  )  const [inline]

Return largest absolute value.

Definition at line 474 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator_one_norm (  )  const

template<class T, unsigned int num_rows, unsigned int num_cols>
abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator_inf_norm (  )  const

template<class T, unsigned int num_rows, unsigned int num_cols>
abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::frobenius_norm (  )  const [inline]

Return Frobenius norm of matrix (sqrt of sum of squares of its elements).

Definition at line 483 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::fro_norm (  )  const [inline]

Return Frobenius norm of matrix (sqrt of sum of squares of its elements).

Definition at line 486 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
abs_t VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::rms (  )  const [inline]

Return RMS of all elements.

Definition at line 489 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
T VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::min_value (  )  const [inline]

Return minimum value of elements.

Definition at line 492 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
T VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::max_value (  )  const [inline]

Return maximum value of elements.

Definition at line 495 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
unsigned VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::arg_min (  )  const [inline]

Return location of minimum value of elements.

Definition at line 498 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
unsigned VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::arg_max (  )  const [inline]

Return location of maximum value of elements.

Definition at line 501 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
T VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::mean (  )  const [inline]

Return mean of all matrix elements.

Definition at line 504 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::empty (  )  const [inline]

Return true iff the size is zero.

Definition at line 509 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::is_identity (  )  const

Return true if all elements equal to identity.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::is_identity ( double  tol  )  const

Return true if all elements equal to identity, within given tolerance.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::is_zero (  )  const

Return true if all elements equal to zero.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::is_zero ( double  tol  )  const

Return true if all elements equal to zero, within given tolerance.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::is_finite (  )  const

Return true if finite.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::has_nans (  )  const

Return true if matrix contains NaNs.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::assert_size ( unsigned  nr_rows,
unsigned  nr_cols 
) const [inline]

abort if size is not as expected.

This function does or tests nothing if NDEBUG is defined

Definition at line 531 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::assert_finite (  )  const [inline]

abort if matrix contains any INFs or NANs.

This function does or tests nothing if NDEBUG is defined

Definition at line 540 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::read_ascii ( vcl_istream &  s  ) 

template<class T, unsigned int num_rows, unsigned int num_cols>
T const* VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::data_block (  )  const [inline]

Access the contiguous block storing the elements in the matrix row-wise. O(1).

1d array, row-major order.

Definition at line 556 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
T* VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::data_block (  )  [inline]

Access the contiguous block storing the elements in the matrix row-wise. O(1).

1d array, row-major order.

Definition at line 560 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_ref<T> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::as_ref (  )  [inline]

Explicit conversion to a vnl_matrix_ref.

This is a cheap conversion for those functions that have an interface for vnl_matrix but not for vnl_matrix_fixed. There is also a conversion operator that should work most of the time.

See also:
vnl_matrix_ref::non_const

Definition at line 576 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
const vnl_matrix_ref<T> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::as_ref (  )  const [inline]

Explicit conversion to a vnl_matrix_ref.

This is a cheap conversion for those functions that have an interface for vnl_matrix but not for vnl_matrix_fixed. There is also a conversion operator that should work most of the time.

See also:
vnl_matrix_ref::non_const

Definition at line 583 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator const vnl_matrix_ref (  )  const [inline]

Cheap conversion to vnl_matrix_ref.

Sometimes, such as with templated functions, the compiler cannot use this user-defined conversion. For those cases, use the explicit as_ref() method instead.

Definition at line 589 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
const vnl_matrix<T> VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::as_matrix (  )  const [inline]

Convert to a vnl_matrix.

Definition at line 592 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
iterator VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::begin (  )  [inline]

Iterator pointing to start of data.

Definition at line 601 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
iterator VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::end (  )  [inline]

Iterator pointing to element beyond end of data.

Definition at line 603 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
const_iterator VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::begin (  )  const [inline]

Iterator pointing to start of data.

Definition at line 608 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
const_iterator VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::end (  )  const [inline]

Iterator pointing to element beyond end of data.

Definition at line 610 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator_eq ( vnl_matrix_fixed const &  rhs  )  const [inline]

Return true if *this == rhs.

Definition at line 615 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator== ( vnl_matrix< T > const &  that  )  const [inline]

Equality operator.

Definition at line 621 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::operator!= ( vnl_matrix< T > const &  that  )  const [inline]

Inequality operator.

Definition at line 624 of file vnl_matrix_fixed.h.

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::print ( vcl_ostream &  os  )  const

Print matrix to os in some hopefully sensible format.

template<class T, unsigned int num_rows, unsigned int num_cols>
static void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::add ( const T *  a,
const T *  b,
T *  r 
) [static]

template<class T, unsigned int num_rows, unsigned int num_cols>
static void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::add ( const T *  a,
b,
T *  r 
) [static]

template<class T, unsigned int num_rows, unsigned int num_cols>
static void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::sub ( const T *  a,
const T *  b,
T *  r 
) [static]

template<class T, unsigned int num_rows, unsigned int num_cols>
static void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::sub ( const T *  a,
b,
T *  r 
) [static]

template<class T, unsigned int num_rows, unsigned int num_cols>
static void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::sub ( a,
const T *  b,
T *  r 
) [static]

template<class T, unsigned int num_rows, unsigned int num_cols>
static void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::mul ( const T *  a,
const T *  b,
T *  r 
) [static]

template<class T, unsigned int num_rows, unsigned int num_cols>
static void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::mul ( const T *  a,
b,
T *  r 
) [static]

template<class T, unsigned int num_rows, unsigned int num_cols>
static void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::div ( const T *  a,
const T *  b,
T *  r 
) [static]

template<class T, unsigned int num_rows, unsigned int num_cols>
static void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::div ( const T *  a,
b,
T *  r 
) [static]

template<class T, unsigned int num_rows, unsigned int num_cols>
static bool VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::equal ( const T *  a,
const T *  b 
) [static]

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::assert_finite_internal (  )  const [private]

template<class T, unsigned int num_rows, unsigned int num_cols>
void VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::assert_size_internal ( unsigned  ,
unsigned   
) const [private]


Member Data Documentation

template<class T, unsigned int num_rows, unsigned int num_cols>
T VNL_MATRIX_FIXED_VCL60_WORKAROUND< T, num_rows, num_cols >::data_[num_rows][num_cols] [private]

Definition at line 116 of file vnl_matrix_fixed.h.


The documentation for this class was generated from the following file:
Generated on Mon Mar 8 05:06:52 2010 for core/vnl by  doxygen 1.5.1