Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Related Functions | List of all members
vnl_matrix< T > Class Template Reference

An ordinary mathematical matrix. More...

#include <vnl_adjugate.h>

Inheritance diagram for vnl_matrix< T >:
Inheritance graph
[legend]

Public Types

typedef vnl_c_vector< T >::abs_t abs_t
 Type def for norms. More...
 
typedef T element_type
 
typedef T * iterator
 Iterators. More...
 
typedef T const * const_iterator
 Const iterators. More...
 

Public Member Functions

 vnl_matrix ()
 Default constructor creates an empty matrix of size 0,0. More...
 
 vnl_matrix (unsigned r, unsigned c)
 Construct a matrix of size r rows by c columns. More...
 
 vnl_matrix (unsigned r, unsigned c, T const &v0)
 Construct a matrix of size r rows by c columns, and all elements equal to v0. More...
 
 vnl_matrix (unsigned r, unsigned c, vnl_matrix_type t)
 Construct a matrix of size r rows by c columns, with a special type. More...
 
 vnl_matrix (unsigned r, unsigned c, unsigned n, T const values[])
 Construct a matrix of size r rows by c columns, initialised by an automatic array. More...
 
 vnl_matrix (T const *data_block, unsigned r, unsigned c)
 Construct a matrix of size r rows by c columns, initialised by a memory block. More...
 
 vnl_matrix (vnl_matrix< T > const &)
 Copy construct a matrix. More...
 
 vnl_matrix (vnl_matrix< T > const &, vnl_matrix< T > const &, vnl_tag_add)
 
 vnl_matrix (vnl_matrix< T > const &, vnl_matrix< T > const &, vnl_tag_sub)
 
 vnl_matrix (vnl_matrix< T > const &, T, vnl_tag_mul)
 
 vnl_matrix (vnl_matrix< T > const &, T, vnl_tag_div)
 
 vnl_matrix (vnl_matrix< T > const &, T, vnl_tag_add)
 
 vnl_matrix (vnl_matrix< T > const &, T, vnl_tag_sub)
 
 vnl_matrix (vnl_matrix< T > const &, vnl_matrix< T > const &, vnl_tag_mul)
 
 vnl_matrix (vnl_matrix< T > &that, vnl_tag_grab)
 
 ~vnl_matrix ()
 Matrix destructor. More...
 
unsigned int size () const
 Return the total number of elements stored by the matrix. More...
 
unsigned int rows () const
 Return the number of rows. More...
 
unsigned int cols () const
 Return the number of columns. More...
 
unsigned int columns () const
 Return the number of columns. More...
 
void put (unsigned r, unsigned c, T const &)
 set element with boundary checks if error checking is on. More...
 
get (unsigned r, unsigned c) const
 get element with boundary checks if error checking is on. More...
 
T * operator[] (unsigned r)
 return pointer to given row. More...
 
T const * operator[] (unsigned r) const
 return pointer to given row. More...
 
T & operator() (unsigned r, unsigned c)
 Access an element for reading or writing. More...
 
T const & operator() (unsigned r, unsigned c) const
 Access an element for reading. More...
 
vnl_matrixfill (T const &)
 Sets all elements of matrix to specified value, and returns "*this". More...
 
vnl_matrixfill_diagonal (T const &)
 Sets all diagonal elements of matrix to specified value; returns "*this". More...
 
vnl_matrixset_diagonal (vnl_vector< T > const &)
 Sets the diagonal elements of this matrix to the specified list of values. More...
 
vnl_matrixcopy_in (T const *)
 Fills (laminates) this matrix with the given data, then returns it. More...
 
vnl_matrixset (T const *d)
 Fills (laminates) this matrix with the given data, then returns it. More...
 
void copy_out (T *) const
 Fills the given array with this matrix. More...
 
vnl_matrix< T > & operator= (T const &v)
 Set all elements to value v. More...
 
vnl_matrix< T > & operator= (vnl_matrix< T > const &)
 Copies all elements of rhs matrix into lhs matrix. More...
 
vnl_matrix< T > & operator+= (T value)
 Add rhs to each element of lhs matrix in situ. More...
 
vnl_matrix< T > & operator-= (T value)
 Subtract rhs from each element of lhs matrix in situ. More...
 
vnl_matrix< T > & operator *= (T value)
 Scalar multiplication in situ of lhs matrix by rhs. More...
 
vnl_matrix< T > & operator/= (T value)
 Scalar division of lhs matrix in situ by rhs. More...
 
vnl_matrix< T > & operator+= (vnl_matrix< T > const &)
 Add rhs to lhs matrix in situ. More...
 
vnl_matrix< T > & operator-= (vnl_matrix< T > const &)
 Subtract rhs from lhs matrix in situ. More...
 
vnl_matrix< T > & operator *= (vnl_matrix< T > const &rhs)
 Multiply lhs matrix in situ by rhs. More...
 
vnl_matrix< T > operator- () const
 Negate all elements of matrix. More...
 
vnl_matrix< T > operator+ (T const &v) const
 Add rhs to each element of lhs matrix and return result in new matrix. More...
 
vnl_matrix< T > operator- (T const &v) const
 Subtract rhs from each element of lhs matrix and return result in new matrix. More...
 
vnl_matrix< T > operator * (T const &v) const
 Scalar multiplication of lhs matrix by rhs and return result in new matrix. More...
 
vnl_matrix< T > operator/ (T const &v) const
 Scalar division of lhs matrix by rhs and return result in new matrix. More...
 
vnl_matrix< T > operator+ (vnl_matrix< T > const &rhs) const
 Matrix add rhs to lhs matrix and return result in new matrix. More...
 
vnl_matrix< T > operator- (vnl_matrix< T > const &rhs) const
 Matrix subtract rhs from lhs and return result in new matrix. More...
 
vnl_matrix< T > operator * (vnl_matrix< T > const &rhs) const
 Matrix multiply lhs by rhs matrix and return result in new matrix. More...
 
vnl_matrix< T > apply (T(*f)(T)) const
 Make a new matrix by applying function to each element. More...
 
vnl_matrix< T > apply (T(*f)(T const &)) const
 Make a new matrix by applying function to each element. More...
 
vnl_vector< T > apply_rowwise (T(*f)(vnl_vector< T > const &)) const
 Make a vector by applying a function across rows. More...
 
vnl_vector< T > apply_columnwise (T(*f)(vnl_vector< T > const &)) const
 Make a vector by applying a function across columns. More...
 
vnl_matrix< T > transpose () const
 Return transpose. More...
 
vnl_matrix< T > conjugate_transpose () const
 Return conjugate transpose. More...
 
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]. More...
 
vnl_matrixset_column (unsigned i, T const *v)
 Set the elements of the i'th column to v[i] (No bounds checking). More...
 
vnl_matrixset_column (unsigned i, T value)
 Set the elements of the i'th column to value, then return *this. More...
 
vnl_matrixset_column (unsigned j, vnl_vector< T > const &v)
 Set j-th column to v, then return *this. More...
 
vnl_matrixset_columns (unsigned starting_column, vnl_matrix< T > const &M)
 Set columns to those in M, starting at starting_column, then return *this. More...
 
vnl_matrixset_row (unsigned i, T const *v)
 Set the elements of the i'th row to v[i] (No bounds checking). More...
 
vnl_matrixset_row (unsigned i, T value)
 Set the elements of the i'th row to value, then return *this. More...
 
vnl_matrixset_row (unsigned i, vnl_vector< T > const &)
 Set the i-th row. More...
 
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). More...
 
void extract (vnl_matrix< T > &sub_matrix, unsigned top=0, unsigned left=0) const
 Extract a sub-matrix starting at (top,left). More...
 
vnl_vector< T > get_row (unsigned r) const
 Get a vector equal to the given row. More...
 
vnl_vector< T > get_column (unsigned c) const
 Get a vector equal to the given column. More...
 
vnl_matrix< T > get_rows (vnl_vector< unsigned int > i) const
 Get a matrix composed of rows from the indices specified in the supplied vector. More...
 
vnl_matrix< T > get_columns (vnl_vector< unsigned int > i) const
 Get a matrix composed of columns from the indices specified in the supplied vector. More...
 
vnl_matrix< T > get_n_rows (unsigned rowstart, unsigned n) const
 Get n rows beginning at rowstart. More...
 
vnl_matrix< T > get_n_columns (unsigned colstart, unsigned n) const
 Get n columns beginning at colstart. More...
 
vnl_vector< T > get_diagonal () const
 Return a vector with the content of the (main) diagonal. More...
 
