vnl_file_matrix< T > Class Template Reference

#include <vnl_file_matrix.h>

Inheritance diagram for vnl_file_matrix< T >:

vnl_matrix< T > List of all members.

Detailed Description

template<class T>
class vnl_file_matrix< T >

Class to load a matrix from a file.

Definition at line 23 of file vnl_file_matrix.h.


Public Types

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_file_matrix (char const *filename)
 Load matrix from filename.
 operator safe_bool () const
bool operator! () const
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 &)
 set element with boundary checks if error checking is on.
get (unsigned r, unsigned c) const
 get element with boundary checks if error checking is on.
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 const &)
 Set all elements of matrix to specified value.
void fill_diagonal (T const &)
 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.
vnl_matrix< T > & operator+= (T value)
 Add rhs to each element of lhs matrix in situ.
vnl_matrix< T > & operator+= (vnl_matrix< T > const &)
 Add rhs to lhs matrix in situ.
vnl_matrix< T > & operator-= (T value)
 Subtract rhs from each element of lhs matrix in situ.
vnl_matrix< T > & operator-= (vnl_matrix< T > const &)
 Subtract rhs from lhs matrix in situ.
vnl_matrix< T > & operator *= (T value)
 Scalar multiplication in situ of lhs matrix by rhs.
vnl_matrix< T > & operator *= (vnl_matrix< T > const &rhs)
 Multiply lhs matrix in situ by rhs.
vnl_matrix< T > & operator/= (T value)
 Scalar division of lhs matrix in situ by rhs.
vnl_matrix< T > operator- () const
 Negate all elements of matrix.
vnl_matrix< T > operator- (T const &v) const
 Subtract rhs from each element of lhs matrix and return result in new matrix.
vnl_matrix< T > operator- (vnl_matrix< T > const &rhs) const
 Matrix subtract rhs from lhs and return result in new matrix.
vnl_matrix< T > operator+ (T const &v) const
 Add rhs to each element of lhs matrix and return result in new matrix.
vnl_matrix< T > operator+ (vnl_matrix< T > const &rhs) const
 Matrix add rhs to lhs matrix and return result in new matrix.
vnl_matrix< T > operator * (T const &v) const
 Scalar multiplication of lhs matrix by rhs and return result in new matrix.
vnl_matrix< T > operator * (vnl_matrix< T > const &rhs) const
 Matrix multiply lhs by rhs matrix and return result in new matrix.
vnl_matrix< T > operator/ (T const &v) const
 Scalar division of lhs matrix by rhs and return result in new matrix.
vnl_matrix< T > apply (T(*f)(T)) const
 Make a new matrix by applying function to each element.
vnl_matrix< T > apply (T(*f)(T const &)) const
 Make a new matrix by applying function to each element.
vnl_matrix< T > transpose () const
 Return transpose.
vnl_matrix< T > conjugate_transpose () const
 Return conjugate transpose.
vnl_matrix< T > & 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_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.
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< T > get_row (unsigned r) const
 Get a vector equal to the given row.
vnl_vector< T > get_column (unsigned c) 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 inplace_transpose ()
 Transpose this matrix efficiently.
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.
void swap (vnl_matrix< T > &that)
 Swap this matrix with that matrix.
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.
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 r, unsigned c) 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)
 Read a vnl_matrix from an ascii vcl_istream.
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).
T const *const * data_array () const
 Access the 2D array, so that elements can be accessed with array[row][col] directly.
T ** data_array ()
 Access the 2D array, so that elements can be accessed with array[row][col] directly.
iterator begin ()
 Iterator pointing to start of data.
const_iterator begin () const
 Iterator pointing to start of data.
iterator end ()
 Iterator pointing to element beyond end of data.
const_iterator end () const
 Iterator pointing to element beyond end of data.
vnl_matrix< T > const & as_ref () const
 Return a reference to this.
vnl_matrix< T > & as_ref ()
 Return a reference to this.
