Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Related Functions | List of all members
vnl_matrix_fixed< T, num_rows, num_cols > Class Template Reference

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

#include <vnl_fwd.h>

Inheritance diagram for vnl_matrix_fixed< T, num_rows, num_cols >:
Inheritance graph
[legend]

Public Types

typedef vnl_matrix_fixed< T, num_rows, num_cols > self
 
typedef size_t size_type
 
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_fixed ()=default
 Construct an empty num_rows*num_cols matrix. More...
 
 vnl_matrix_fixed (const vnl_matrix_fixed &rhs)=default
 Construct an m*n Matrix and copy rhs into it. More...
 
 vnl_matrix_fixed (vnl_matrix_fixed &&other)=default
 
vnl_matrix_fixedoperator= (const vnl_matrix_fixed &rhs)=default
 Copy another vnl_matrix_fixed<T,m,n> into this. More...
 
vnl_matrix_fixedoperator= (vnl_matrix_fixed &&rhs)=default
 
 ~vnl_matrix_fixed ()=default
 
 vnl_matrix_fixed (unsigned VXL_USED_IN_DEBUG(n), unsigned VXL_USED_IN_DEBUG(m))
 Construct an empty num_rows*num_cols matrix. More...
 
 vnl_matrix_fixed (T value)
 Construct an m*n matrix and fill with value. More...
 
 vnl_matrix_fixed (const T *datablck)
 Construct an m*n Matrix and copy data into it row-wise. More...
 
 vnl_matrix_fixed (const vnl_matrix< T > &rhs)
 Construct an m*n Matrix and copy rhs into it. More...
 
vnl_matrix_fixedoperator= (T const &v)
 Set all elements to value v. More...
 
vnl_matrix_fixedoperator= (const vnl_matrix< T > &rhs)
 Copy a vnl_matrix into this. 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 &v)
 set element. More...
 
get (unsigned r, unsigned c) const
 get element. More...
 
vnl_matrix_fixedset (unsigned r, unsigned c, T const &v)
 set element, and return *this. 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_matrix_fixedfill (T)
 Sets all elements of matrix to specified value, and returns "*this". More...
 
vnl_matrix_fixedfill_diagonal (T)
 Sets all diagonal elements of matrix to specified value; returns "*this". More...
 
vnl_matrix_fixedset_diagonal (vnl_vector< T > const &)
 Sets the diagonal elements of this matrix to the specified list of values. More...
 
vnl_matrix_fixedcopy_in (T const *)
 Fills (laminates) this matrix with the given data, then returns it. More...
 