vnl_vector< T > flatten_row_major () const
 Flatten row-major (C-style). More...
 
vnl_vector< T > flatten_column_major () const
 Flatten column-major (Fortran-style). More...
 
vnl_matrixset_identity ()
 Sets this matrix to an identity matrix, then returns "*this". More...
 
vnl_matrixinplace_transpose ()
 Transposes this matrix efficiently, and returns it. More...
 
vnl_matrixflipud ()
 Reverses the order of rows, and returns "*this". More...
 
vnl_matrixfliplr ()
 Reverses the order of columns, and returns "*this". More...
 
vnl_matrixnormalize_rows ()
 Normalizes each row so it is a unit vector, and returns "*this". More...
 
vnl_matrixnormalize_columns ()
 Normalizes each column so it is a unit vector, and returns "*this". More...
 
vnl_matrixscale_row (unsigned row, T value)
 Scales elements in given row by a factor T, and returns "*this". More...
 
vnl_matrixscale_column (unsigned col, T value)
 Scales elements in given column by a factor T, and returns "*this". More...
 
void swap (vnl_matrix< T > &that)
 Swap this matrix with that matrix. More...
 
abs_t array_one_norm () const
 Return sum of absolute values of elements. More...
 
abs_t array_two_norm () const
 Return square root of sum of squared absolute element values. More...
 
abs_t array_inf_norm () const
 Return largest absolute element value. More...
 
abs_t absolute_value_sum () const
 Return sum of absolute values of elements. More...
 
abs_t absolute_value_max () const
 Return largest absolute value. More...
 
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). More...
 
abs_t fro_norm () const
 Return Frobenius norm of matrix (sqrt of sum of squares of its elements). More...
 
abs_t rms () const
 Return RMS of all elements. More...
 
min_value () const
 Return minimum value of elements. More...
 
max_value () const
 Return maximum value of elements. More...
 
unsigned arg_min () const
 Return location of minimum value of elements. More...
 
unsigned arg_max () const
 Return location of maximum value of elements. More...
 
mean () const
 Return mean of all matrix elements. More...
 
bool empty () const
 Return true iff the size is zero. More...
 
bool is_identity () const
 Return true if all elements equal to identity. More...
 
bool is_identity (double tol) const
 Return true if all elements equal to identity, within given tolerance. More...
 
bool is_zero () const
 Return true if all elements equal to zero. More...
 
bool is_zero (double tol) const
 Return true if all elements equal to zero, within given tolerance. More...
 
bool is_equal (vnl_matrix< T > const &rhs, double tol) const
 Return true if all elements of both matrices are equal, within given tolerance. More...
 
bool is_finite () const
 Return true if finite. More...
 
bool has_nans () const
 Return true if matrix contains NaNs. More...
 
void assert_size (unsigned VXL_USED_IN_DEBUG(r), unsigned VXL_USED_IN_DEBUG(c)) const
 abort if size is not as expected. More...
 
void assert_finite () const
 abort if matrix contains any INFs or NANs. More...
 
bool read_ascii (std::istream &s)
 Read a vnl_matrix from an ascii std::istream. More...
 
T const * data_block () const
 Access the contiguous block storing the elements in the matrix row-wise. O(1). More...
 
T * data_block ()
 Access the contiguous block storing the elements in the matrix row-wise. O(1). More...
 
T const *const * data_array () const
 Access the 2D array, so that elements can be accessed with array[row][col] directly. More...
 
T ** data_array ()
 Access the 2D array, so that elements can be accessed with array[row][col] directly. More...
 
iterator begin ()
 Iterator pointing to start of data. More...
 
iterator end ()
 Iterator pointing to element beyond end of data. More...
 
const_iterator begin () const
 Iterator pointing to start of data. More...
 
const_iterator end () const
 Iterator pointing to element beyond end of data. More...
 
vnl_matrix< T > const & as_ref () const
 Return a reference to this. More...
 
vnl_matrix< T > & as_ref ()
 Return a reference to this. More...
 
bool operator_eq (vnl_matrix< T > const &rhs) const
 Return true if *this == rhs. More...
 
bool operator== (vnl_matrix< T > const &that) const
 Equality operator. More...
 
bool operator!= (vnl_matrix< T > const &that) const
 Inequality operator. More...
 
void print (std::ostream &os) const
 Print matrix to os in some hopefully sensible format. More...
 
void clear ()
 Make the matrix as if it had been default-constructed. More...
 
bool set_size (unsigned r, unsigned c)
 Resize to r rows by c columns. Old data lost. More...
 

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

unsigned num_rows
 
unsigned num_cols
 
T ** data
 

Related Functions

(Note that these are not member functions.)

template<class T >
vnl_determinant (vnl_matrix< T > const &M, bool balance=false)
 evaluation using direct methods for sizes of 2x2, 3x3, and 4x4 or qr decomposition for other matrices. More...
 