bool operator_eq (vnl_matrix< T > 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.
void clear ()
 Make the matrix as if it had been default-constructed.
bool set_size (unsigned r, unsigned c)
 Resize to r rows by c columns. Old data lost.

Static Public Member Functions

static vnl_matrix< T > read (vcl_istream &s)
 Read a vnl_matrix from an ascii vcl_istream, automatically determining file size if the input matrix has zero size.

Protected Member Functions

void assert_size_internal (unsigned r, unsigned c) const
 Abort unless M has the given size.
void assert_finite_internal () const
 Abort if any element of M is inf or nan.
void destroy ()
 Delete data.

Static Protected Member Functions

static void inline_function_tickler ()

Protected Attributes

unsigned num_rows
unsigned num_cols
T ** data

Private Attributes

 VCL_SAFE_BOOL_DEFINE
bool ok_

Related Functions

(Note that these are not member functions.)

vnl_matrix< T > operator- (vnl_matrix< T > const &A, vnl_diag_matrix< T > const &D)
 Subtract a vnl_diag_matrix from a vnl_matrix. n adds, mn copies.
vnl_matrix< T > operator- (vnl_diag_matrix< T > const &D, vnl_matrix< T > const &A)
 Subtract a vnl_matrix from a vnl_diag_matrix. n adds, mn copies.
vnl_matrix< T > operator+ (vnl_matrix< T > const &A, vnl_diag_matrix< T > const &D)
 Add a vnl_diag_matrix to a vnl_matrix. n adds, mn copies.
vnl_matrix< T > operator+ (vnl_diag_matrix< T > const &D, vnl_matrix< T > const &A)
 Add a vnl_matrix to a vnl_diag_matrix. n adds, mn copies.
vnl_matrix< T > operator+ (T const &value, vnl_matrix< T > const &m)
vnl_matrix< T > operator * (vnl_matrix< T > const &A, vnl_diag_matrix< T > const &D)
 Multiply a vnl_matrix by a vnl_diag_matrix. Just scales the columns - mn flops.
vnl_matrix< T > operator * (vnl_diag_matrix< T > const &D, vnl_matrix< T > const &A)
 Multiply a vnl_diag_matrix by a vnl_matrix. Just scales the rows - mn flops.
vnl_matrix< T > operator * (T const &value, vnl_matrix< T > const &m)
vnl_vector< T > operator * (vnl_matrix< T > const &m, vnl_vector< T > const &v)
 multiply matrix and (column) vector. O(m*n).
void swap (vnl_matrix< T > &A, vnl_matrix< T > &B)
 Swap two matrices.
vnl_matrix< vcl_complex< T > > vnl_complexify (vnl_matrix< T > const &R)
 Return complexified version of real matrix R.
vnl_matrix< vcl_complex< T > > vnl_complexify (vnl_matrix< T > const &R, vnl_matrix< T > const &I)
 Return complex matrix R+j*I from two real matrices R and I.
vnl_det (vnl_matrix_fixed< T, 1, 1 > const &m)
 Determinant of small size matrices.
vnl_det (vnl_matrix_fixed< T, 2, 2 > const &m)
 Determinant of small size matrices.
vnl_det (vnl_matrix_fixed< T, 3, 3 > const &m)
 Determinant of small size matrices.
vnl_det (vnl_matrix_fixed< T, 4, 4 > const &m)
 Determinant of small size matrices.
vnl_matrix< T > vnl_imag (vnl_matrix< vcl_complex< T > > const &C)
 Matrix of imaginary parts of vnl_matrix<vcl_complex<T> >.
bool operator< (vnl_matrix< T > const &lhs, vnl_matrix< T > const &rhs)
 Define a complete ordering on vnl_matrix.
unsigned int vnl_rank (vnl_matrix< T > const &mat, vnl_rank_type=vnl_rank_both)
 Returns the rank of a matrix.
vnl_matrix< T > vnl_rank_row_reduce (vnl_matrix< T > const &mat, vnl_rank_pivot_type=vnl_rank_pivot_all)
 Row reduce a matrix.
vnl_matrix< T > vnl_rank_column_reduce (vnl_matrix< T > const &mat, vnl_rank_pivot_type=vnl_rank_pivot_all)
 Column reduce a matrix.
vnl_matrix< T > vnl_rank_row_column_reduce (vnl_matrix< T > const &mat, vnl_rank_pivot_type=vnl_rank_pivot_all)
 Row and column reduce a matrix.
vnl_matrix< T > vnl_real (vnl_matrix< vcl_complex< T > > const &C)
 Matrix of real parts of vnl_matrix<vcl_complex<T> >.
vnl_matrix< double > vnl_rotation_matrix (vnl_vector< double > const &axis)
 Returns an orthogonal 3x3 matrix which is a rotation about the axis, by an angle equal to ||axis||.
vnl_trace (vnl_matrix< T > const &M)
 Calculate trace of a matrix.

Member Typedef Documentation

template<class T>
typedef vnl_c_vector<T>::abs_t vnl_matrix< T >::abs_t [inherited]

Type def for norms.

Definition at line 370 of file vnl_matrix.h.

template<class T>
typedef T vnl_matrix< T >::element_type [inherited]

Definition at line 477 of file vnl_matrix.h.

template<class T>
typedef T* vnl_matrix< T >::iterator [inherited]

Iterators.

Definition at line 480 of file vnl_matrix.h.

template<class T>
typedef T const* vnl_matrix< T >::const_iterator [inherited]

Const iterators.

Definition at line 487 of file vnl_matrix.h.


Constructor & Destructor Documentation

template<class T>
vnl_file_matrix< T >::vnl_file_matrix ( char const *  filename  ) 

Load matrix from filename.

Definition at line 17 of file vnl_file_matrix.txx.


Member Function Documentation

template<class T>
vnl_file_matrix< T >::operator safe_bool (  )  const [inline]

Definition at line 29 of file vnl_file_matrix.h.

template<class T>
bool vnl_file_matrix< T >::operator! (  )  const [inline]

Definition at line 31 of file vnl_file_matrix.h.

template<class T>
unsigned vnl_matrix< T >::rows (  )  const [inline, inherited]

Return number of rows.

Definition at line 145 of file vnl_matrix.h.

template<class T>
unsigned vnl_matrix< T >::columns (  )  const [inline, inherited]

Return number of columns.

A synonym for cols()

Definition at line 149 of file vnl_matrix.h.

template<class T>
unsigned vnl_matrix< T >::cols (  )  const [inline, inherited]

Return number of columns.

A synonym for columns()

Definition at line 153 of file vnl_matrix.h.

template<class T>
unsigned vnl_matrix< T >::size (  )  const [inline, inherited]

Return number of elements.

This equals rows() * cols()

Definition at line 157 of file vnl_matrix.h.

template<class T>
void vnl_matrix< T >::put ( unsigned  row,
unsigned  column,
T const &  value 
) [inline, inherited]

set element with boundary checks if error checking is on.

Checks for valid range of indices.

Definition at line 586 of file vnl_matrix.h.

template<class T>
T vnl_matrix< T >::get ( unsigned  row,
unsigned  column 
) const [inline, inherited]

get element with boundary checks if error checking is on.

Checks for valid range of indices.

Definition at line 571 of file vnl_matrix.h.

template<class T>
T* vnl_matrix< T >::operator[] ( unsigned  r  )  [inline, inherited]

return pointer to given row.

No boundary checking here.

Definition at line 167 of file vnl_matrix.h.

template<class T>
T const* vnl_matrix< T >::operator[] ( unsigned  r  )  const [inline, inherited]

return pointer to given row.

No boundary checking here.

Definition at line 171 of file vnl_matrix.h.

template<class T>
T& vnl_matrix< T >::operator() ( unsigned  r,
unsigned  c 
) [inline, inherited]

Access an element for reading or writing.

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

Definition at line 175 of file vnl_matrix.h.

template<class T>
T const& vnl_matrix< T >::operator() ( unsigned  r,
unsigned  c 
) const [inline, inherited]

Access an element for reading.

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

Definition at line 186 of file vnl_matrix.h.

template<class T>
void vnl_matrix< T >::fill ( T const &   )  [inherited]

Set all elements of matrix to specified value.

Complexity $O(r.c)$

Definition at line 414 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::fill_diagonal ( T const &   )  [inherited]

Set all diagonal elements of matrix to specified value.

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

Definition at line 424 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::copy_in ( T const *   )  [inherited]

Fill (laminate) this matrix with the given data.

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

Definition at line 856 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::set ( T const *  d  )  [inline, inherited]

Fill (laminate) this matrix with the given data.

A synonym for copy_in()

Definition at line 212 of file vnl_matrix.h.

template<class T>
void vnl_matrix< T >::copy_out ( T *   )  const [inherited]

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.

Definition at line 867 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > & vnl_matrix< T >::operator+= ( value  )  [inherited]

Add rhs to each element of lhs matrix in situ.

Definition at line 507 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > & vnl_matrix< T >::operator+= ( vnl_matrix< T > const &  rhs  )  [inherited]

Add rhs to lhs matrix in situ.

O(m*n). The dimensions of the two matrices must be identical.

Definition at line 547 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > & vnl_matrix< T >::operator-= ( value  )  [inherited]

Subtract rhs from each element of lhs matrix in situ.

Definition at line 516 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > & vnl_matrix< T >::operator-= ( vnl_matrix< T > const &  rhs  )  [inherited]

Subtract rhs from lhs matrix in situ.

O(m*n). The dimensions of the two matrices must be identical.

Definition at line 568 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > & vnl_matrix< T >::operator *= ( value  )  [inherited]

Scalar multiplication in situ of lhs matrix by rhs.

Definition at line 525 of file vnl_matrix.txx.

template<class T>
vnl_matrix<T>& vnl_matrix< T >::operator *= ( vnl_matrix< T > const &  rhs  )  [inline, inherited]

Multiply lhs matrix in situ by rhs.

Definition at line 249 of file vnl_matrix.h.

template<class T>
vnl_matrix< T > & vnl_matrix< T >::operator/= ( value  )  [inherited]

Scalar division of lhs matrix in situ by rhs.

Definition at line 534 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > vnl_matrix< T >::operator- (  )  const [inherited]

Negate all elements of matrix.

O(m*n).

Definition at line 626 of file vnl_matrix.txx.

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator- ( T const &  v  )  const [inline, inherited]

Subtract rhs from each element of lhs matrix and return result in new matrix.

Definition at line 259 of file vnl_matrix.h.

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator- ( vnl_matrix< T > const &  rhs  )  const [inline, inherited]

Matrix subtract rhs from lhs and return result in new matrix.

Definition at line 270 of file vnl_matrix.h.

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator+ ( T const &  v  )  const [inline, inherited]

Add rhs to each element of lhs matrix and return result in new matrix.

Definition at line 256 of file vnl_matrix.h.

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator+ ( vnl_matrix< T > const &  rhs  )  const [inline, inherited]

Matrix add rhs to lhs matrix and return result in new matrix.

Definition at line 268 of file vnl_matrix.h.

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator * ( T const &  v  )  const [inline, inherited]

Scalar multiplication of lhs matrix by rhs and return result in new matrix.

Definition at line 262 of file vnl_matrix.h.

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator * ( vnl_matrix< T > const &  rhs  )  const [inline, inherited]

Matrix multiply lhs by rhs matrix and return result in new matrix.

Definition at line 272 of file vnl_matrix.h.

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator/ ( T const &  v  )  const [inline, inherited]

Scalar division of lhs matrix by rhs and return result in new matrix.

Definition at line 265 of file vnl_matrix.h.

template<class T>
vnl_matrix< T > vnl_matrix< T >::apply ( T(*)(T)  f  )  const [inherited]

Make a new matrix by applying function to each element.

Definition at line 687 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > vnl_matrix< T >::apply ( T(*)(T const &)  f  )  const [inherited]

Make a new matrix by applying function to each element.

Definition at line 678 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > vnl_matrix< T >::transpose (  )  const [inherited]

Return transpose.

O(m*n).

Definition at line 700 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > vnl_matrix< T >::conjugate_transpose (  )  const [inherited]

Return conjugate transpose.

Definition at line 712 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > & vnl_matrix< T >::update ( vnl_matrix< T > const &  m,
unsigned  top = 0,
unsigned  left = 0 
) [inherited]

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

This is the reverse of extract().

Definition at line 725 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::set_column ( unsigned  i,
T const *  v 
) [inherited]

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

Definition at line 1049 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::set_column ( unsigned  i,
value 
) [inherited]

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

Definition at line 1068 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::set_column ( unsigned  j,
vnl_vector< T > const &  v 
) [inherited]

Set j-th column to v.

Definition at line 1057 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::set_columns ( unsigned  starting_column,
vnl_matrix< T > const &  M 
) [inherited]

Set columns to those in M, starting at starting_column.

Definition at line 1077 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::set_row ( unsigned  i,
T const *  v 
) [inherited]

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

Definition at line 1020 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::set_row ( unsigned  i,
value 
) [inherited]

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

Definition at line 1039 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::set_row ( unsigned  i,
vnl_vector< T > const &   
) [inherited]

Set the i-th row.

Definition at line 1028 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > vnl_matrix< T >::extract ( unsigned  r,
unsigned  c,
unsigned  top = 0,
unsigned  left = 0 
) const [inherited]

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]