vnl_matrix_fixedset (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_fixedinplace_transpose ()
 Transposes this matrix efficiently, if it is square, and returns it. More...
 
vnl_matrix_fixedoperator+= (T s)
 Add s to each element of lhs matrix in situ. More...
 
vnl_matrix_fixedoperator-= (T s)
 Subtract s from each element of lhs matrix in situ. More...
 
vnl_matrix_fixedoperator *= (T s)
 
vnl_matrix_fixedoperator/= (T s)
 
vnl_matrix_fixedoperator+= (vnl_matrix_fixed const &m)
 
vnl_matrix_fixedoperator+= (vnl_matrix< T > const &m)
 
vnl_matrix_fixedoperator-= (vnl_matrix_fixed const &m)
 
vnl_matrix_fixedoperator-= (vnl_matrix< T > const &m)
 
vnl_matrix_fixed operator- () const
 Negate all elements of matrix. More...
 
vnl_matrix_fixedoperator *= (vnl_matrix_fixed< T, num_cols, num_cols > const &s)
 
vnl_matrix_fixed apply (T(*f)(T)) const
 Make a new matrix by applying function to each element. More...
 
vnl_matrix_fixed apply (T(*f)(T const &)) const
 Make a new matrix by applying function to each element. More...
 
vnl_vector_fixed< T, num_rows > apply_rowwise (T(*f)(vnl_vector_fixed< T, num_cols > const &)) const
 Make a vector by applying a function across rows. More...
 
vnl_vector_fixed< T, num_cols > apply_columnwise (T(*f)(vnl_vector_fixed< T, num_rows > const &)) const
 Make a vector by applying a function across columns. More...
 
vnl_matrix_fixed< T, num_cols, num_rows > transpose () const
 Return transpose. More...
 
vnl_matrix_fixed< T, num_cols, num_rows > conjugate_transpose () const
 Return conjugate transpose. More...
 
vnl_matrix_fixedupdate (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_matrix_fixedset_column (unsigned i, T const *v)
 Set the elements of the i'th column to v[i] (No bounds checking). More...
 
vnl_matrix_fixedset_column (unsigned i, T value)
 Set the elements of the i'th column to value, then return *this. More...
 
vnl_matrix_fixedset_column (unsigned j, vnl_vector< T > const &v)
 Set j-th column to v, then return *this. More...
 
vnl_matrix_fixedset_column (unsigned j, vnl_vector_fixed< T, num_rows > const &v)
 Set j-th column to v, then return *this. More...
 
vnl_matrix_fixedset_columns (unsigned starting_column, vnl_matrix< T > const &M)
 Set columns to those in M, starting at starting_column, then return *this. More...
 
vnl_matrix_fixedset_row (unsigned i, T const *v)
 Set the elements of the i'th row to v[i] (No bounds checking). More...
 
vnl_matrix_fixedset_row (unsigned i, T value)
 Set the elements of the i'th row to value, then return *this. More...
 
vnl_matrix_fixedset_row (unsigned i, vnl_vector< T > const &)
 Set the i-th row, then return *this. More...
 
vnl_matrix_fixedset_row (unsigned i, vnl_vector_fixed< T, num_cols > const &)
 Set the i-th row, then return *this. 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_fixed< T, num_cols > get_row (unsigned row) const
 Get a vector equal to the given row. More...
 
vnl_vector_fixed< T, num_rows > get_column (unsigned col) 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_fixed< T, num_rows *num_cols > flatten_row_major () const
 Flatten row-major (C-style). More...
 
vnl_vector_fixed< T, num_rows *num_cols > flatten_column_major () const
 Flatten column-major (Fortran-style). More...
 
vnl_matrix_fixedset_identity ()
 Sets this matrix to an identity matrix, then returns "*this". More...
 
vnl_matrix_fixedflipud ()
 Reverses the order of rows, and returns "*this". More...
 
vnl_matrix_fixedfliplr ()
 Reverses the order of columns, and returns "*this". More...
 
vnl_matrix_fixednormalize_rows ()
 Normalizes each row so it is a unit vector, and returns "*this". More...
 
vnl_matrix_fixednormalize_columns ()
 Normalizes each column so it is a unit vector, and returns "*this". More...
 
vnl_matrix_fixedscale_row (unsigned row, T value)
 Scales elements in given row by a factor T, and returns "*this". More...
 
vnl_matrix_fixedscale_column (unsigned col, T value)
 Scales elements in given column by a factor T, and returns "*this". More...
 
void swap (vnl_matrix_fixed< T, num_rows, num_cols > &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_fixed< T, num_rows, num_cols > 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(nr_rows), unsigned VXL_USED_IN_DEBUG(nr_cols)) 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)
 
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...
 
vnl_matrix_ref< T > as_ref ()
 Explicit conversion to a vnl_matrix_ref. More...
 
const vnl_matrix_ref< T > as_ref () const
 Explicit conversion to a vnl_matrix_ref. More...
 
 operator const vnl_matrix_ref< T > () const
 Cheap conversion to vnl_matrix_ref. More...
 
const vnl_matrix< T > as_matrix () const
 Convert to a vnl_matrix. 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...
 
bool operator_eq (vnl_matrix_fixed const &rhs) const
 Return true if *this == rhs. More...
 
bool operator== (vnl_matrix_fixed const &that) const
 Equality operator. More...
 
bool operator!= (vnl_matrix_fixed const &that) const
 Inequality operator. 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...
 

Static Public Member Functions

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

Private Member Functions

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

Private Attributes

data_ [num_rows][num_cols]
 

Related Functions

(Note that these are not member functions.)

template<class T , unsigned m, unsigned n>
vnl_determinant (vnl_matrix_fixed< T, m, n > 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 , unsigned m, unsigned n>
void vsl_b_write (vsl_b_ostream &os, const vnl_matrix_fixed< T, m, n > &v)
 Binary save vnl_matrix_fixed to stream. More...
 
template<class T , unsigned m, unsigned n>
void vsl_b_read (vsl_b_istream &is, vnl_matrix_fixed< T, m, n > &v)
 Binary load vnl_matrix_fixed from stream. More...
 
template<class T , unsigned m, unsigned n>
void vsl_print_summary (std::ostream &os, const vnl_matrix_fixed< T, m, n > &b)
 Print human readable summary of object to a stream. More...
 
template<class T , unsigned int r, unsigned int c>
VNL_EXPORT vnl_matrix_fixed< std::complex< T >, r, c > vnl_complexify (vnl_matrix_fixed< T, r, c > const &R)
 Return complexified version of real fixed matrix R. More...
 
template<class T , unsigned int r, unsigned int c>
vnl_matrix_fixed< std::complex< T >, r, c > vnl_complexify (vnl_matrix_fixed< T, r, c > const &R, vnl_matrix_fixed< T, r, c > const &I)
 Return complex fixed matrix R+j*I from two real fixed matrices R and I. More...
 
template<class T , unsigned int n>
vnl_diag_matrix_fixed< std::complex< T >, n > vnl_complexify (vnl_diag_matrix_fixed< T, n > const &R, vnl_diag_matrix_fixed< T, n > const &I)
 Return complex fixed diagonal matrix R+j*I from two real fixed diagonal matrices R and I. More...
 
template<class T >
vnl_det (vnl_matrix_fixed< T, 1, 1 > const &m)
 Determinant of small size matrices. More...
 
template<class T >
vnl_det (vnl_matrix_fixed< T, 2, 2 > const &m)
 Determinant of small size matrices. More...
 
template<class T >
vnl_det (vnl_matrix_fixed< T, 3, 3 > const &m)
 Determinant of small size matrices. More...
 
template<class T >
vnl_det (vnl_matrix_fixed< T, 4, 4 > const &m)
 Determinant of small size matrices. More...
 
template<class T , unsigned int NRow, unsigned int NCol>
vnl_matrix_fixed< T, NRow, NCol > vnl_imag (vnl_matrix_fixed< std::complex< T >, NRow, NCol > const &C)
 Matrix of imaginary parts of vnl_matrix_fixed<std::complex<T>,NRow,NCol >. More...
 
template<class T >
vnl_matrix_fixed< T, 1, 1 > vnl_inverse (vnl_matrix_fixed< T, 1, 1 > const &m)
 Calculates inverse of a small vnl_matrix_fixed (not using svd). More...
 
template<class T >
vnl_matrix_fixed< T, 2, 2 > vnl_inverse (vnl_matrix_fixed< T, 2, 2 > const &m)
 Calculates inverse of a small vnl_matrix_fixed (not using svd). More...
 
template<class T >
vnl_matrix_fixed< T, 3, 3 > vnl_inverse (vnl_matrix_fixed< T, 3, 3 > const &m)
 Calculates inverse of a small vnl_matrix_fixed (not using svd). More...
 
template<class T >
vnl_matrix_fixed< T, 4, 4 > vnl_inverse (vnl_matrix_fixed< T, 4, 4 > const &m)
 Calculates inverse of a small vnl_matrix_fixed (not using svd). More...
 
template<class T >
vnl_matrix_fixed< T, 1, 1 > vnl_inverse_transpose (vnl_matrix_fixed< T, 1, 1 > const &m)
 Calculates transpose of the inverse of a small vnl_matrix_fixed (not using svd). More...
 
template<class T >
vnl_matrix_fixed< T, 2, 2 > vnl_inverse_transpose (vnl_matrix_fixed< T, 2, 2 > const &m)
 Calculates transpose of the inverse of a small vnl_matrix_fixed (not using svd). More...
 
template<class T >
vnl_matrix_fixed< T, 3, 3 > vnl_inverse_transpose (vnl_matrix_fixed< T, 3, 3 > const &m)
 Calculates transpose of the inverse of a small vnl_matrix_fixed (not using svd). More...
 
template<class T >
vnl_matrix_fixed< T, 4, 4 > vnl_inverse_transpose (vnl_matrix_fixed< T, 4, 4 > const &m)
 Calculates transpose of the inverse of a small vnl_matrix_fixed (not using svd). More...
 
vnl_double_3 operator * (const vnl_double_3x3 &A, const vnl_double_3 &x)
 The binary multiplication operator. More...
 
template<class T , unsigned int n, unsigned int m>
VNL_EXPORT std::ostream & vnl_matlab_print (std::ostream &, vnl_matrix_fixed< T, n, m > const &, char const *variable_name=nullptr, vnl_matlab_print_format=vnl_matlab_print_format_default)
 print a vnl_matrix_fixed<T>. More...
 
template<class SquareMatrix >
VNL_EXPORT bool vnl_matrix_exp (SquareMatrix const &X, SquareMatrix &expX, double max_err)
 Compute the exponential of a square matrix - fiddly form. More...
 
template<class SquareMatrix >
VNL_EXPORT SquareMatrix vnl_matrix_exp (SquareMatrix const &X)
 Compute the exponential of a square matrix - easy form. More...
 
template<class T , unsigned M, unsigned N>
vnl_vector_fixed< T, M > operator * (const vnl_matrix_fixed< T, M, N > &a, const vnl_vector_fixed< T, N > &b)
 Multiply conformant vnl_matrix_fixed (M x N) and vector_fixed (N). More...
 
template<class T , unsigned M, unsigned N>
vnl_vector_fixed< T, N > operator * (const vnl_vector_fixed< T, M > &a, const vnl_matrix_fixed< T, M, N > &b)
 Multiply conformant vector_fixed (M) and vnl_matrix_fixed (M x N). More...
 
template<class T , unsigned M, unsigned N, unsigned O>
vnl_matrix_fixed< T, M, O > operator * (const vnl_matrix_fixed< T, M, N > &a, const vnl_matrix_fixed< T, N, O > &b)
 Multiply two conformant vnl_matrix_fixed (M x N) times (N x O). More...
 
template<class T , unsigned M, unsigned N>
vnl_vector_fixed< T, M > operator * (const vnl_matrix_fixed_ref_const< T, M, N > &a, const vnl_vector_fixed_ref_const< T, N > &b)
 Multiply conformant vnl_matrix_fixed (M x N) and vector_fixed (N). More...
 
template<class T , unsigned M, unsigned N, unsigned O>
vnl_matrix_fixed< T, M, O > operator * (const vnl_matrix_fixed_ref_const< T, M, N > &a, const vnl_matrix_fixed_ref_const< T, N, O > &b)
 Multiply two conformant vnl_matrix_fixed (M x N) times (N x O). More...
 
template<class T , unsigned int n, unsigned int m>
VNL_EXPORT bool operator< (vnl_matrix_fixed< T, n, m > const &lhs, vnl_matrix_fixed< T, n, m > const &rhs)
 Define a complete ordering on vnl_matrix_fixed. More...
 
template<class T , unsigned int d>
vnl_matrix_fixed< T, d, d > vnl_power (vnl_matrix_fixed< T, d, d > const &m, int n)
 Calculates nth power of a vnl_matrix_fixed (not using svd). More...
 
template<class T , unsigned int NRow, unsigned int NCol>
vnl_matrix_fixed< T, NRow, NCol > vnl_real (vnl_matrix_fixed< std::complex< T >, NRow, NCol > const &C)
 Matrix of real parts of vnl_matrix_fixed<std::complex<T>,NRow,NCol >. More...
 
VNL_EXPORT vnl_matrix_fixed< double, 3, 3 > vnl_rotation_matrix (vnl_vector_fixed< double, 3 > const &axis)
 Returns an orthogonal 3x3 matrix which is a rotation about the axis, by an angle equal to ||axis||. More...
 
template<class T , unsigned int N1, unsigned int N2>
vnl_trace (vnl_matrix_fixed< T, N1, N2 > const &M)
 Calculate trace of a matrix. More...
 
template<class T , unsigned m, unsigned n>
void x_write (std::ostream &os, vnl_matrix_fixed< T, m, n > const &v, std::string name="vnl_matrix_fixed")
 XML save vnl_matrix_fixed to stream. More...
 
template<class T , unsigned m, unsigned n>
void x_write_tree (std::ostream &os, vnl_matrix_fixed< T, m, n > const &v, std::string name="vnl_matrix_fixed")
 XML save vnl_matrix_fixed as a 3-level tree to stream. More...
 

Detailed Description

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

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

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

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

Definition at line 23 of file vnl_fwd.h.

Member Typedef Documentation

◆ abs_t

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

Type def for norms.

Definition at line 542 of file vnl_matrix_fixed.h.

◆ const_iterator

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

Const iterators.

Definition at line 692 of file vnl_matrix_fixed.h.

◆ element_type

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

Definition at line 682 of file vnl_matrix_fixed.h.

◆ iterator

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

Iterators.

Definition at line 685 of file vnl_matrix_fixed.h.

◆ self

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

Definition at line 108 of file vnl_matrix_fixed.h.

◆ size_type

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

Definition at line 109 of file vnl_matrix_fixed.h.

Constructor & Destructor Documentation

◆ vnl_matrix_fixed() [1/7]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed< T, num_rows, num_cols >::vnl_matrix_fixed ( )
default

Construct an empty num_rows*num_cols matrix.

◆ vnl_matrix_fixed() [2/7]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed< T, num_rows, num_cols >::vnl_matrix_fixed ( const vnl_matrix_fixed< T, num_rows, num_cols > &  rhs)
default

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

Abort if rhs is not the same size.

◆ vnl_matrix_fixed() [3/7]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed< T, num_rows, num_cols >::vnl_matrix_fixed ( vnl_matrix_fixed< T, num_rows, num_cols > &&  other)
default

◆ ~vnl_matrix_fixed()

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed< T, num_rows, num_cols >::~vnl_matrix_fixed ( )
default

◆ vnl_matrix_fixed() [4/7]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed< T, num_rows, num_cols >::vnl_matrix_fixed ( unsigned   VXL_USED_IN_DEBUGn,
unsigned   VXL_USED_IN_DEBUG
)
inline

Construct an empty num_rows*num_cols matrix.

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

Definition at line 129 of file vnl_matrix_fixed.h.

◆ vnl_matrix_fixed() [5/7]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed< T, num_rows, num_cols >::vnl_matrix_fixed ( value)
inlineexplicit

Construct an m*n matrix and fill with value.

Definition at line 135 of file vnl_matrix_fixed.h.

◆ vnl_matrix_fixed() [6/7]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed< T, num_rows, num_cols >::vnl_matrix_fixed ( const T *  datablck)
inlineexplicit

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

Definition at line 144 of file vnl_matrix_fixed.h.

◆ vnl_matrix_fixed() [7/7]

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

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

Abort if rhs is not the same size.

Definition at line 151 of file vnl_matrix_fixed.h.

Member Function Documentation

◆ absolute_value_max()

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

Return largest absolute value.

Definition at line 557 of file vnl_matrix_fixed.h.

◆ absolute_value_sum()

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

Return sum of absolute values of elements.

Definition at line 554 of file vnl_matrix_fixed.h.

◆ add() [1/2]

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::add ( const T *  a,
const T *  b,
T *  r 
)
static

Definition at line 61 of file vnl_matrix_fixed.hxx.

◆ add() [2/2]

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::add ( const T *  a,
b,
T *  r 
)
static

Definition at line 71 of file vnl_matrix_fixed.hxx.

◆ apply() [1/2]

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > vnl_matrix_fixed< T, nrows, ncols >::apply ( T(*)(T)  f) const

Make a new matrix by applying function to each element.

Definition at line 216 of file vnl_matrix_fixed.hxx.

◆ apply() [2/2]

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > vnl_matrix_fixed< T, nrows, ncols >::apply ( T(*)(T const &)  f) const

Make a new matrix by applying function to each element.

Definition at line 206 of file vnl_matrix_fixed.hxx.

◆ apply_columnwise()

template<class T, unsigned nrows, unsigned ncols>
vnl_vector_fixed< T, ncols > vnl_matrix_fixed< T, nrows, ncols >::apply_columnwise ( T(*)(vnl_vector_fixed< T, nrows > const &)  f) const

Make a vector by applying a function across columns.

Definition at line 239 of file vnl_matrix_fixed.hxx.

◆ apply_rowwise()

template<class T, unsigned nrows, unsigned ncols>
vnl_vector_fixed< T, nrows > vnl_matrix_fixed< T, nrows, ncols >::apply_rowwise ( T(*)(vnl_vector_fixed< T, ncols > const &)  f) const

Make a vector by applying a function across rows.

Definition at line 227 of file vnl_matrix_fixed.hxx.

◆ arg_max()

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

Return location of maximum value of elements.

Definition at line 584 of file vnl_matrix_fixed.h.

◆ arg_min()

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

Return location of minimum value of elements.

Definition at line 581 of file vnl_matrix_fixed.h.

◆ array_inf_norm()

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

Return largest absolute element value.

Definition at line 551 of file vnl_matrix_fixed.h.

◆ array_one_norm()

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

Return sum of absolute values of elements.

Definition at line 545 of file vnl_matrix_fixed.h.

◆ array_two_norm()

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

Return square root of sum of squared absolute element values.

Definition at line 548 of file vnl_matrix_fixed.h.

◆ as_matrix()

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

Convert to a vnl_matrix.

Definition at line 678 of file vnl_matrix_fixed.h.

◆ as_ref() [1/2]

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

Explicit conversion to a vnl_matrix_ref.

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

See also
vnl_matrix_ref::non_const

Definition at line 662 of file vnl_matrix_fixed.h.

◆ as_ref() [2/2]

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

Explicit conversion to a vnl_matrix_ref.

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

See also
vnl_matrix_ref::non_const

Definition at line 669 of file vnl_matrix_fixed.h.

◆ assert_finite()

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

abort if matrix contains any INFs or NANs.

This function does or tests nothing if NDEBUG is defined

Definition at line 626 of file vnl_matrix_fixed.h.

◆ assert_finite_internal()

template<class T , unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::assert_finite_internal ( ) const
private

Abort if any element of M is inf or nan.

Definition at line 752 of file vnl_matrix_fixed.hxx.

◆ assert_size()

template<class T, unsigned int num_rows, unsigned int num_cols>
void vnl_matrix_fixed< T, num_rows, num_cols >::assert_size ( unsigned   VXL_USED_IN_DEBUGnr_rows,
unsigned   VXL_USED_IN_DEBUGnr_cols 
) const
inline

abort if size is not as expected.

This function does or tests nothing if NDEBUG is defined

Definition at line 617 of file vnl_matrix_fixed.h.

◆ assert_size_internal()

template<class T , unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::assert_size_internal ( unsigned  rs,
unsigned  cs 
) const
private

Abort unless M has the given size.

Definition at line 780 of file vnl_matrix_fixed.hxx.

◆ begin() [1/2]

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

Iterator pointing to start of data.

Definition at line 687 of file vnl_matrix_fixed.h.

◆ begin() [2/2]

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

Iterator pointing to start of data.

Definition at line 694 of file vnl_matrix_fixed.h.

◆ cols()

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

Return the number of columns.

A synonym for columns().

Definition at line 177 of file vnl_matrix_fixed.h.

◆ columns()

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

Return the number of columns.

A synonym for cols().

Definition at line 181 of file vnl_matrix_fixed.h.

◆ conjugate_transpose()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, ncols, nrows > vnl_matrix_fixed< T, nrows, ncols >::conjugate_transpose ( ) const

Return conjugate transpose.

Definition at line 263 of file vnl_matrix_fixed.hxx.

◆ copy_in()

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::copy_in ( T const *  p)

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

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:

Definition at line 324 of file vnl_matrix_fixed.hxx.

◆ copy_out()

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::copy_out ( T *  p) const

Fills 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.

Definition at line 332 of file vnl_matrix_fixed.hxx.

◆ data_block() [1/2]

template<class T , unsigned m, unsigned n>
T const * vnl_matrix_fixed< T, m, n >::data_block ( ) const

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

1d array, row-major order.

Definition at line 889 of file vnl_matrix_fixed.hxx.

◆ data_block() [2/2]

template<class T , unsigned m, unsigned n>
T * vnl_matrix_fixed< T, m, n >::data_block ( )

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

1d array, row-major order.

Definition at line 896 of file vnl_matrix_fixed.hxx.

◆ div() [1/2]

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::div ( const T *  a,
const T *  b,
T *  r 
)
static

Definition at line 125 of file vnl_matrix_fixed.hxx.

◆ div() [2/2]

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::div ( const T *  a,
b,
T *  r 
)
static

Definition at line 134 of file vnl_matrix_fixed.hxx.

◆ empty()

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

Return true iff the size is zero.

Definition at line 592 of file vnl_matrix_fixed.h.

◆ end() [1/2]

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

Iterator pointing to element beyond end of data.

Definition at line 689 of file vnl_matrix_fixed.h.

◆ end() [2/2]

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

Iterator pointing to element beyond end of data.

Definition at line 696 of file vnl_matrix_fixed.h.

◆ equal()

template<class T, unsigned nrows, unsigned ncols>
bool vnl_matrix_fixed< T, nrows, ncols >::equal ( const T *  a,
const T *  b 
)
static

Definition at line 143 of file vnl_matrix_fixed.hxx.

◆ extract() [1/2]

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix< T > vnl_matrix_fixed< T, nrows, ncols >::extract ( unsigned  r,
unsigned  c,
unsigned  top = 0,
unsigned  left = 0 
) const

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

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

Definition at line 293 of file vnl_matrix_fixed.hxx.

◆ extract() [2/2]

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::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 304 of file vnl_matrix_fixed.hxx.

◆ fill()

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::fill ( value)

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

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 156 of file vnl_matrix_fixed.hxx.

◆ fill_diagonal()

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::fill_diagonal ( value)

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

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 167 of file vnl_matrix_fixed.hxx.

◆ flatten_column_major()

template<class T , unsigned nrows, unsigned ncols>
vnl_vector_fixed< T, nrows *ncols > vnl_matrix_fixed< T, nrows, ncols >::flatten_column_major ( ) const

Flatten column-major (Fortran-style).

Definition at line 548 of file vnl_matrix_fixed.hxx.

◆ flatten_row_major()

template<class T , unsigned nrows, unsigned ncols>
vnl_vector_fixed< T, nrows *ncols > vnl_matrix_fixed< T, nrows, ncols >::flatten_row_major ( ) const

Flatten row-major (C-style).

Definition at line 539 of file vnl_matrix_fixed.hxx.

◆ fliplr()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::fliplr ( )

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

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 826 of file vnl_matrix_fixed.hxx.

◆ flipud()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::flipud ( )

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

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 810 of file vnl_matrix_fixed.hxx.

◆ fro_norm()

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

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

Definition at line 569 of file vnl_matrix_fixed.h.

◆ frobenius_norm()

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

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

Definition at line 566 of file vnl_matrix_fixed.h.

◆ get()

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

get element.

Definition at line 196 of file vnl_matrix_fixed.h.

◆ get_column()

template<class T , unsigned nrows, unsigned ncols>
vnl_vector_fixed< T, nrows > vnl_matrix_fixed< T, nrows, ncols >::get_column ( unsigned  col) const

Get a vector equal to the given column.

Create a vector out of column[column_index].

Definition at line 490 of file vnl_matrix_fixed.hxx.

◆ get_columns()

template<class T , unsigned int nrows, unsigned int ncols>
vnl_matrix< T > vnl_matrix_fixed< T, nrows, ncols >::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 519 of file vnl_matrix_fixed.hxx.

◆ get_diagonal()

template<class T , unsigned nrows, unsigned ncols>
vnl_vector< T > vnl_matrix_fixed< T, nrows, ncols >::get_diagonal ( ) const

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

Definition at line 529 of file vnl_matrix_fixed.hxx.

◆ get_n_columns()

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

Get n columns beginning at colstart.

Definition at line 459 of file vnl_matrix_fixed.hxx.

◆ get_n_rows()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix< T > vnl_matrix_fixed< T, nrows, ncols >::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 446 of file vnl_matrix_fixed.hxx.

◆ get_row()

template<class T , unsigned nrows, unsigned ncols>
vnl_vector_fixed< T, ncols > vnl_matrix_fixed< T, nrows, ncols >::get_row ( unsigned  row) const

Get a vector equal to the given row.

Create a vector out of row[row_index].

Definition at line 475 of file vnl_matrix_fixed.hxx.

◆ get_rows()

template<class T , unsigned int nrows, unsigned int ncols>
vnl_matrix< T > vnl_matrix_fixed< T, nrows, ncols >::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 507 of file vnl_matrix_fixed.hxx.

◆ has_nans()

template<class T , unsigned nrows, unsigned ncols>
bool vnl_matrix_fixed< T, nrows, ncols >::has_nans ( ) const

Return true if matrix contains NaNs.

Definition at line 727 of file vnl_matrix_fixed.hxx.

◆ inplace_transpose()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::inplace_transpose ( )

Transposes this matrix efficiently, if it is square, and returns it.

Transpose square 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();

Definition at line 874 of file vnl_matrix_fixed.hxx.

◆ is_equal()

template<class T, unsigned nrows, unsigned ncols>
bool vnl_matrix_fixed< T, nrows, ncols >::is_equal ( vnl_matrix_fixed< T, nrows, ncols > const &  rhs,
double  tol 
) const

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

Definition at line 697 of file vnl_matrix_fixed.hxx.

◆ is_finite()

template<class T , unsigned nrows, unsigned ncols>
bool vnl_matrix_fixed< T, nrows, ncols >::is_finite ( ) const

Return true if finite.

Definition at line 739 of file vnl_matrix_fixed.hxx.

◆ is_identity() [1/2]

template<class T , unsigned nrows, unsigned ncols>
bool vnl_matrix_fixed< T, nrows, ncols >::is_identity ( ) const

Return true if all elements equal to identity.

Definition at line 651 of file vnl_matrix_fixed.hxx.

◆ is_identity() [2/2]

template<class T , unsigned nrows, unsigned ncols>
bool vnl_matrix_fixed< T, nrows, ncols >::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 668 of file vnl_matrix_fixed.hxx.

◆ is_zero() [1/2]

template<class T , unsigned nrows, unsigned ncols>
bool vnl_matrix_fixed< T, nrows, ncols >::is_zero ( ) const

Return true if all elements equal to zero.

Definition at line 684 of file vnl_matrix_fixed.hxx.

◆ is_zero() [2/2]

template<class T , unsigned nrows, unsigned ncols>
bool vnl_matrix_fixed< T, nrows, ncols >::is_zero ( double  tol) const

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

Definition at line 715 of file vnl_matrix_fixed.hxx.

◆ max_value()

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

Return maximum value of elements.

Definition at line 578 of file vnl_matrix_fixed.h.

◆ mean()

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

Return mean of all matrix elements.

Definition at line 587 of file vnl_matrix_fixed.h.

◆ min_value()

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

Return minimum value of elements.

Definition at line 575 of file vnl_matrix_fixed.h.

◆ mul() [1/2]

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::mul ( const T *  a,
const T *  b,
T *  r 
)
static

Definition at line 107 of file vnl_matrix_fixed.hxx.

◆ mul() [2/2]

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::mul ( const T *  a,
b,
T *  r 
)
static

Definition at line 116 of file vnl_matrix_fixed.hxx.

◆ normalize_columns()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::normalize_columns ( )

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

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:

Definition at line 381 of file vnl_matrix_fixed.hxx.

◆ normalize_rows()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::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 356 of file vnl_matrix_fixed.hxx.

◆ operator *=() [1/2]

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

Definition at line 311 of file vnl_matrix_fixed.h.

◆ operator *=() [2/2]

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

Definition at line 358 of file vnl_matrix_fixed.h.

◆ operator const vnl_matrix_ref< T >()

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

Cheap conversion to vnl_matrix_ref.

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

Definition at line 675 of file vnl_matrix_fixed.h.

◆ operator!=() [1/2]

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

Inequality operator.

Definition at line 710 of file vnl_matrix_fixed.h.

◆ operator!=() [2/2]

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

Inequality operator.

Definition at line 716 of file vnl_matrix_fixed.h.

◆ operator()() [1/2]

template<class T , unsigned nrows, unsigned ncols>
T & vnl_matrix_fixed< T, nrows, ncols >::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 39 of file vnl_matrix_fixed.hxx.

◆ operator()() [2/2]

template<class T , unsigned nrows, unsigned ncols>
T const & vnl_matrix_fixed< T, nrows, ncols >::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 50 of file vnl_matrix_fixed.hxx.

◆ operator+=() [1/3]

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

Add s to each element of lhs matrix in situ.

Definition at line 299 of file vnl_matrix_fixed.h.

◆ operator+=() [2/3]

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

Definition at line 323 of file vnl_matrix_fixed.h.

◆ operator+=() [3/3]

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

Definition at line 329 of file vnl_matrix_fixed.h.

◆ operator-()

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

Negate all elements of matrix.

Definition at line 350 of file vnl_matrix_fixed.h.

◆ operator-=() [1/3]

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

Subtract s from each element of lhs matrix in situ.

Definition at line 305 of file vnl_matrix_fixed.h.

◆ operator-=() [2/3]

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

Definition at line 336 of file vnl_matrix_fixed.h.

◆ operator-=() [3/3]

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

Definition at line 342 of file vnl_matrix_fixed.h.

◆ operator/=()

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

Definition at line 317 of file vnl_matrix_fixed.h.

◆ operator=() [1/4]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& vnl_matrix_fixed< T, num_rows, num_cols >::operator= ( const vnl_matrix_fixed< T, num_rows, num_cols > &  rhs)
default

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

◆ operator=() [2/4]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& vnl_matrix_fixed< T, num_rows, num_cols >::operator= ( vnl_matrix_fixed< T, num_rows, num_cols > &&  rhs)
default

◆ operator=() [3/4]

template<class T, unsigned num_rows, unsigned num_cols>
vnl_matrix_fixed< T, num_rows, num_cols > & vnl_matrix_fixed< T, num_rows, num_cols >::operator= ( T const &  v)

Set all elements to value v.

Complexity $O(r.c)$

Definition at line 23 of file vnl_matrix_fixed.hxx.

◆ operator=() [4/4]

template<class T, unsigned num_rows, unsigned num_cols>
vnl_matrix_fixed< T, num_rows, num_cols > & vnl_matrix_fixed< T, num_rows, num_cols >::operator= ( const vnl_matrix< T > &  rhs)

Copy a vnl_matrix into this.

Abort if rhs is not the same size.

Definition at line 30 of file vnl_matrix_fixed.hxx.

◆ operator==() [1/2]

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

Equality operator.

Definition at line 707 of file vnl_matrix_fixed.h.

◆ operator==() [2/2]

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

Equality operator.

Definition at line 713 of file vnl_matrix_fixed.h.

◆ operator[]() [1/2]

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

return pointer to given row.

No boundary checking here.

Definition at line 212 of file vnl_matrix_fixed.h.

◆ operator[]() [2/2]

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

return pointer to given row.

No boundary checking here.

Definition at line 216 of file vnl_matrix_fixed.h.

◆ operator_eq()

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

Return true if *this == rhs.

Definition at line 701 of file vnl_matrix_fixed.h.

◆ operator_inf_norm()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols >::abs_t vnl_matrix_fixed< T, nrows, ncols >::operator_inf_norm ( ) const

Definition at line 857 of file vnl_matrix_fixed.hxx.

◆ operator_one_norm()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols >::abs_t vnl_matrix_fixed< T, nrows, ncols >::operator_one_norm ( ) const

Definition at line 841 of file vnl_matrix_fixed.hxx.

◆ print()

template<class T , unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::print ( std::ostream &  os) const

Print matrix to os in some hopefully sensible format.

Definition at line 191 of file vnl_matrix_fixed.hxx.

◆ put()

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

set element.

Definition at line 184 of file vnl_matrix_fixed.h.

◆ read_ascii()

template<class T , unsigned nrows, unsigned ncols>
bool vnl_matrix_fixed< T, nrows, ncols >::read_ascii ( std::istream &  s)

Definition at line 792 of file vnl_matrix_fixed.hxx.

◆ rms()

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

Return RMS of all elements.

Definition at line 572 of file vnl_matrix_fixed.h.

◆ rows()

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

Return the number of rows.

Definition at line 173 of file vnl_matrix_fixed.h.

◆ scale_column()

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::scale_column ( unsigned  col,
value 
)

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

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 418 of file vnl_matrix_fixed.hxx.

◆ scale_row()

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::scale_row ( unsigned  row,
value 
)

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

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 405 of file vnl_matrix_fixed.hxx.

◆ set() [1/2]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& vnl_matrix_fixed< T, num_rows, num_cols >::set ( unsigned  r,
unsigned  c,
T const &  v 
)
inline

set element, and return *this.

Definition at line 208 of file vnl_matrix_fixed.h.

◆ set() [2/2]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_matrix_fixed& vnl_matrix_fixed< T, num_rows, num_cols >::set ( T const *  d)
inline

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

A synonym for copy_in()

Definition at line 279 of file vnl_matrix_fixed.h.

◆ set_column() [1/4]

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

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

Definition at line 601 of file vnl_matrix_fixed.hxx.

◆ set_column() [2/4]

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::set_column ( unsigned  i,
value 
)

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

Definition at line 630 of file vnl_matrix_fixed.hxx.

◆ set_column() [3/4]

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

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

Definition at line 610 of file vnl_matrix_fixed.hxx.

◆ set_column() [4/4]

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::set_column ( unsigned  j,
vnl_vector_fixed< T, nrows > const &  v 
)

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

Definition at line 622 of file vnl_matrix_fixed.hxx.

◆ set_columns()

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

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

Definition at line 640 of file vnl_matrix_fixed.hxx.

◆ set_diagonal()

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::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 177 of file vnl_matrix_fixed.hxx.

◆ set_identity()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::set_identity ( )

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

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 340 of file vnl_matrix_fixed.hxx.

◆ set_row() [1/4]

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

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

Definition at line 561 of file vnl_matrix_fixed.hxx.

◆ set_row() [2/4]

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::set_row ( unsigned  i,
value 
)

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

Definition at line 590 of file vnl_matrix_fixed.hxx.

◆ set_row() [3/4]

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

Set the i-th row, then return *this.

Definition at line 570 of file vnl_matrix_fixed.hxx.

◆ set_row() [4/4]

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::set_row ( unsigned  i,
vnl_vector_fixed< T, ncols > const &  v 
)

Set the i-th row, then return *this.

Definition at line 582 of file vnl_matrix_fixed.hxx.

◆ size()

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

Return the total number of elements stored by the matrix.

This equals rows() * cols()

Definition at line 170 of file vnl_matrix_fixed.h.

◆ sub() [1/3]

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::sub ( const T *  a,
const T *  b,
T *  r 
)
static

Definition at line 80 of file vnl_matrix_fixed.hxx.

◆ sub() [2/3]

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::sub ( const T *  a,
b,
T *  r 
)
static

Definition at line 89 of file vnl_matrix_fixed.hxx.

◆ sub() [3/3]

template<class T, unsigned nrows, unsigned ncols>
void vnl_matrix_fixed< T, nrows, ncols >::sub ( a,
const T *  b,
T *  r 
)
static

Definition at line 98 of file vnl_matrix_fixed.hxx.

◆ swap()

template<class T, unsigned int nrows, unsigned int ncols>
void vnl_matrix_fixed< T, nrows, ncols >::swap ( vnl_matrix_fixed< T, nrows, ncols > &  that)

Swap this matrix with that matrix.

Definition at line 432 of file vnl_matrix_fixed.hxx.

◆ transpose()

template<class T , unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, ncols, nrows > vnl_matrix_fixed< T, nrows, ncols >::transpose ( ) const

Return transpose.

Definition at line 252 of file vnl_matrix_fixed.hxx.

◆ update()

template<class T, unsigned nrows, unsigned ncols>
vnl_matrix_fixed< T, nrows, ncols > & vnl_matrix_fixed< T, nrows, ncols >::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].

Definition at line 274 of file vnl_matrix_fixed.hxx.

Friends And Related Function Documentation

◆ operator *() [1/6]

template<class T, unsigned int num_rows, unsigned int num_cols>
vnl_double_3 operator * ( const vnl_double_3x3 A,
const vnl_double_3 &  x 
)
related

The binary multiplication operator.

Definition at line 25 of file vnl_linear_operators_3.h.

◆ operator *() [2/6]

template<class T , unsigned M, unsigned N>
vnl_vector_fixed< T, M > operator * ( const vnl_matrix_fixed_ref_const< T, M, N > &  a,
const vnl_vector_fixed_ref_const< T, N > &  b 
)
related

Multiply conformant vnl_matrix_fixed (M x N) and vector_fixed (N).

Definition at line 919 of file vnl_matrix_fixed_ref.h.

◆ operator *() [3/6]

template<class T , unsigned M, unsigned N>
vnl_vector_fixed< T, M > operator * ( const vnl_matrix_fixed< T, M, N > &  a,
const vnl_vector_fixed< T, N > &  b 
)
related

Multiply conformant vnl_matrix_fixed (M x N) and vector_fixed (N).

Definition at line 922 of file vnl_matrix_fixed.h.

◆ operator *() [4/6]

template<class T , unsigned M, unsigned N, unsigned O>
vnl_matrix_fixed< T, M, O > operator * ( const vnl_matrix_fixed_ref_const< T, M, N > &  a,
const vnl_matrix_fixed_ref_const< T, N, O > &  b 
)
related

Multiply two conformant vnl_matrix_fixed (M x N) times (N x O).

Definition at line 928 of file vnl_matrix_fixed_ref.h.

◆ operator *() [5/6]

template<class T , unsigned M, unsigned N>
vnl_vector_fixed< T, N > operator * ( const vnl_vector_fixed< T, M > &  a,
const vnl_matrix_fixed< T, M, N > &  b 
)
related

Multiply conformant vector_fixed (M) and vnl_matrix_fixed (M x N).

Definition at line 932 of file vnl_matrix_fixed.h.

◆ operator *() [6/6]

template<class T , unsigned M, unsigned N, unsigned O>
vnl_matrix_fixed< T, M, O > operator * ( const vnl_matrix_fixed< T, M, N > &  a,
const vnl_matrix_fixed< T, N, O > &  b 
)
related

Multiply two conformant vnl_matrix_fixed (M x N) times (N x O).

Definition at line 941 of file vnl_matrix_fixed.h.

◆ operator<()

template<class T , unsigned int n, unsigned int m>
VNL_EXPORT bool operator< ( vnl_matrix_fixed< T, n, m > const &  lhs,
vnl_matrix_fixed< T, n, m > const &  rhs 
)
related

Define a complete ordering on vnl_matrix_fixed.

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

Definition at line 82 of file vnl_operators.h.

◆ vnl_complexify() [1/3]

template<class T , unsigned int r, unsigned int c>
VNL_EXPORT vnl_matrix_fixed< std::complex< T >, r, c > vnl_complexify ( vnl_matrix_fixed< T, r, c > const &  R)
related

Return complexified version of real fixed matrix R.

◆ vnl_complexify() [2/3]

template<class T , unsigned int r, unsigned int c>
vnl_matrix_fixed< std::complex< T >, r, c > vnl_complexify ( vnl_matrix_fixed< T, r, c > const &  R,
vnl_matrix_fixed< T, r, c > const &  I 
)
related

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

Definition at line 149 of file vnl_complexify.h.

◆ vnl_complexify() [3/3]

template<class T , unsigned int n>
vnl_diag_matrix_fixed< std::complex< T >, n > vnl_complexify ( vnl_diag_matrix_fixed< T, n > const &  R,
vnl_diag_matrix_fixed< T, n > const &  I 
)
related

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

Definition at line 166 of file vnl_complexify.h.

◆ vnl_det() [1/4]

template<class T >
T vnl_det ( vnl_matrix_fixed< T, 1, 1 > const &  m)
related

Determinant of small size matrices.

Definition at line 36 of file vnl_det.h.

◆ vnl_det() [2/4]

template<class T >
T vnl_det ( vnl_matrix_fixed< T, 2, 2 > const &  m)
related

Determinant of small size matrices.

Definition at line 41 of file vnl_det.h.

◆ vnl_det() [3/4]

template<class T >
T vnl_det ( vnl_matrix_fixed< T, 3, 3 > const &  m)
related

Determinant of small size matrices.

Definition at line 46 of file vnl_det.h.

◆ vnl_det() [4/4]

template<class T >
T vnl_det ( vnl_matrix_fixed< T, 4, 4 > const &  m)
related

Determinant of small size matrices.

Definition at line 51 of file vnl_det.h.

◆ vnl_determinant()

template<class T , unsigned m, unsigned n>
T vnl_determinant ( vnl_matrix_fixed< T, m, n > const &  M,
bool  balance = false 
)
related

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

convenience overload from vnl_matrix<T> variant

Definition at line 55 of file vnl_determinant.h.

◆ vnl_imag()

template<class T , unsigned int NRow, unsigned int NCol>
vnl_matrix_fixed< T, NRow, NCol > vnl_imag ( vnl_matrix_fixed< std::complex< T >, NRow, NCol > const &  C)
related

Matrix of imaginary parts of vnl_matrix_fixed<std::complex<T>,NRow,NCol >.

Definition at line 69 of file vnl_imag.h.

◆ vnl_inverse() [1/4]

template<class T >
vnl_matrix_fixed< T, 1, 1 > vnl_inverse ( vnl_matrix_fixed< T, 1, 1 > 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 39 of file vnl_inverse.h.

◆ vnl_inverse() [2/4]

template<class T >
vnl_matrix_fixed< T, 2, 2 > vnl_inverse ( vnl_matrix_fixed< T, 2, 2 > 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 56 of file vnl_inverse.h.

◆ vnl_inverse() [3/4]

template<class T >
vnl_matrix_fixed< T, 3, 3 > vnl_inverse ( vnl_matrix_fixed< T, 3, 3 > 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 82 of file vnl_inverse.h.

◆ vnl_inverse() [4/4]

template<class T >
vnl_matrix_fixed< T, 4, 4 > vnl_inverse ( vnl_matrix_fixed< T, 4, 4 > 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 115 of file vnl_inverse.h.

◆ vnl_inverse_transpose() [1/4]

template<class T >
vnl_matrix_fixed< T, 1, 1 > vnl_inverse_transpose ( vnl_matrix_fixed< T, 1, 1 > 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 199 of file vnl_inverse.h.

◆ vnl_inverse_transpose() [2/4]

template<class T >
vnl_matrix_fixed< T, 2, 2 > vnl_inverse_transpose ( vnl_matrix_fixed< T, 2, 2 > 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 218 of file vnl_inverse.h.

◆ vnl_inverse_transpose() [3/4]

template<class T >
vnl_matrix_fixed< T, 3, 3 > vnl_inverse_transpose ( vnl_matrix_fixed< T, 3, 3 > 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 246 of file vnl_inverse.h.

◆ vnl_inverse_transpose() [4/4]

template<class T >
vnl_matrix_fixed< T, 4, 4 > vnl_inverse_transpose ( vnl_matrix_fixed< T, 4, 4 > 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 281 of file vnl_inverse.h.

◆ vnl_matlab_print()

template<class T , unsigned int n, unsigned int m>
VNL_EXPORT std::ostream & vnl_matlab_print ( std::ostream &  ,
vnl_matrix_fixed< T, n, m > const &  ,
char const *  variable_name = nullptr,
vnl_matlab_print_format  = vnl_matlab_print_format_default 
)
related

print a vnl_matrix_fixed<T>.

◆ vnl_matrix_exp() [1/2]

template<class SquareMatrix >
VNL_EXPORT bool vnl_matrix_exp ( SquareMatrix const &  X,
SquareMatrix &  expX,
double  max_err 
)
related

Compute the exponential of a square matrix - fiddly form.

◆ vnl_matrix_exp() [2/2]

template<class SquareMatrix >
VNL_EXPORT SquareMatrix vnl_matrix_exp ( SquareMatrix const &  X)
related

Compute the exponential of a square matrix - easy form.

◆ vnl_power()

template<class T , unsigned int d>
vnl_matrix_fixed< T, d, d > vnl_power ( vnl_matrix_fixed< T, d, d > const &  m,
int  n 
)
related

Calculates nth power of a vnl_matrix_fixed (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 36 of file vnl_power.h.

◆ vnl_real()

template<class T , unsigned int NRow, unsigned int NCol>
vnl_matrix_fixed< T, NRow, NCol > vnl_real ( vnl_matrix_fixed< std::complex< T >, NRow, NCol > const &  C)
related

Matrix of real parts of vnl_matrix_fixed<std::complex<T>,NRow,NCol >.

Definition at line 69 of file vnl_real.h.

◆ vnl_rotation_matrix()

template<class T, unsigned int num_rows, unsigned int num_cols>
VNL_EXPORT vnl_matrix_fixed< double, 3, 3 > vnl_rotation_matrix ( vnl_vector_fixed< double, 3 > const &  axis)
related

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

Definition at line 57 of file vnl_rotation_matrix.cxx.

◆ vnl_trace()

template<class T , unsigned int N1, unsigned int N2>
T vnl_trace ( vnl_matrix_fixed< T, N1, N2 > const &  M)
related

Calculate trace of a matrix.

Definition at line 34 of file vnl_trace.h.

◆ vsl_b_read()

template<class T , unsigned m, unsigned n>
void vsl_b_read ( vsl_b_istream &  is,
vnl_matrix_fixed< T, m, n > &  v 
)
related

Binary load vnl_matrix_fixed from stream.

◆ vsl_b_write()

template<class T , unsigned m, unsigned n>
void vsl_b_write ( vsl_b_ostream &  os,
const vnl_matrix_fixed< T, m, n > &  v 
)
related

Binary save vnl_matrix_fixed to stream.

◆ vsl_print_summary()

template<class T , unsigned m, unsigned n>
void vsl_print_summary ( std::ostream &  os,
const vnl_matrix_fixed< T, m, n > &  b 
)
related

Print human readable summary of object to a stream.

◆ x_write()

template<class T , unsigned m, unsigned n>
void x_write ( std::ostream &  os,
vnl_matrix_fixed< T, m, n > const &  v,
std::string  name = "vnl_matrix_fixed< T, num_rows, num_cols >" 
)
related

XML save vnl_matrix_fixed to stream.

◆ x_write_tree()

template<class T , unsigned m, unsigned n>
void x_write_tree ( std::ostream &  os,
vnl_matrix_fixed< T, m, n > const &  v,
std::string  name = "vnl_matrix_fixed< T, num_rows, num_cols >" 
)
related

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

Member Data Documentation

◆ data_

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

Definition at line 105 of file vnl_matrix_fixed.h.


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