template<class T >
void vnl_matrix_update (vnl_matrix< T > &M, const vnl_vector< T > &a, const vnl_vector< T > &b)
 Perform rank 1 update of M: M+=(a*b'). More...
 
template<class T >
vnl_matrix< T > vnl_orthogonal_complement (vnl_vector< T > const &v)
 Return a matrix whose columns span is the orthogonal complement of v. More...
 
template<class T >
void vsl_b_write (vsl_b_ostream &os, const vnl_matrix< T > &v)
 Binary save vnl_matrix to stream. More...
 
template<class T >
void vsl_b_read (vsl_b_istream &is, vnl_matrix< T > &v)
 Binary load vnl_matrix from stream. More...
 
template<class T >
void vsl_print_summary (std::ostream &os, const vnl_matrix< T > &b)
 Print human readable summary of object to a stream. More...
 
template<class T >
VNL_EXPORT vnl_matrix< std::complex< T > > vnl_complexify (vnl_matrix< T > const &R)
 Return complexified version of real matrix R. More...
 
template<class T >
VNL_EXPORT vnl_matrix< std::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. More...
 
template<class T >
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. More...
 
template<class T >
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. More...
 
template<class T >
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. More...
 
template<class T >
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. More...
 
template<class T >
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. More...
 
template<class T >
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. More...
 
template<class T , unsigned int R, unsigned int C>
vnl_matrix_fixed< T, R, C > operator * (vnl_matrix_fixed< T, R, C > const &A, vnl_diag_matrix_fixed< T, C > const &D)
 Multiply a vnl_matrix by a vnl_diag_matrix_fixed. Just scales the columns - mn flops. More...
 
template<class T , unsigned int R, unsigned int C>
vnl_matrix_fixed< T, R, C > operator * (vnl_diag_matrix_fixed< T, R > const &D, vnl_matrix_fixed< T, R, C > const &A)
 Multiply a vnl_diag_matrix_fixed by a vnl_matrix. Just scales the rows - mn flops. More...
 
template<class T , unsigned int N>
vnl_matrix_fixed< T, N, N > operator+ (vnl_matrix_fixed< T, N, N > const &A, vnl_diag_matrix_fixed< T, N > const &D)
 Add a vnl_diag_matrix_fixed to a vnl_matrix. n adds, mn copies. More...
 
template<class T , unsigned int N>
vnl_matrix_fixed< T, N, N > operator+ (vnl_diag_matrix_fixed< T, N > const &D, vnl_matrix_fixed< T, N, N > const &A)
 Add a vnl_matrix to a vnl_diag_matrix_fixed. n adds, mn copies. More...
 
template<class T , unsigned int N>
vnl_matrix_fixed< T, N, N > operator- (vnl_matrix_fixed< T, N, N > const &A, vnl_diag_matrix_fixed< T, N > const &D)
 Subtract a vnl_diag_matrix_fixed from a vnl_matrix. n adds, mn copies. More...
 
template<class T , unsigned int N>
vnl_matrix_fixed< T, N, N > operator- (vnl_diag_matrix_fixed< T, N > const &D, vnl_matrix_fixed< T, N, N > const &A)
 Subtract a vnl_matrix from a vnl_diag_matrix_fixed. n adds, mn copies. More...
 
template<class T >
VNL_EXPORT vnl_matrix< T > vnl_imag (vnl_matrix< std::complex< T > > const &C)
 Matrix of imaginary parts of vnl_matrix<std::complex<T> >. More...
 
template<class T >
vnl_matrix< T > vnl_inverse (vnl_matrix< T > const &m)
 Calculates inverse of a small vnl_matrix_fixed (not using svd). More...
 
template<class T >
vnl_matrix< T > vnl_inverse_transpose (vnl_matrix< T > const &m)
 Calculates transpose of the inverse of a small vnl_matrix_fixed (not using svd). More...
 
template<class T >
VNL_EXPORT std::ostream & vnl_matlab_print (std::ostream &, vnl_matrix< T > const &, char const *variable_name=nullptr, vnl_matlab_print_format=vnl_matlab_print_format_default)
 print a vnl_matrix<T>. More...
 
template<class T >
vnl_matrix< T > operator * (T const &value, vnl_matrix< T > const &m)
 
template<class T >
vnl_matrix< T > operator+ (T const &value, vnl_matrix< T > const &m)
 
template<class T >
void swap (vnl_matrix< T > &A, vnl_matrix< T > &B)
 Swap two matrices. More...
 
template<class T >
VNL_EXPORT bool operator< (vnl_matrix< T > const &lhs, vnl_matrix< T > const &rhs)
 Define a complete ordering on vnl_matrix. More...
 
template<class T >
vnl_matrix< T > vnl_power (vnl_matrix< T > const &m, int n)
 Calculates nth power of a square vnl_matrix (not using svd). More...
 
template<class T >
VNL_EXPORT unsigned int vnl_rank (vnl_matrix< T > const &mat, vnl_rank_type=vnl_rank_both)
 Returns the rank of a matrix. More...
 
template<class T >
VNL_EXPORT vnl_matrix< T > vnl_rank_row_reduce (vnl_matrix< T > const &mat, vnl_rank_pivot_type=vnl_rank_pivot_all)
 Row reduce a matrix. More...
 
template<class T >
VNL_EXPORT vnl_matrix< T > vnl_rank_column_reduce (vnl_matrix< T > const &mat, vnl_rank_pivot_type=vnl_rank_pivot_all)
 Column reduce a matrix. More...
 
template<class T >
VNL_EXPORT 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. More...
 
template<class T >
VNL_EXPORT vnl_matrix< T > vnl_real (vnl_matrix< std::complex< T > > const &C)
 Matrix of real parts of vnl_matrix<std::complex<T> >. More...
 
VNL_EXPORT 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||. More...
 
template<class T >
vnl_sparse_matrix< T > operator * (T const &value, vnl_sparse_matrix< T > const &m)
 
template<class T >
vnl_trace (vnl_matrix< T > const &M)
 Calculate trace of a matrix. More...
 
template<class T >
vnl_vector< T > operator * (vnl_matrix< T > const &m, vnl_vector< T > const &v)
 multiply matrix and (column) vector. O(m*n). More...
 
template<class T >
void VNL_EXPORT x_write (std::ostream &os, vnl_matrix< T > const &v, std::string name="vnl_matrix")
 XML save vnl_matrix to stream. More...
 
template<class T >
void VNL_EXPORT x_write_tree (std::ostream &os, vnl_matrix< T > const &v, std::string name="vnl_matrix")
 XML save vnl_matrix as a 3-level tree to stream. More...
 

Detailed Description

template<class T>
class vnl_matrix< T >

An ordinary mathematical matrix.

The vnl_matrix<T> class implements two-dimensional arithmetic matrices for a user-specified numeric data type. Using the parameterized types facility of C++, it is possible, for example, for the user to create a matrix of rational numbers by parameterizing the vnl_matrix class over the Rational class. The only requirement for the type is that it supports the basic arithmetic operators.

Note: Unlike the other sequence classes, the vnl_matrix<T> class is fixed-size. It will not grow once the size has been specified to the constructor or changed by the assignment or multiplication operators. The vnl_matrix<T> class is row-based with addresses of rows being cached, and elements accessed as m[row][col].

Note: The matrix can, however, be resized using the set_size(nr,nc) function.

Note: Indexing of the matrix is zero-based, so the top-left element is M(0,0).

Note: Inversion of matrix M, and other operations such as solving systems of linear equations are handled by the matrix decomposition classes in vnl/algo, such as matrix_inverse, svd, qr etc.

Note: Use a vnl_vector<T> with these matrices.

Definition at line 22 of file vnl_adjugate.h.

Member Typedef Documentation

◆ abs_t

template<class T>
typedef vnl_c_vector<T>::abs_t vnl_matrix< T >::abs_t

Type def for norms.

Definition at line 499 of file vnl_matrix.h.

◆ const_iterator

template<class T>
typedef T const* vnl_matrix< T >::const_iterator

Const iterators.

Definition at line 625 of file vnl_matrix.h.

◆ element_type

template<class T>
typedef T vnl_matrix< T >::element_type

Definition at line 615 of file vnl_matrix.h.

◆ iterator

template<class T>
typedef T* vnl_matrix< T >::iterator

Iterators.

Definition at line 618 of file vnl_matrix.h.

Constructor & Destructor Documentation

◆ vnl_matrix() [1/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( )
inline

Default constructor creates an empty matrix of size 0,0.

Definition at line 117 of file vnl_matrix.h.

◆ vnl_matrix() [2/15]

template<class T >
vnl_matrix< T >::vnl_matrix ( unsigned  rowz,
unsigned  colz 
)

Construct a matrix of size r rows by c columns.

Creates a matrix with given number of rows and columns.

Contents are unspecified. Complexity $O(1)$

Elements are not initialized. O(m*n).

Definition at line 137 of file vnl_matrix.hxx.

◆ vnl_matrix() [3/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( unsigned  r,
unsigned  c,
T const &  v0 
)

Construct a matrix of size r rows by c columns, and all elements equal to v0.

Creates a matrix with given number of rows and columns, and initialize all elements to value. O(m*n).

Complexity $O(r.c)$

Definition at line 147 of file vnl_matrix.hxx.

◆ vnl_matrix() [4/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( unsigned  r,
unsigned  c,
vnl_matrix_type  t 
)

Construct a matrix of size r rows by c columns, with a special type.

r rows, c cols, special type. Currently implements "identity" and "null".

Contents are specified by t Complexity $O(r.c)$

Definition at line 157 of file vnl_matrix.hxx.

◆ vnl_matrix() [5/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( unsigned  r,
unsigned  c,
unsigned  n,
T const  values[] 
)

Construct a matrix of size r rows by c columns, initialised by an automatic array.

Creates a matrix with given dimension (rows, cols) and initialize first n elements, row-wise, to values. O(m*n).

The first n elements, are initialised row-wise, to values. Complexity $O(n)$

Definition at line 182 of file vnl_matrix.hxx.

◆ vnl_matrix() [6/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( T const *  datablck,
unsigned  rowz,
unsigned  colz 
)

Construct a matrix of size r rows by c columns, initialised by a memory block.

Creates a matrix from a block array of data, stored row-wise.

The values are initialise row wise from the data. Complexity $O(r.c)$

O(m*n).

Definition at line 197 of file vnl_matrix.hxx.

◆ vnl_matrix() [7/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( vnl_matrix< T > const &  from)

Copy construct a matrix.

Creates a new matrix and copies all the elements.

Complexity $O(r.c)$

O(m*n).

Definition at line 210 of file vnl_matrix.hxx.

◆ vnl_matrix() [8/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( vnl_matrix< T > const &  A,
vnl_matrix< T > const &  B,
vnl_tag_add   
)

Definition at line 229 of file vnl_matrix.hxx.

◆ vnl_matrix() [9/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( vnl_matrix< T > const &  A,
vnl_matrix< T > const &  B,
vnl_tag_sub   
)

Definition at line 250 of file vnl_matrix.hxx.

◆ vnl_matrix() [10/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( vnl_matrix< T > const &  M,
s,
vnl_tag_mul   
)

Definition at line 271 of file vnl_matrix.hxx.

◆ vnl_matrix() [11/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( vnl_matrix< T > const &  M,
s,
vnl_tag_div   
)

Definition at line 286 of file vnl_matrix.hxx.

◆ vnl_matrix() [12/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( vnl_matrix< T > const &  M,
s,
vnl_tag_add   
)

Definition at line 301 of file vnl_matrix.hxx.

◆ vnl_matrix() [13/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( vnl_matrix< T > const &  M,
s,
vnl_tag_sub   
)

Definition at line 316 of file vnl_matrix.hxx.

◆ vnl_matrix() [14/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( vnl_matrix< T > const &  A,
vnl_matrix< T > const &  B,
vnl_tag_mul   
)

Definition at line 331 of file vnl_matrix.hxx.

◆ vnl_matrix() [15/15]

template<class T>
vnl_matrix< T >::vnl_matrix ( vnl_matrix< T > &  that,
vnl_tag_grab   
)
inline

Definition at line 163 of file vnl_matrix.h.

◆ ~vnl_matrix()

template<class T >
vnl_matrix< T >::~vnl_matrix ( )

Matrix destructor.

Definition at line 359 of file vnl_matrix.hxx.

Member Function Documentation

◆ absolute_value_max()

template<class T>
abs_t vnl_matrix< T >::absolute_value_max ( ) const
inline

Return largest absolute value.

Definition at line 514 of file vnl_matrix.h.

◆ absolute_value_sum()

template<class T>
abs_t vnl_matrix< T >::absolute_value_sum ( ) const
inline

Return sum of absolute values of elements.

Definition at line 511 of file vnl_matrix.h.

◆ apply() [1/2]

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

Make a new matrix by applying function to each element.

Return the matrix made by applying "f" to each element.

Definition at line 644 of file vnl_matrix.hxx.

◆ apply() [2/2]

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

Make a new matrix by applying function to each element.

Return the matrix made by applying "f" to each element.

Definition at line 635 of file vnl_matrix.hxx.

◆ apply_columnwise()

template<class T>
vnl_vector< T > vnl_matrix< T >::apply_columnwise ( T(*)(vnl_vector< T > const &)  f) const

Make a vector by applying a function across columns.

Definition at line 667 of file vnl_matrix.hxx.

◆ apply_rowwise()

template<class T>
vnl_vector< T > vnl_matrix< T >::apply_rowwise ( T(*)(vnl_vector< T > const &)  f) const

Make a vector by applying a function across rows.

Definition at line 655 of file vnl_matrix.hxx.

◆ arg_max()

template<class T>
unsigned vnl_matrix< T >::arg_max ( ) const
inline

Return location of maximum value of elements.

Definition at line 541 of file vnl_matrix.h.

◆ arg_min()

template<class T>
unsigned vnl_matrix< T >::arg_min ( ) const
inline

Return location of minimum value of elements.

Definition at line 538 of file vnl_matrix.h.

◆ array_inf_norm()

template<class T>
abs_t vnl_matrix< T >::array_inf_norm ( ) const
inline

Return largest absolute element value.

Definition at line 508 of file vnl_matrix.h.

◆ array_one_norm()

template<class T>
abs_t vnl_matrix< T >::array_one_norm ( ) const
inline

Return sum of absolute values of elements.

Definition at line 502 of file vnl_matrix.h.

◆ array_two_norm()

template<class T>
abs_t vnl_matrix< T >::array_two_norm ( ) const
inline

Return square root of sum of squared absolute element values.

Definition at line 505 of file vnl_matrix.h.

◆ as_ref() [1/2]

template<class T>
vnl_matrix<T> const& vnl_matrix< T >::as_ref ( ) const
inline

Return a reference to this.

Useful in code which would prefer not to know if its argument is a matrix, matrix_ref or a matrix_fixed. Note that it doesn't return a matrix_ref, so it's only useful in templates or macros.

Definition at line 635 of file vnl_matrix.h.

◆ as_ref() [2/2]

template<class T>
vnl_matrix<T>& vnl_matrix< T >::as_ref ( )
inline

Return a reference to this.

Definition at line 638 of file vnl_matrix.h.

◆ assert_finite()

template<class T>
void vnl_matrix< T >::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 582 of file vnl_matrix.h.

◆ assert_finite_internal()

template<class T >
void vnl_matrix< T >::assert_finite_internal ( ) const
protected

Abort if any element of M is inf or nan.

Definition at line 1249 of file vnl_matrix.hxx.

◆ assert_size()

template<class T>
void vnl_matrix< T >::assert_size ( unsigned   VXL_USED_IN_DEBUGr,
unsigned   VXL_USED_IN_DEBUG
) const
inline

abort if size is not as expected.

This function does or tests nothing if NDEBUG is defined

Definition at line 574 of file vnl_matrix.h.

◆ assert_size_internal()

template<class T >
void vnl_matrix< T >::assert_size_internal ( unsigned  r,
unsigned  c 
) const
protected

Abort unless M has the given size.

Definition at line 1275 of file vnl_matrix.hxx.

◆ begin() [1/2]

template<class T>
iterator vnl_matrix< T >::begin ( )
inline

Iterator pointing to start of data.

Definition at line 620 of file vnl_matrix.h.

◆ begin() [2/2]

template<class T>
const_iterator vnl_matrix< T >::begin ( ) const
inline

Iterator pointing to start of data.

Definition at line 627 of file vnl_matrix.h.

◆ clear()

template<class T >
void vnl_matrix< T >::clear ( )

Make the matrix as if it had been default-constructed.

Definition at line 375 of file vnl_matrix.hxx.

◆ cols()

template<class T>
unsigned int vnl_matrix< T >::cols ( ) const
inline

Return the number of columns.

A synonym for columns().

Definition at line 183 of file vnl_matrix.h.

◆ columns()

template<class T>
unsigned int vnl_matrix< T >::columns ( ) const
inline

Return the number of columns.

A synonym for cols().

Definition at line 187 of file vnl_matrix.h.

◆ conjugate_transpose()

template<class T >
vnl_matrix< T > vnl_matrix< T >::conjugate_transpose ( ) const

Return conjugate transpose.

Definition at line 694 of file vnl_matrix.hxx.

◆ copy_in()

template<class T>
vnl_matrix< T > & vnl_matrix< T >::copy_in ( T const *  p)

Fills (laminates) this matrix with the given data, then returns it.

Fill this matrix with the given data.

We assume that the argument points to a contiguous rows*cols array, stored rowwise. No bounds checking on the array. Returning "*this" allows "chaining" two or more operations: e.g., to fill a square matrix column-wise, fill it rowwise then transpose:

M.copy_in(array).inplace_transpose();

Returning "*this" also allows passing a filled-in matrix as argument to a function f, without having to name the constructed matrix:

f(vnl_matrix<double>(3,3).copy_in(array));

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

Definition at line 837 of file vnl_matrix.hxx.

◆ copy_out()

template<class T>
void vnl_matrix< T >::copy_out ( T *  p) const

Fills the given array with this matrix.

Fill the given array with this matrix.

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

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

Definition at line 846 of file vnl_matrix.hxx.

◆ data_array() [1/2]

template<class T>
T const* const* vnl_matrix< T >::data_array ( ) const
inline

Access the 2D array, so that elements can be accessed with array[row][col] directly.

2d array, [row][column].

Definition at line 609 of file vnl_matrix.h.

◆ data_array() [2/2]

template<class T>
T* * vnl_matrix< T >::data_array ( )
inline

Access the 2D array, so that elements can be accessed with array[row][col] directly.

2d array, [row][column].

Definition at line 613 of file vnl_matrix.h.

◆ data_block() [1/2]

template<class T>
T const* vnl_matrix< T >::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 601 of file vnl_matrix.h.

◆ data_block() [2/2]

template<class T>
T* vnl_matrix< T >::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 605 of file vnl_matrix.h.

◆ destroy()

template<class T >
void vnl_matrix< T >::destroy ( )
protected

Delete data.

Frees up the dynamic storage used by matrix.

O(m*n).

Definition at line 369 of file vnl_matrix.hxx.

◆ empty()

template<class T>
bool vnl_matrix< T >::empty ( ) const
inline

Return true iff the size is zero.

Definition at line 549 of file vnl_matrix.h.

◆ end() [1/2]

template<class T>
iterator vnl_matrix< T >::end ( )
inline

Iterator pointing to element beyond end of data.

Definition at line 622 of file vnl_matrix.h.

◆ end() [2/2]

template<class T>
const_iterator vnl_matrix< T >::end ( ) const
inline

Iterator pointing to element beyond end of data.

Definition at line 629 of file vnl_matrix.h.

◆ extract() [1/2]

template<class T >
vnl_matrix< T > vnl_matrix< T >::extract ( unsigned  rowz,
unsigned  colz,
unsigned  top = 0,
unsigned  left = 0 
) const

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

Returns a copy of submatrix of THIS matrix, specified by the top-left corner and size in rows, cols. O(m*n).

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

Use update() to copy new values of this submatrix back into THIS matrix.

Definition at line 728 of file vnl_matrix.hxx.

◆ extract() [2/2]

template<class T>
void vnl_matrix< T >::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]

Definition at line 736 of file vnl_matrix.hxx.

◆ fill()

template<class T>
vnl_matrix< T > & vnl_matrix< T >::fill ( T const &  value)

Sets all elements of matrix to specified value, and returns "*this".

Sets all elements of matrix to specified value. O(m*n).

Complexity $O(r.c)$ Returning "*this" allows "chaining" two or more operations: e.g., to set a matrix to a column-normalized all-elements-equal matrix, say

M.fill(1).normalize_columns();

Returning "*this" also allows passing such a matrix as argument to a function f, without having to name the constructed matrix:

Definition at line 419 of file vnl_matrix.hxx.

◆ fill_diagonal()

template<class T>
vnl_matrix< T > & vnl_matrix< T >::fill_diagonal ( T const &  value)

Sets all diagonal elements of matrix to specified value; returns "*this".

Sets all diagonal elements of matrix to specified value. O(n).

Complexity $O(\min(r,c))$ Returning "*this" allows "chaining" two or more operations: e.g., to set a 3x3 matrix to [5 0 0][0 10 0][0 0 15], just say

M.fill_diagonal(5).scale_row(1,2).scale_column(2,3);

Returning "*this" also allows passing a diagonal-filled matrix as argument to a function f, without having to name the constructed matrix:

Definition at line 430 of file vnl_matrix.hxx.

◆ flatten_column_major()

template<class T >
vnl_vector< T > vnl_matrix< T >::flatten_column_major ( ) const

Flatten column-major (Fortran-style).

Definition at line 1035 of file vnl_matrix.hxx.

◆ flatten_row_major()

template<class T >
vnl_vector< T > vnl_matrix< T >::flatten_row_major ( ) const

Flatten row-major (C-style).

Definition at line 1026 of file vnl_matrix.hxx.

◆ fliplr()

template<class T >
vnl_matrix< T > & vnl_matrix< T >::fliplr ( )

Reverses the order of columns, and returns "*this".

Reverse order of columns.

Returning "*this" allows "chaining" two or more operations: e.g., to flip both up-down and left-right, one could just say

M.flipud().fliplr();

Definition at line 1449 of file vnl_matrix.hxx.

◆ flipud()

template<class T >
vnl_matrix< T > & vnl_matrix< T >::flipud ( )

Reverses the order of rows, and returns "*this".

Reverse order of rows. Name is from Matlab, meaning "flip upside down".

Returning "*this" allows "chaining" two or more operations: e.g., to flip both up-down and left-right, one could just say

M.flipud().fliplr();

Definition at line 1429 of file vnl_matrix.hxx.

◆ fro_norm()

template<class T>
abs_t vnl_matrix< T >::fro_norm ( ) const
inline

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

Definition at line 526 of file vnl_matrix.h.

◆ frobenius_norm()

template<class T>
abs_t vnl_matrix< T >::frobenius_norm ( ) const
inline

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

Definition at line 523 of file vnl_matrix.h.

◆ get()

template<class T >
T vnl_matrix< T >::get ( unsigned  r,
unsigned  c 
) const
inline

get element with boundary checks if error checking is on.

Returns the value of the element at specified row and column. O(1).

Checks for valid range of indices.

Definition at line 684 of file vnl_matrix.h.

◆ get_column()

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

Get a vector equal to the given column.

Create a vector out of column[column_index].

Definition at line 977 of file vnl_matrix.hxx.

◆ get_columns()

template<class T >
vnl_matrix< T > vnl_matrix< T >::get_columns ( vnl_vector< unsigned int >  i) const

Get a matrix composed of columns from the indices specified in the supplied vector.

Create a vector out of column[column_index].

Definition at line 1006 of file vnl_matrix.hxx.

◆ get_diagonal()

template<class T >
vnl_vector< T > vnl_matrix< T >::get_diagonal ( ) const

Return a vector with the content of the (main) diagonal.

Definition at line 1016 of file vnl_matrix.hxx.

◆ get_n_columns()

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

Get n columns beginning at colstart.

Returns a copy of n columns, starting from "column".

Definition at line 946 of file vnl_matrix.hxx.

◆ get_n_rows()

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

Get n rows beginning at rowstart.

Returns a copy of n rows, starting from "row".

Definition at line 933 of file vnl_matrix.hxx.

◆ get_row()

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

Get a vector equal to the given row.

Create a vector out of row[row_index].

Definition at line 962 of file vnl_matrix.hxx.

◆ get_rows()

template<class T >
vnl_matrix< T > vnl_matrix< T >::get_rows ( vnl_vector< unsigned int >  i) const

Get a matrix composed of rows from the indices specified in the supplied vector.

Create a vector out of row[row_index].

Definition at line 994 of file vnl_matrix.hxx.

◆ has_nans()

template<class T >
bool vnl_matrix< T >::has_nans ( ) const

Return true if matrix contains NaNs.

Return true if any element of (*this) is nan.

Definition at line 1225 of file vnl_matrix.hxx.

◆ inplace_transpose()

template<class T >
vnl_matrix< T > & vnl_matrix< T >::inplace_transpose ( )

Transposes this matrix efficiently, and returns it.

Transpose matrix M in place.

Returning "*this" allows "chaining" two or more operations: e.g., to fill a square matrix column-wise, fill it rowwise then transpose:

M.copy_in(array).inplace_transpose();

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

Definition at line 1619 of file vnl_matrix.hxx.

◆ is_equal()

template<class T>
bool vnl_matrix< T >::is_equal ( vnl_matrix< T > const &  rhs,
double  tol 
) const

Return true if all elements of both matrices are equal, within given tolerance.

Definition at line 1153 of file vnl_matrix.hxx.

◆ is_finite()

template<class T >
bool vnl_matrix< T >::is_finite ( ) const

Return true if finite.

Return false if any element of (*this) is inf or nan.

Definition at line 1237 of file vnl_matrix.hxx.

◆ is_identity() [1/2]

template<class T >
bool vnl_matrix< T >::is_identity ( ) const

Return true if all elements equal to identity.

Definition at line 1171 of file vnl_matrix.hxx.

◆ is_identity() [2/2]

template<class T >
bool vnl_matrix< T >::is_identity ( double  tol) const

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

Return true if maximum absolute deviation of M from identity is <= tol.

Definition at line 1186 of file vnl_matrix.hxx.

◆ is_zero() [1/2]

template<class T >
bool vnl_matrix< T >::is_zero ( ) const

Return true if all elements equal to zero.

Definition at line 1200 of file vnl_matrix.hxx.

◆ is_zero() [2/2]

template<class T >
bool vnl_matrix< T >::is_zero ( double  tol) const

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

Return true if max(abs((*this))) <= tol.

Definition at line 1213 of file vnl_matrix.hxx.

◆ max_value()

template<class T>
T vnl_matrix< T >::max_value ( ) const
inline

Return maximum value of elements.

Definition at line 535 of file vnl_matrix.h.

◆ mean()

template<class T>
T vnl_matrix< T >::mean ( ) const
inline

Return mean of all matrix elements.

Definition at line 544 of file vnl_matrix.h.

◆ min_value()

template<class T>
T vnl_matrix< T >::min_value ( ) const
inline

Return minimum value of elements.

Definition at line 532 of file vnl_matrix.h.

◆ normalize_columns()

template<class T >
vnl_matrix< T > & vnl_matrix< T >::normalize_columns ( )

Normalizes each column so it is a unit vector, and returns "*this".

Make each column of the matrix have unit norm.

Zero columns are not modified Returning "*this" allows "chaining" two or more operations: e.g., to set a matrix to a column-normalized all-elements-equal matrix, say

M.fill(1).normalize_columns();

Returning "*this" also allows passing such a matrix as argument to a function f, without having to name the constructed matrix:

All-zero columns are ignored.

Definition at line 886 of file vnl_matrix.hxx.

◆ normalize_rows()

template<class T >
vnl_matrix< T > & vnl_matrix< T >::normalize_rows ( )

Normalizes each row so it is a unit vector, and returns "*this".

Make each row of the matrix have unit norm.

Zero rows are not modified Returning "*this" allows "chaining" two or more operations: e.g., to set a matrix to a row-normalized all-elements-equal matrix, say

M.fill(1).normalize_rows();

Returning "*this" also allows passing such a matrix as argument to a function f, without having to name the constructed matrix:

All-zero rows are ignored.

Definition at line 864 of file vnl_matrix.hxx.

◆ operator *() [1/2]

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator * ( T const &  v) const
inline

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

Definition at line 314 of file vnl_matrix.h.

◆ operator *() [2/2]

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator * ( vnl_matrix< T > const &  rhs) const
inline

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

Definition at line 324 of file vnl_matrix.h.

◆ operator *=() [1/2]

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

Scalar multiplication in situ of lhs matrix by rhs.

Definition at line 551 of file vnl_matrix.hxx.

◆ operator *=() [2/2]

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

Multiply lhs matrix in situ by rhs.

Definition at line 301 of file vnl_matrix.h.

◆ operator!=()

template<class T>
bool vnl_matrix< T >::operator!= ( vnl_matrix< T > const &  that) const
inline

Inequality operator.

Definition at line 649 of file vnl_matrix.h.

◆ operator()() [1/2]

template<class T >
T & vnl_matrix< T >::operator() ( unsigned  r,
unsigned  c 
)

Access an element for reading or writing.

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

Definition at line 455 of file vnl_matrix.hxx.

◆ operator()() [2/2]

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

Access an element for reading.

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

Definition at line 467 of file vnl_matrix.hxx.

◆ operator+() [1/2]

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator+ ( T const &  v) const
inline

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

Definition at line 308 of file vnl_matrix.h.

◆ operator+() [2/2]

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator+ ( vnl_matrix< T > const &  rhs) const
inline

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

Definition at line 320 of file vnl_matrix.h.

◆ operator+=() [1/2]

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

Add rhs to each element of lhs matrix in situ.

Definition at line 533 of file vnl_matrix.hxx.

◆ operator+=() [2/2]

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

Add rhs to lhs matrix in situ.

Adds lhs matrix with rhs matrix, and stores in place in lhs matrix.

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

Definition at line 573 of file vnl_matrix.hxx.

◆ operator-() [1/3]

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

Negate all elements of matrix.

Returns new matrix which is the negation of THIS matrix.

O(m*n).

Definition at line 624 of file vnl_matrix.hxx.

◆ operator-() [2/3]

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator- ( T const &  v) const
inline

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

Definition at line 311 of file vnl_matrix.h.

◆ operator-() [3/3]

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator- ( vnl_matrix< T > const &  rhs) const
inline

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

Definition at line 322 of file vnl_matrix.h.

◆ operator-=() [1/2]

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

Subtract rhs from each element of lhs matrix in situ.

Definition at line 542 of file vnl_matrix.hxx.

◆ operator-=() [2/2]

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

Subtract rhs from lhs matrix in situ.

Subtract lhs matrix with rhs matrix and store in place in lhs matrix.

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

Definition at line 594 of file vnl_matrix.hxx.

◆ operator/()

template<class T>
vnl_matrix<T> vnl_matrix< T >::operator/ ( T const &  v) const
inline

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

Definition at line 317 of file vnl_matrix.h.

◆ operator/=()

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

Scalar division of lhs matrix in situ by rhs.

Definition at line 560 of file vnl_matrix.hxx.

◆ operator=() [1/2]

template<class T>
vnl_matrix<T>& vnl_matrix< T >::operator= ( T const &  v)
inline

Set all elements to value v.

Complexity $O(r.c)$

Definition at line 274 of file vnl_matrix.h.

◆ operator=() [2/2]

template<class T>
vnl_matrix< T > & vnl_matrix< T >::operator= ( vnl_matrix< T > const &  rhs)

Copies all elements of rhs matrix into lhs matrix.

Copies all elements of rhs matrix into lhs matrix. O(m*n).

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

If needed, the arrays in lhs matrix are freed up, and new arrays are allocated to match the dimensions of the rhs matrix.

Definition at line 482 of file vnl_matrix.hxx.

◆ operator==()

template<class T>
bool vnl_matrix< T >::operator== ( vnl_matrix< T > const &  that) const
inline

Equality operator.

Definition at line 646 of file vnl_matrix.h.

◆ operator[]() [1/2]

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

return pointer to given row.

No boundary checking here.

Definition at line 197 of file vnl_matrix.h.

◆ operator[]() [2/2]

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

return pointer to given row.

No boundary checking here.

Definition at line 201 of file vnl_matrix.h.

◆ operator_eq()

template<class T>
bool vnl_matrix< T >::operator_eq ( vnl_matrix< T > const &  rhs) const

Return true if *this == rhs.

Two matrices are equal if and only if they have the same dimensions and the same values.

O(m*n). Elements are compared with operator== as default. Change this default with set_compare() at run time or by specializing vnl_matrix_compare at compile time.

Definition at line 1136 of file vnl_matrix.hxx.

◆ operator_inf_norm()

template<class T >
vnl_matrix< T >::abs_t vnl_matrix< T >::operator_inf_norm ( ) const

Definition at line 1486 of file vnl_matrix.hxx.

◆ operator_one_norm()

template<class T >
vnl_matrix< T >::abs_t vnl_matrix< T >::operator_one_norm ( ) const

Definition at line 1470 of file vnl_matrix.hxx.

◆ print()

template<class T >
void vnl_matrix< T >::print ( std::ostream &  os) const

Print matrix to os in some hopefully sensible format.

Definition at line 500 of file vnl_matrix.hxx.

◆ put()

template<class T>
void vnl_matrix< T >::put ( unsigned  r,
unsigned  c,
T const &  v 
)
inline

set element with boundary checks if error checking is on.

Puts value into element at specified row and column. O(1).

Checks for valid range of indices.

Definition at line 700 of file vnl_matrix.h.

◆ read()

template<class T >
vnl_matrix< T > vnl_matrix< T >::read ( std::istream &  s)
static

Read a vnl_matrix from an ascii std::istream, automatically determining file size if the input matrix has zero size.

Read a vnl_matrix from an ascii std::istream.

Automatically determines file size if the input matrix has zero size. This is a static method so you can type <verb> vnl_matrix<float> M = vnl_matrix<float>::read(cin); </verb> which many people prefer to the ">>" alternative.

Definition at line 1412 of file vnl_matrix.hxx.

◆ read_ascii()

template<class T >
bool vnl_matrix< T >::read_ascii ( std::istream &  s)

Read a vnl_matrix from an ascii std::istream.

Automatically determines file size if the input matrix has zero size.

Definition at line 1287 of file vnl_matrix.hxx.

◆ rms()

template<class T>
abs_t vnl_matrix< T >::rms ( ) const
inline

Return RMS of all elements.

Definition at line 529 of file vnl_matrix.h.

◆ rows()

template<class T>
unsigned int vnl_matrix< T >::rows ( ) const
inline

Return the number of rows.

Definition at line 179 of file vnl_matrix.h.

◆ scale_column()

template<class T>
vnl_matrix< T > & vnl_matrix< T >::scale_column ( unsigned  col,
value 
)

Scales elements in given column by a factor T, and returns "*this".

Multiply column[column_index] by value.

Returning "*this" allows "chaining" two or more operations: e.g., to set a 3x3 matrix to [3 0 0][0 2 0][0 0 1], one could say

M.set_identity().scale_row(0,3).scale_column(1,2);

Definition at line 920 of file vnl_matrix.hxx.

◆ scale_row()

template<class T>
vnl_matrix< T > & vnl_matrix< T >::scale_row ( unsigned  row,
value 
)

Scales elements in given row by a factor T, and returns "*this".

Multiply row[row_index] by value.

Returning "*this" allows "chaining" two or more operations: e.g., to set a 3x3 matrix to [3 0 0][0 2 0][0 0 1], one could say

M.set_identity().scale_row(0,3).scale_column(1,2);

Definition at line 907 of file vnl_matrix.hxx.

◆ set()

template<class T>
vnl_matrix& vnl_matrix< T >::set ( T const *  d)
inline

Fills (laminates) this matrix with the given data, then returns it.

A synonym for copy_in()

Definition at line 265 of file vnl_matrix.h.

◆ set_column() [1/3]

template<class T>
vnl_matrix< T > & vnl_matrix< T >::set_column ( unsigned  i,
T const *  v 
)

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

Set column[column_index] to data at given address.

Definition at line 1080 of file vnl_matrix.hxx.

◆ set_column() [2/3]

template<class T>
vnl_matrix< T > & vnl_matrix< T >::set_column ( unsigned  i,
value 
)

Set the elements of the i'th column to value, then return *this.

Set column[column_index] to given value.

Definition at line 1101 of file vnl_matrix.hxx.

◆ set_column() [3/3]

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

Set j-th column to v, then return *this.

Set column[column_index] to given vector.

Definition at line 1089 of file vnl_matrix.hxx.

◆ set_columns()

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

Set columns to those in M, starting at starting_column, then return *this.

Set columns starting at starting_column to given matrix.

Definition at line 1111 of file vnl_matrix.hxx.

◆ set_diagonal()

template<class T>
vnl_matrix< T > & vnl_matrix< T >::set_diagonal ( vnl_vector< T > const &  diag)

Sets the diagonal elements of this matrix to the specified list of values.

Returning "*this" allows "chaining" two or more operations: see the reasoning (and the examples) in the documentation for method fill_diagonal().

Definition at line 440 of file vnl_matrix.hxx.

◆ set_identity()

template<class T >
vnl_matrix< T > & vnl_matrix< T >::set_identity ( )

Sets this matrix to an identity matrix, then returns "*this".

Fill this matrix with a matrix having 1s on the main diagonal and 0s elsewhere.

Returning "*this" allows e.g. passing an identity matrix as argument to a function f, without having to name the constructed matrix:

Returning "*this" also allows "chaining" two or more operations: e.g., to set a 3x3 matrix to [3 0 0][0 2 0][0 0 1], one could say

M.set_identity().scale_row(0,3).scale_column(1,2);

If the matrix is not square, anyhow set main diagonal to 1, the rest to 0.

Definition at line 853 of file vnl_matrix.hxx.

◆ set_row() [1/3]

template<class T>
vnl_matrix< T > & vnl_matrix< T >::set_row ( unsigned  i,
T const *  v 
)

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

Set row[row_index] to data at given address. No bounds check.

Definition at line 1048 of file vnl_matrix.hxx.

◆ set_row() [2/3]

template<class T>
vnl_matrix< T > & vnl_matrix< T >::set_row ( unsigned  i,
value 
)

Set the elements of the i'th row to value, then return *this.

Set row[row_index] to given value.

Definition at line 1069 of file vnl_matrix.hxx.

◆ set_row() [3/3]

template<class T>
vnl_matrix< T > & vnl_matrix< T >::set_row ( unsigned  i,
vnl_vector< T > const &  v 
)

Set the i-th row.

Set row[row_index] to given vector.

Definition at line 1057 of file vnl_matrix.hxx.

◆ set_size()

template<class T >
bool vnl_matrix< T >::set_size ( unsigned  r,
unsigned  c 
)

Resize to r rows by c columns. Old data lost.

Returns true if size changed.

Definition at line 390 of file vnl_matrix.hxx.

◆ size()

template<class T>
unsigned int vnl_matrix< T >::size ( ) const
inline

Return the total number of elements stored by the matrix.

This equals rows() * cols()

Definition at line 176 of file vnl_matrix.h.

◆ swap()

template<class T>
void vnl_matrix< T >::swap ( vnl_matrix< T > &  that)

Swap this matrix with that matrix.

Definition at line 1420 of file vnl_matrix.hxx.

◆ transpose()

template<class T >
vnl_matrix< T > vnl_matrix< T >::transpose ( ) const

Return transpose.

Returns new matrix with rows and columns transposed.

O(m*n).

Definition at line 682 of file vnl_matrix.hxx.

◆ update()

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

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

Replaces the submatrix of THIS matrix, starting at top left corner, by the elements of matrix m. O(m*n).

This is the reverse of extract().

Definition at line 707 of file vnl_matrix.hxx.

Friends And Related Function Documentation

◆ operator *() [1/7]

template<class T , unsigned int R, unsigned int C>
vnl_matrix_fixed< T, R, C > operator * ( vnl_matrix_fixed< T, R, C > const &  A,
vnl_diag_matrix_fixed< T, C > const &  D 
)
related

Multiply a vnl_matrix by a vnl_diag_matrix_fixed. Just scales the columns - mn flops.

Definition at line 234 of file vnl_diag_matrix_fixed.h.

◆ operator *() [2/7]

template<class T >
vnl_matrix< T > operator * ( vnl_matrix< T > const &  A,
vnl_diag_matrix< T > const &  D 
)
related

Multiply a vnl_matrix by a vnl_diag_matrix. Just scales the columns - mn flops.

Definition at line 239 of file vnl_diag_matrix.h.

◆ operator *() [3/7]

template<class T , unsigned int R, unsigned int C>
vnl_matrix_fixed< T, R, C > operator * ( vnl_diag_matrix_fixed< T, R > const &  D,
vnl_matrix_fixed< T, R, C > const &  A 
)
related

Multiply a vnl_diag_matrix_fixed by a vnl_matrix. Just scales the rows - mn flops.

Definition at line 247 of file vnl_diag_matrix_fixed.h.

◆ operator *() [4/7]

template<class T >
vnl_matrix< T > operator * ( vnl_diag_matrix< T > const &  D,
vnl_matrix< T > const &  A 
)
related

Multiply a vnl_diag_matrix by a vnl_matrix. Just scales the rows - mn flops.

Definition at line 253 of file vnl_diag_matrix.h.

◆ operator *() [5/7]

template<class T >
vnl_sparse_matrix< T > operator * ( T const &  value,
vnl_sparse_matrix< T > const &  m 
)
related

Definition at line 310 of file vnl_sparse_matrix.h.

◆ operator *() [6/7]

template<class T >
vnl_vector< T > operator * ( vnl_matrix< T > const &  m,
vnl_vector< T > const &  v 
)
related

multiply matrix and (column) vector. O(m*n).

Definition at line 442 of file vnl_vector.h.

◆ operator *() [7/7]

template<class T >
vnl_matrix< T > operator * ( T const &  value,
vnl_matrix< T > const &  m 
)
related

Definition at line 717 of file vnl_matrix.h.

◆ operator+() [1/5]

template<class T , unsigned int N>
vnl_matrix_fixed< T, N, N > operator+ ( vnl_matrix_fixed< T, N, N > const &  A,
vnl_diag_matrix_fixed< T, N > const &  D 
)
related

Add a vnl_diag_matrix_fixed to a vnl_matrix. n adds, mn copies.

Definition at line 272 of file vnl_diag_matrix_fixed.h.

◆ operator+() [2/5]

template<class T >
vnl_matrix< T > operator+ ( vnl_matrix< T > const &  A,
vnl_diag_matrix< T > const &  D 
)
related

Add a vnl_diag_matrix to a vnl_matrix. n adds, mn copies.

Definition at line 280 of file vnl_diag_matrix.h.

◆ operator+() [3/5]

template<class T , unsigned int N>
vnl_matrix_fixed< T, N, N > operator+ ( vnl_diag_matrix_fixed< T, N > const &  D,
vnl_matrix_fixed< T, N, N > const &  A 
)
related

Add a vnl_matrix to a vnl_diag_matrix_fixed. n adds, mn copies.

Definition at line 285 of file vnl_diag_matrix_fixed.h.

◆ operator+() [4/5]

template<class T >
vnl_matrix< T > operator+ ( vnl_diag_matrix< T > const &  D,
vnl_matrix< T > const &  A 
)
related

Add a vnl_matrix to a vnl_diag_matrix. n adds, mn copies.

Definition at line 295 of file vnl_diag_matrix.h.

◆ operator+() [5/5]

template<class T >
vnl_matrix< T > operator+ ( T const &  value,
vnl_matrix< T > const &  m 
)
related

Definition at line 725 of file vnl_matrix.h.

◆ operator-() [1/4]

template<class T , unsigned int N>
vnl_matrix_fixed< T, N, N > operator- ( vnl_matrix_fixed< T, N, N > const &  A,
vnl_diag_matrix_fixed< T, N > const &  D 
)
related

Subtract a vnl_diag_matrix_fixed from a vnl_matrix. n adds, mn copies.

Definition at line 305 of file vnl_diag_matrix_fixed.h.

◆ operator-() [2/4]

template<class T >
vnl_matrix< T > operator- ( vnl_matrix< T > const &  A,
vnl_diag_matrix< T > const &  D 
)
related

Subtract a vnl_diag_matrix from a vnl_matrix. n adds, mn copies.

Definition at line 316 of file vnl_diag_matrix.h.

◆ operator-() [3/4]

template<class T , unsigned int N>
vnl_matrix_fixed< T, N, N > operator- ( vnl_diag_matrix_fixed< T, N > const &  D,
vnl_matrix_fixed< T, N, N > const &  A 
)
related

Subtract a vnl_matrix from a vnl_diag_matrix_fixed. n adds, mn copies.

Definition at line 318 of file vnl_diag_matrix_fixed.h.

◆ operator-() [4/4]

template<class T >
vnl_matrix< T > operator- ( vnl_diag_matrix< T > const &  D,
vnl_matrix< T > const &  A 
)
related

Subtract a vnl_matrix from a vnl_diag_matrix. n adds, mn copies.

Definition at line 331 of file vnl_diag_matrix.h.

◆ operator<()

template<class T >
VNL_EXPORT bool operator< ( vnl_matrix< T > const &  lhs,
vnl_matrix< T > const &  rhs 
)
related

Define a complete ordering on vnl_matrix.

This is useful to create a set, or map of matrices.

The ordering itself is implementation defined - so don't rely on the meaning of less here.

Definition at line 48 of file vnl_operators.h.

◆ swap()

template<class T >
void swap ( vnl_matrix< T > &  A,
vnl_matrix< T > &  B 
)
related

Swap two matrices.

Definition at line 733 of file vnl_matrix.h.

◆ vnl_complexify() [1/2]

template<class T >
VNL_EXPORT vnl_matrix< std::complex< T > > vnl_complexify ( vnl_matrix< T > const &  R)
related

Return complexified version of real matrix R.

Definition at line 57 of file vnl_complex_ops.hxx.

◆ vnl_complexify() [2/2]

template<class T >
VNL_EXPORT vnl_matrix< std::complex< T > > vnl_complexify ( vnl_matrix< T > const &  R,
vnl_matrix< T > const &  I 
)
related

Return complex matrix R+j*I from two real matrices R and I.

Definition at line 105 of file vnl_complex_ops.hxx.

◆ vnl_determinant()

template<class T >
T vnl_determinant ( vnl_matrix< T > const &  M,
bool  balance = false 
)
related

evaluation using direct methods for sizes of 2x2, 3x3, and 4x4 or qr decomposition for other matrices.

◆ vnl_imag()

template<class T >
VNL_EXPORT vnl_matrix< T > vnl_imag ( vnl_matrix< std::complex< T > > const &  C)
related

Matrix of imaginary parts of vnl_matrix<std::complex<T> >.

Definition at line 240 of file vnl_complex_ops.hxx.

◆ vnl_inverse()

template<class T >
vnl_matrix< T > vnl_inverse ( vnl_matrix< T > const &  m)
related

Calculates inverse of a small vnl_matrix_fixed (not using svd).

This allows you to write e.g.

x = vnl_inverse(A) * b;

Note that this function is inlined (except for the call to vnl_det()), which makes it much faster than the vnl_matrix_inverse class in vnl/algo since that one is using svd.

Definition at line 171 of file vnl_inverse.h.

◆ vnl_inverse_transpose()

template<class T >
vnl_matrix< T > vnl_inverse_transpose ( vnl_matrix< T > const &  m)
related

Calculates transpose of the inverse of a small vnl_matrix_fixed (not using svd).

This allows you to write e.g.

x = vnl_inverse_transpose(A) * b;

Note that this function is inlined (except for the call to vnl_det()), which makes it much faster than the vnl_matrix_inverse class in vnl/algo since that one is using svd. This is also faster than using

x = vnl_inverse(A).transpose() * b;

Definition at line 339 of file vnl_inverse.h.

◆ vnl_matlab_print()

template<class T >
VNL_EXPORT std::ostream & vnl_matlab_print ( std::ostream &  ,
vnl_matrix< T > const &  ,
char const *  variable_name = nullptr,
vnl_matlab_print_format  = vnl_matlab_print_format_default 
)
related

print a vnl_matrix<T>.

◆ vnl_matrix_update()

template<class T >
void vnl_matrix_update ( vnl_matrix< T > &  M,
const vnl_vector< T > &  a,
const vnl_vector< T > &  b 
)
related

Perform rank 1 update of M: M+=(a*b').

Requires a.size()==M.rows(), b.size()==M.columns()

Definition at line 20 of file vnl_matrix_update.h.

◆ vnl_orthogonal_complement()

template<class T >
vnl_matrix< T > vnl_orthogonal_complement ( vnl_vector< T > const &  v)
related

Return a matrix whose columns span is the orthogonal complement of v.

◆ vnl_power()

template<class T >
vnl_matrix< T > vnl_power ( vnl_matrix< T > const &  m,
int  n 
)
related

Calculates nth power of a square vnl_matrix (not using svd).

This allows you to write e.g.

x = vnl_power(A,7) * vnl_power(B,-4) * b;

Note that this function is inlined (except for the call to vnl_inverse()), which makes it much faster than a full-fledged square matrix power implementation using svd, which belongs in vnl/algo.

Definition at line 63 of file vnl_power.h.

◆ vnl_rank()

template<class T >
VNL_EXPORT unsigned int vnl_rank ( vnl_matrix< T > const &  mat,
vnl_rank_type  = vnl_rank_both 
)
related

Returns the rank of a matrix.

By default, the row rank of the matrix is determined. Specify vnl_rank_column to obtain the column rank.

◆ vnl_rank_column_reduce()

template<class T >
VNL_EXPORT vnl_matrix< T > vnl_rank_column_reduce ( vnl_matrix< T > const &  mat,
vnl_rank_pivot_type  = vnl_rank_pivot_all 
)
related

Column reduce a matrix.

◆ vnl_rank_row_column_reduce()

template<class T >
VNL_EXPORT vnl_matrix< T > vnl_rank_row_column_reduce ( vnl_matrix< T > const &  mat,
vnl_rank_pivot_type  = vnl_rank_pivot_all 
)
related

Row and column reduce a matrix.

Perform both row reduction and column reduction on a matrix. The resulting matrix will in general no longer span the same row space (or column space) as the original matrix, but the rank will not have changed, and the number of nonzero elements will be minimal (viz at most one per row and one per column).

◆ vnl_rank_row_reduce()

template<class T >
VNL_EXPORT vnl_matrix< T > vnl_rank_row_reduce ( vnl_matrix< T > const &  mat,
vnl_rank_pivot_type  = vnl_rank_pivot_all 
)
related

Row reduce a matrix.

First try to use 1 or -1 as pivot element in each row, to avoid divisions; then use any nonzero element as candidate pivot. Repeat this process until the matrix does not change any more. At that point, the matrix spans the same row space as before and contains as many zeros as possible.

When specifying vnl_rank_pivot_one is given as second argument, only elements with value 1 or -1 are used as candidate pivot elements.

Note that for integer matrices, the resulting matrix is still integer, and is guaranteed to be row equivalent with the original matrix.

◆ vnl_real()

template<class T >
VNL_EXPORT vnl_matrix< T > vnl_real ( vnl_matrix< std::complex< T > > const &  C)
related

Matrix of real parts of vnl_matrix<std::complex<T> >.

Definition at line 169 of file vnl_complex_ops.hxx.

◆ vnl_rotation_matrix()

template<class T>
VNL_EXPORT vnl_matrix< double > vnl_rotation_matrix ( vnl_vector< double > const &  axis)
related

Returns an orthogonal 3x3 matrix which is a rotation about the axis, by an angle equal to ||axis||.

Definition at line 69 of file vnl_rotation_matrix.cxx.

◆ vnl_trace()

template<class T >
T vnl_trace ( vnl_matrix< T > const &  M)
related

Calculate trace of a matrix.

Definition at line 22 of file vnl_trace.h.

◆ vsl_b_read()

template<class T >
void vsl_b_read ( vsl_b_istream &  is,
vnl_matrix< T > &  v 
)
related

Binary load vnl_matrix from stream.

◆ vsl_b_write()

template<class T >
void vsl_b_write ( vsl_b_ostream &  os,
const vnl_matrix< T > &  v 
)
related

Binary save vnl_matrix to stream.

◆ vsl_print_summary()

template<class T >
void vsl_print_summary ( std::ostream &  os,
const vnl_matrix< T > &  b 
)
related

Print human readable summary of object to a stream.

◆ x_write()

template<class T >
void VNL_EXPORT x_write ( std::ostream &  os,
vnl_matrix< T > const &  v,
std::string  name = "vnl_matrix< T >" 
)
related

XML save vnl_matrix to stream.

◆ x_write_tree()

template<class T >
void VNL_EXPORT x_write_tree ( std::ostream &  os,
vnl_matrix< T > const &  v,
std::string  name = "vnl_matrix< T >" 
)
related

XML save vnl_matrix as a 3-level tree to stream.

Member Data Documentation

◆ data

template<class T>
T** vnl_matrix< T >::data
protected

Definition at line 666 of file vnl_matrix.h.

◆ num_cols

template<class T>
unsigned vnl_matrix< T >::num_cols
protected

Definition at line 665 of file vnl_matrix.h.

◆ num_rows

template<class T>
unsigned vnl_matrix< T >::num_rows
protected

Definition at line 664 of file vnl_matrix.h.


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