Definition at line 746 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::extract ( vnl_matrix< T > &  sub_matrix,
unsigned  top = 0,
unsigned  left = 0 
) const [inherited]

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]

Definition at line 754 of file vnl_matrix.txx.

template<class T>
vnl_vector< T > vnl_matrix< T >::get_row ( unsigned  r  )  const [inherited]

Get a vector equal to the given row.

Definition at line 988 of file vnl_matrix.txx.

template<class T>
vnl_vector< T > vnl_matrix< T >::get_column ( unsigned  c  )  const [inherited]

Get a vector equal to the given column.

Definition at line 1003 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > vnl_matrix< T >::get_n_rows ( unsigned  rowstart,
unsigned  n 
) const [inherited]

Get n rows beginning at rowstart.

Definition at line 959 of file vnl_matrix.txx.

template<class T>
vnl_matrix< T > vnl_matrix< T >::get_n_columns ( unsigned  colstart,
unsigned  n 
) const [inherited]

Get n columns beginning at colstart.

Definition at line 972 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::set_identity (  )  [inherited]

Set this matrix to an identity matrix.

Abort if the matrix is not square

Definition at line 877 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::inplace_transpose (  )  [inherited]

Transpose this matrix efficiently.

Works for rectangular matrices using an enormously clever algorithm from ACM TOMS.

Definition at line 1566 of file vnl_matrix.txx.

template<class T>
void vnl_matrix< T >::flipud (  )  [inherited]

Reverse order of rows.

Definition at line 1376 of file