Public Types | Public Member Functions | Static Public Member Functions | Private Types | Related Functions | List of all members
vnl_double_3x2 Class Reference

#include <vnl_double_3x2.h>

Inheritance diagram for vnl_double_3x2:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

 vnl_double_3x2 ()=default
 
 vnl_double_3x2 (double r00, double r01, double r10, double r11, double r20, double r21)
 
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, double const &v)
 set element. More...
 
double get (unsigned r, unsigned c) const
 get element. More...
 
vnl_matrix_fixedset (unsigned r, unsigned c, double const &v)
 set element, and return *this. More...
 
vnl_matrix_fixedset (double const *d)
 Fills (laminates) this matrix with the given data, then returns it. More...
 
double * operator[] (unsigned r)
 return pointer to given row. More...
 
double const * operator[] (unsigned r) const
 return pointer to given row. More...
 
double & operator() (unsigned r, unsigned c)
 Access an element for reading or writing. More...
 
double const & operator() (unsigned r, unsigned c) const
 Access an element for reading. More...
 
vnl_matrix_fixedfill (double)
 Sets all elements of matrix to specified value, and returns "*this". More...
 
vnl_matrix_fixedfill_diagonal (double)
 Sets all diagonal elements of matrix to specified value; returns "*this". More...
 
vnl_matrix_fixedset_diagonal (vnl_vector< double > const &)
 Sets the diagonal elements of this matrix to the specified list of values. More...
 
vnl_matrix_fixedcopy_in (double const *)
 Fills (laminates) this matrix with the given data, then returns it. More...
 
void copy_out (double *) 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+= (double s)
 Add s to each element of lhs matrix in situ. More...
 
vnl_matrix_fixedoperator+= (vnl_matrix_fixed const &m)
 
vnl_matrix_fixedoperator+= (vnl_matrix< double > const &m)
 
vnl_matrix_fixedoperator-= (double s)
 Subtract s from each element of lhs matrix in situ. More...
 
vnl_matrix_fixedoperator-= (vnl_matrix_fixed const &m)
 
vnl_matrix_fixedoperator-= (vnl_matrix< double > const &m)
 
vnl_matrix_fixedoperator *= (double s)
 
vnl_matrix_fixedoperator *= (vnl_matrix_fixed< double, num_cols, num_cols > const &s)
 
vnl_matrix_fixedoperator/= (double s)
 
vnl_matrix_fixed operator- () const
 Negate all elements of matrix. More...
 
vnl_matrix_fixed apply (double(*f)(double)) const
 Make a new matrix by applying function to each element. More...
 
vnl_matrix_fixed apply (double(*f)(double const &)) const
 Make a new matrix by applying function to each element. More...
 
vnl_vector_fixed< double, num_rows > apply_rowwise (double(*f)(vnl_vector_fixed< double, num_cols > const &)) const
 Make a vector by applying a function across rows. More...
 
vnl_vector_fixed< double, num_cols > apply_columnwise (double(*f)(vnl_vector_fixed< double, num_rows > const &)) const
 Make a vector by applying a function across columns. More...
 
vnl_matrix_fixed< double, num_cols, num_rows > transpose () const
 Return transpose. More...
 
vnl_matrix_fixed< double, num_cols, num_rows > conjugate_transpose () const
 Return conjugate transpose. More...
 
vnl_matrix_fixedupdate (vnl_matrix< double > 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, double const *v)
 Set the elements of the i'th column to v[i] (No bounds checking). More...
 
vnl_matrix_fixedset_column (unsigned i, double value)
 Set the elements of the i'th column to value, then return *this. More...
 
vnl_matrix_fixedset_column (unsigned j, vnl_vector< double > const &v)
 Set j-th column to v, then return *this. More...
 
vnl_matrix_fixedset_column (unsigned j, vnl_vector_fixed< double, num_rows > const &v)
 Set j-th column to v, then return *this. More...
 
vnl_matrix_fixedset_columns (unsigned starting_column, vnl_matrix< double > const &M)
 Set columns to those in M, starting at starting_column, then return *this. More...
 
vnl_matrix_fixedset_row (unsigned i, double const *v)
 Set the elements of the i'th row to v[i] (No bounds checking). More...
 
vnl_matrix_fixedset_row (unsigned i, double value)
 Set the elements of the i'th row to value, then return *this. More...
 
vnl_matrix_fixedset_row (unsigned i, vnl_vector< double > const &)
 Set the i-th row, then return *this. More...
 
vnl_matrix_fixedset_row (unsigned i, vnl_vector_fixed< double, num_cols > const &)
 Set the i-th row, then return *this. More...
 
vnl_matrix< double > 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< double > &sub_matrix, unsigned top=0, unsigned left=0) const
 Extract a sub-matrix starting at (top,left). More...
 
vnl_vector_fixed< double, num_cols > get_row (unsigned row) const
 Get a vector equal to the given row. More...
 
vnl_vector_fixed< double, num_rows > get_column (unsigned col) const
 Get a vector equal to the given column. More...
 
vnl_matrix< double > 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< double > 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< double > get_n_rows (unsigned rowstart, unsigned n) const
 Get n rows beginning at rowstart. More...
 
vnl_matrix< double > get_n_columns (unsigned colstart, unsigned n) const
 Get n columns beginning at colstart. More...
 
vnl_vector< double > get_diagonal () const
 Return a vector with the content of the (main) diagonal. More...
 
vnl_vector_fixed< double, num_rows *num_cols > flatten_row_major () const
 Flatten row-major (C-style). More...
 
vnl_vector_fixed< double, 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, double value)
 Scales elements in given row by a factor T, and returns "*this". More...
 
vnl_matrix_fixedscale_column (unsigned col, double value)
 Scales elements in given column by a factor T, and returns "*this". More...
 
void swap (vnl_matrix_fixed< double, 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...
 
double min_value () const
 Return minimum value of elements. More...
 
double 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...
 
double 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< double, 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)
 
double const * data_block () const
 Access the contiguous block storing the elements in the matrix row-wise. O(1). More...
 
double * data_block ()
 Access the contiguous block storing the elements in the matrix row-wise. O(1). More...
 
vnl_matrix_ref< double > as_ref ()
 Explicit conversion to a vnl_matrix_ref. More...
 
const vnl_matrix_ref< double > as_ref () const
 Explicit conversion to a vnl_matrix_ref. More...
 
 operator const vnl_matrix_ref< double > () const
 Cheap conversion to vnl_matrix_ref. More...
 
const vnl_matrix< double > as_matrix () const
 Convert to a vnl_matrix. More...
 
iterator begin ()
 Iterator pointing to start of data. More...
 
const_iterator begin () const
 Iterator pointing to start of data. More...
 
iterator end ()
 Iterator pointing to element beyond end 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< double > const &that) const
 Equality operator. More...
 
bool operator!= (vnl_matrix_fixed const &that) const
 Inequality operator. More...
 
bool operator!= (vnl_matrix< double > 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 double *a, const double *b, double *r)
 
static void add (const double *a, double b, double *r)
 
static void sub (const double *a, const double *b, double *r)
 
static void sub (const double *a, double b, double *r)
 
static void sub (double a, const double *b, double *r)
 
static void mul (const double *a, const double *b, double *r)
 
static void mul (const double *a, double b, double *r)
 
static void div (const double *a, const double *b, double *r)
 
static void div (const double *a, double b, double *r)
 
static bool equal (const double *a, const double *b)
 

Private Types

typedef vnl_matrix_fixed< double, 3, 2 > Base
 

Related Functions

(Note that these are not member functions.)

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

Definition at line 20 of file vnl_double_3x2.h.

Member Typedef Documentation

◆ abs_t

typedef vnl_c_vector<double >::abs_t vnl_matrix_fixed< double , num_rows, num_cols >::abs_t
inherited

Type def for norms.

Definition at line 542 of file vnl_matrix_fixed.h.

◆ Base

typedef vnl_matrix_fixed<double, 3, 2> vnl_double_3x2::Base
private

Definition at line 23 of file vnl_double_3x2.h.

◆ const_iterator

typedef double const* vnl_matrix_fixed< double , num_rows, num_cols >::const_iterator
inherited

Const iterators.

Definition at line 692 of file vnl_matrix_fixed.h.

◆ element_type

typedef double vnl_matrix_fixed< double , num_rows, num_cols >::element_type
inherited

Definition at line 682 of file vnl_matrix_fixed.h.

◆ iterator

typedef double * vnl_matrix_fixed< double , num_rows, num_cols >::iterator
inherited

Iterators.

Definition at line 685 of file vnl_matrix_fixed.h.

◆ self

typedef vnl_matrix_fixed<double ,num_rows,num_cols> vnl_matrix_fixed< double , num_rows, num_cols >::self
inherited

Definition at line 108 of file vnl_matrix_fixed.h.

◆ size_type

typedef size_t vnl_matrix_fixed< double , num_rows, num_cols >::size_type
inherited

Definition at line 109 of file vnl_matrix_fixed.h.

Constructor & Destructor Documentation

◆ vnl_double_3x2() [1/2]

vnl_double_3x2::vnl_double_3x2 ( )
default

◆ vnl_double_3x2() [2/2]

vnl_double_3x2::vnl_double_3x2 ( double  r00,
double  r01,
double  r10,
double  r11,
double  r20,
double  r21 
)
inline

Definition at line 28 of file vnl_double_3x2.h.

Member Function Documentation

◆ absolute_value_max()

abs_t vnl_matrix_fixed< double , num_rows, num_cols >::absolute_value_max ( ) const
inlineinherited

Return largest absolute value.

Definition at line 557 of file vnl_matrix_fixed.h.

◆ absolute_value_sum()

abs_t vnl_matrix_fixed< double , num_rows, num_cols >::absolute_value_sum ( ) const
inlineinherited

Return sum of absolute values of elements.

Definition at line 554 of file vnl_matrix_fixed.h.

◆ add() [1/2]

void vnl_matrix_fixed< double , nrows, ncols >::add ( const double *  a,
const double *  b,
double *  r 
)
staticinherited

Definition at line 61 of file vnl_matrix_fixed.hxx.

◆ add() [2/2]

void vnl_matrix_fixed< double , nrows, ncols >::add ( const double *  a,
double  b,
double *  r 
)
staticinherited

Definition at line 71 of file vnl_matrix_fixed.hxx.

◆ apply() [1/2]

vnl_matrix_fixed< double , nrows, ncols > vnl_matrix_fixed< double , nrows, ncols >::apply ( double (*)(double )  f) const
inherited

Make a new matrix by applying function to each element.

Definition at line 216 of file vnl_matrix_fixed.hxx.

◆ apply() [2/2]

vnl_matrix_fixed< double , nrows, ncols > vnl_matrix_fixed< double , nrows, ncols >::apply ( double (*)(double const &)  f) const
inherited

Make a new matrix by applying function to each element.

Definition at line 206 of file vnl_matrix_fixed.hxx.

◆ apply_columnwise()

vnl_vector_fixed< double , ncols > vnl_matrix_fixed< double , nrows, ncols >::apply_columnwise ( double (*)(vnl_vector_fixed< double , nrows > const &)  f) const
inherited

Make a vector by applying a function across columns.

Definition at line 239 of file vnl_matrix_fixed.hxx.

◆ apply_rowwise()

vnl_vector_fixed< double , nrows > vnl_matrix_fixed< double , nrows, ncols >::apply_rowwise ( double (*)(vnl_vector_fixed< double , ncols > const &)  f) const
inherited

Make a vector by applying a function across rows.

Definition at line 227 of file vnl_matrix_fixed.hxx.

◆ arg_max()

unsigned vnl_matrix_fixed< double , num_rows, num_cols >::arg_max ( ) const
inlineinherited

Return location of maximum value of elements.

Definition at line 584 of file vnl_matrix_fixed.h.

◆ arg_min()

unsigned vnl_matrix_fixed< double , num_rows, num_cols >::arg_min ( ) const
inlineinherited

Return location of minimum value of elements.

Definition at line 581 of file vnl_matrix_fixed.h.

◆ array_inf_norm()

abs_t vnl_matrix_fixed< double , num_rows, num_cols >::array_inf_norm ( ) const
inlineinherited

Return largest absolute element value.

Definition at line 551 of file vnl_matrix_fixed.h.

◆ array_one_norm()

abs_t vnl_matrix_fixed< double , num_rows, num_cols >::array_one_norm ( ) const
inlineinherited

Return sum of absolute values of elements.

Definition at line 545 of file vnl_matrix_fixed.h.

◆ array_two_norm()

abs_t vnl_matrix_fixed< double , num_rows, num_cols >::array_two_norm ( ) const
inlineinherited

Return square root of sum of squared absolute element values.

Definition at line 548 of file vnl_matrix_fixed.h.

◆ as_matrix()

const vnl_matrix<double > vnl_matrix_fixed< double , num_rows, num_cols >::as_matrix ( ) const
inlineinherited

Convert to a vnl_matrix.

Definition at line 678 of file vnl_matrix_fixed.h.

◆ as_ref() [1/2]

vnl_matrix_ref<double > vnl_matrix_fixed< double , num_rows, num_cols >::as_ref ( )
inlineinherited

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]

const vnl_matrix_ref<double > vnl_matrix_fixed< double , num_rows, num_cols >::as_ref ( ) const
inlineinherited

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()

void vnl_matrix_fixed< double , num_rows, num_cols >::assert_finite ( ) const
inlineinherited

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_size()

void vnl_matrix_fixed< double , num_rows, num_cols >::assert_size ( unsigned  VXL_USED_IN_DEBUGnr_rows,
unsigned  VXL_USED_IN_DEBUGnr_cols 
) const
inlineinherited

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.

◆ begin() [1/2]

iterator vnl_matrix_fixed< double , num_rows, num_cols >::begin ( )
inlineinherited

Iterator pointing to start of data.

Definition at line 687 of file vnl_matrix_fixed.h.

◆ begin() [2/2]

const_iterator vnl_matrix_fixed< double , num_rows, num_cols >::begin ( ) const
inlineinherited

Iterator pointing to start of data.

Definition at line 694 of file vnl_matrix_fixed.h.

◆ cols()

unsigned int vnl_matrix_fixed< double , num_rows, num_cols >::cols ( ) const
inlineinherited

Return the number of columns.

A synonym for columns().

Definition at line 177 of file vnl_matrix_fixed.h.

◆ columns()

unsigned int vnl_matrix_fixed< double , num_rows, num_cols >::columns ( ) const
inlineinherited

Return the number of columns.

A synonym for cols().

Definition at line 181 of file vnl_matrix_fixed.h.

◆ conjugate_transpose()

vnl_matrix_fixed< double , ncols, nrows > vnl_matrix_fixed< double , nrows, ncols >::conjugate_transpose ( ) const
inherited

Return conjugate transpose.

Definition at line 263 of file vnl_matrix_fixed.hxx.

◆ copy_in()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::copy_in ( double const *  p)
inherited

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()

void vnl_matrix_fixed< double , nrows, ncols >::copy_out ( double *  p) const
inherited

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]

double const * vnl_matrix_fixed< double , m, n >::data_block ( ) const
inherited

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]

double * vnl_matrix_fixed< double , m, n >::data_block ( )
inherited

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]

void vnl_matrix_fixed< double , nrows, ncols >::div ( const double *  a,
const double *  b,
double *  r 
)
staticinherited

Definition at line 125 of file vnl_matrix_fixed.hxx.

◆ div() [2/2]

void vnl_matrix_fixed< double , nrows, ncols >::div ( const double *  a,
double  b,
double *  r 
)
staticinherited

Definition at line 134 of file vnl_matrix_fixed.hxx.

◆ empty()

bool vnl_matrix_fixed< double , num_rows, num_cols >::empty ( ) const
inlineinherited

Return true iff the size is zero.

Definition at line 592 of file vnl_matrix_fixed.h.

◆ end() [1/2]

iterator vnl_matrix_fixed< double , num_rows, num_cols >::end ( )
inlineinherited

Iterator pointing to element beyond end of data.

Definition at line 689 of file vnl_matrix_fixed.h.

◆ end() [2/2]

const_iterator vnl_matrix_fixed< double , num_rows, num_cols >::end ( ) const
inlineinherited

Iterator pointing to element beyond end of data.

Definition at line 696 of file vnl_matrix_fixed.h.

◆ equal()

bool vnl_matrix_fixed< double , nrows, ncols >::equal ( const double *  a,
const double *  b 
)
staticinherited

Definition at line 143 of file vnl_matrix_fixed.hxx.

◆ extract() [1/2]

vnl_matrix< double > vnl_matrix_fixed< double , nrows, ncols >::extract ( unsigned  r,
unsigned  c,
unsigned  top = 0,
unsigned  left = 0 
) const
inherited

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

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

Definition at line 293 of file vnl_matrix_fixed.hxx.

◆ extract() [2/2]

void vnl_matrix_fixed< double , nrows, ncols >::extract ( vnl_matrix< double > &  sub_matrix,
unsigned  top = 0,
unsigned  left = 0 
) const
inherited

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

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

Definition at line 304 of file vnl_matrix_fixed.hxx.

◆ fill()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::fill ( double  value)
inherited

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()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::fill_diagonal ( double  value)
inherited

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()

vnl_vector_fixed< double , nrows *ncols > vnl_matrix_fixed< double , nrows, ncols >::flatten_column_major ( ) const
inherited

Flatten column-major (Fortran-style).

Definition at line 548 of file vnl_matrix_fixed.hxx.

◆ flatten_row_major()

vnl_vector_fixed< double , nrows *ncols > vnl_matrix_fixed< double , nrows, ncols >::flatten_row_major ( ) const
inherited

Flatten row-major (C-style).

Definition at line 539 of file vnl_matrix_fixed.hxx.

◆ fliplr()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::fliplr ( )
inherited

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()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::flipud ( )
inherited

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()

abs_t vnl_matrix_fixed< double , num_rows, num_cols >::fro_norm ( ) const
inlineinherited

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()

abs_t vnl_matrix_fixed< double , num_rows, num_cols >::frobenius_norm ( ) const
inlineinherited

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

Definition at line 566 of file vnl_matrix_fixed.h.

◆ get()

double vnl_matrix_fixed< double , num_rows, num_cols >::get ( unsigned  r,
unsigned  c 
) const
inlineinherited

get element.

Definition at line 196 of file vnl_matrix_fixed.h.

◆ get_column()

vnl_vector_fixed< double , nrows > vnl_matrix_fixed< double , nrows, ncols >::get_column ( unsigned  col) const
inherited

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()

vnl_matrix< double > vnl_matrix_fixed< double , nrows, ncols >::get_columns ( vnl_vector< unsigned int >  i) const
inherited

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()

vnl_vector< double > vnl_matrix_fixed< double , nrows, ncols >::get_diagonal ( ) const
inherited

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

Definition at line 529 of file vnl_matrix_fixed.hxx.

◆ get_n_columns()

vnl_matrix< double > vnl_matrix_fixed< double , nrows, ncols >::get_n_columns ( unsigned  colstart,
unsigned  n 
) const
inherited

Get n columns beginning at colstart.

Definition at line 459 of file vnl_matrix_fixed.hxx.

◆ get_n_rows()

vnl_matrix< double > vnl_matrix_fixed< double , nrows, ncols >::get_n_rows ( unsigned  rowstart,
unsigned  n 
) const
inherited

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()

vnl_vector_fixed< double , ncols > vnl_matrix_fixed< double , nrows, ncols >::get_row ( unsigned  row) const
inherited

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()

vnl_matrix< double > vnl_matrix_fixed< double , nrows, ncols >::get_rows ( vnl_vector< unsigned int >  i) const
inherited

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()

bool vnl_matrix_fixed< double , nrows, ncols >::has_nans ( ) const
inherited

Return true if matrix contains NaNs.

Definition at line 727 of file vnl_matrix_fixed.hxx.

◆ inplace_transpose()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::inplace_transpose ( )
inherited

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()

bool vnl_matrix_fixed< double , nrows, ncols >::is_equal ( vnl_matrix_fixed< double , nrows, ncols > const &  rhs,
double  tol 
) const
inherited

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()

bool vnl_matrix_fixed< double , nrows, ncols >::is_finite ( ) const
inherited

Return true if finite.

Definition at line 739 of file vnl_matrix_fixed.hxx.

◆ is_identity() [1/2]

bool vnl_matrix_fixed< double , nrows, ncols >::is_identity ( ) const
inherited

Return true if all elements equal to identity.

Definition at line 651 of file vnl_matrix_fixed.hxx.

◆ is_identity() [2/2]

bool vnl_matrix_fixed< double , nrows, ncols >::is_identity ( double  tol) const
inherited

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]

bool vnl_matrix_fixed< double , nrows, ncols >::is_zero ( ) const
inherited

Return true if all elements equal to zero.

Definition at line 684 of file vnl_matrix_fixed.hxx.

◆ is_zero() [2/2]

bool vnl_matrix_fixed< double , nrows, ncols >::is_zero ( double  tol) const
inherited

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

Definition at line 715 of file vnl_matrix_fixed.hxx.

◆ max_value()

double vnl_matrix_fixed< double , num_rows, num_cols >::max_value ( ) const
inlineinherited

Return maximum value of elements.

Definition at line 578 of file vnl_matrix_fixed.h.

◆ mean()

double vnl_matrix_fixed< double , num_rows, num_cols >::mean ( ) const
inlineinherited

Return mean of all matrix elements.

Definition at line 587 of file vnl_matrix_fixed.h.

◆ min_value()

double vnl_matrix_fixed< double , num_rows, num_cols >::min_value ( ) const
inlineinherited

Return minimum value of elements.

Definition at line 575 of file vnl_matrix_fixed.h.

◆ mul() [1/2]

void vnl_matrix_fixed< double , nrows, ncols >::mul ( const double *  a,
const double *  b,
double *  r 
)
staticinherited

Definition at line 107 of file vnl_matrix_fixed.hxx.

◆ mul() [2/2]

void vnl_matrix_fixed< double , nrows, ncols >::mul ( const double *  a,
double  b,
double *  r 
)
staticinherited

Definition at line 116 of file vnl_matrix_fixed.hxx.

◆ normalize_columns()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::normalize_columns ( )
inherited

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()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::normalize_rows ( )
inherited

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]

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::operator *= ( double  s)
inlineinherited

Definition at line 311 of file vnl_matrix_fixed.h.

◆ operator *=() [2/2]

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::operator *= ( vnl_matrix_fixed< double , num_cols, num_cols > const &  s)
inlineinherited

Definition at line 358 of file vnl_matrix_fixed.h.

◆ operator const vnl_matrix_ref< double >()

vnl_matrix_fixed< double , num_rows, num_cols >::operator const vnl_matrix_ref< double > ( ) const
inlineinherited

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]

bool vnl_matrix_fixed< double , num_rows, num_cols >::operator!= ( vnl_matrix_fixed< double, 3, 2 > const &  that) const
inlineinherited

Inequality operator.

Definition at line 710 of file vnl_matrix_fixed.h.

◆ operator!=() [2/2]

bool vnl_matrix_fixed< double , num_rows, num_cols >::operator!= ( vnl_matrix< double > const &  that) const
inlineinherited

Inequality operator.

Definition at line 716 of file vnl_matrix_fixed.h.

◆ operator()() [1/2]

double & vnl_matrix_fixed< double , nrows, ncols >::operator() ( unsigned  r,
unsigned  c 
)
inherited

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]

double const & vnl_matrix_fixed< double , nrows, ncols >::operator() ( unsigned  r,
unsigned  c 
) const
inherited

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]

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::operator+= ( double  s)
inlineinherited

Add s to each element of lhs matrix in situ.

Definition at line 299 of file vnl_matrix_fixed.h.

◆ operator+=() [2/3]

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::operator+= ( vnl_matrix_fixed< double, 3, 2 > const &  m)
inlineinherited

Definition at line 323 of file vnl_matrix_fixed.h.

◆ operator+=() [3/3]

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::operator+= ( vnl_matrix< double > const &  m)
inlineinherited

Definition at line 329 of file vnl_matrix_fixed.h.

◆ operator-()

vnl_matrix_fixed vnl_matrix_fixed< double , num_rows, num_cols >::operator- ( ) const
inlineinherited

Negate all elements of matrix.

Definition at line 350 of file vnl_matrix_fixed.h.

◆ operator-=() [1/3]

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::operator-= ( double  s)
inlineinherited

Subtract s from each element of lhs matrix in situ.

Definition at line 305 of file vnl_matrix_fixed.h.

◆ operator-=() [2/3]

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::operator-= ( vnl_matrix_fixed< double, 3, 2 > const &  m)
inlineinherited

Definition at line 336 of file vnl_matrix_fixed.h.

◆ operator-=() [3/3]

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::operator-= ( vnl_matrix< double > const &  m)
inlineinherited

Definition at line 342 of file vnl_matrix_fixed.h.

◆ operator/=()

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::operator/= ( double  s)
inlineinherited

Definition at line 317 of file vnl_matrix_fixed.h.

◆ operator==() [1/2]

bool vnl_matrix_fixed< double , num_rows, num_cols >::operator== ( vnl_matrix_fixed< double, 3, 2 > const &  that) const
inlineinherited

Equality operator.

Definition at line 707 of file vnl_matrix_fixed.h.

◆ operator==() [2/2]

bool vnl_matrix_fixed< double , num_rows, num_cols >::operator== ( vnl_matrix< double > const &  that) const
inlineinherited

Equality operator.

Definition at line 713 of file vnl_matrix_fixed.h.

◆ operator[]() [1/2]

double * vnl_matrix_fixed< double , num_rows, num_cols >::operator[] ( unsigned  r)
inlineinherited

return pointer to given row.

No boundary checking here.

Definition at line 212 of file vnl_matrix_fixed.h.

◆ operator[]() [2/2]

double const* vnl_matrix_fixed< double , num_rows, num_cols >::operator[] ( unsigned  r) const
inlineinherited

return pointer to given row.

No boundary checking here.

Definition at line 216 of file vnl_matrix_fixed.h.

◆ operator_eq()

bool vnl_matrix_fixed< double , num_rows, num_cols >::operator_eq ( vnl_matrix_fixed< double, 3, 2 > const &  rhs) const
inlineinherited

Return true if *this == rhs.

Definition at line 701 of file vnl_matrix_fixed.h.

◆ operator_inf_norm()

vnl_matrix_fixed< double , nrows, ncols >::abs_t vnl_matrix_fixed< double , nrows, ncols >::operator_inf_norm ( ) const
inherited

Definition at line 857 of file vnl_matrix_fixed.hxx.

◆ operator_one_norm()

vnl_matrix_fixed< double , nrows, ncols >::abs_t vnl_matrix_fixed< double , nrows, ncols >::operator_one_norm ( ) const
inherited

Definition at line 841 of file vnl_matrix_fixed.hxx.

◆ print()

void vnl_matrix_fixed< double , nrows, ncols >::print ( std::ostream &  os) const
inherited

Print matrix to os in some hopefully sensible format.

Definition at line 191 of file vnl_matrix_fixed.hxx.

◆ put()

void vnl_matrix_fixed< double , num_rows, num_cols >::put ( unsigned  r,
unsigned  c,
double const &  v 
)
inlineinherited

set element.

Definition at line 184 of file vnl_matrix_fixed.h.

◆ read_ascii()

bool vnl_matrix_fixed< double , nrows, ncols >::read_ascii ( std::istream &  s)
inherited

Definition at line 792 of file vnl_matrix_fixed.hxx.

◆ rms()

abs_t vnl_matrix_fixed< double , num_rows, num_cols >::rms ( ) const
inlineinherited

Return RMS of all elements.

Definition at line 572 of file vnl_matrix_fixed.h.

◆ rows()

unsigned int vnl_matrix_fixed< double , num_rows, num_cols >::rows ( ) const
inlineinherited

Return the number of rows.

Definition at line 173 of file vnl_matrix_fixed.h.

◆ scale_column()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::scale_column ( unsigned  col,
double  value 
)
inherited

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()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::scale_row ( unsigned  row,
double  value 
)
inherited

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]

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::set ( unsigned  r,
unsigned  c,
double const &  v 
)
inlineinherited

set element, and return *this.

Definition at line 208 of file vnl_matrix_fixed.h.

◆ set() [2/2]

vnl_matrix_fixed& vnl_matrix_fixed< double , num_rows, num_cols >::set ( double const *  d)
inlineinherited

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]

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_column ( unsigned  i,
double const *  v 
)
inherited

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]

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_column ( unsigned  i,
double  value 
)
inherited

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]

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_column ( unsigned  j,
vnl_vector< double > const &  v 
)
inherited

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

Definition at line 610 of file vnl_matrix_fixed.hxx.

◆ set_column() [4/4]

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_column ( unsigned  j,
vnl_vector_fixed< double , nrows > const &  v 
)
inherited

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

Definition at line 622 of file vnl_matrix_fixed.hxx.

◆ set_columns()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_columns ( unsigned  starting_column,
vnl_matrix< double > const &  M 
)
inherited

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()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_diagonal ( vnl_vector< double > const &  diag)
inherited

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()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_identity ( )
inherited

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]

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_row ( unsigned  i,
double const *  v 
)
inherited

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]

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_row ( unsigned  i,
double  value 
)
inherited

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]

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_row ( unsigned  i,
vnl_vector< double > const &  v 
)
inherited

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

Definition at line 570 of file vnl_matrix_fixed.hxx.

◆ set_row() [4/4]

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::set_row ( unsigned  i,
vnl_vector_fixed< double , ncols > const &  v 
)
inherited

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

Definition at line 582 of file vnl_matrix_fixed.hxx.

◆ size()

unsigned int vnl_matrix_fixed< double , num_rows, num_cols >::size ( ) const
inlineinherited

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]

void vnl_matrix_fixed< double , nrows, ncols >::sub ( const double *  a,
const double *  b,
double *  r 
)
staticinherited

Definition at line 80 of file vnl_matrix_fixed.hxx.

◆ sub() [2/3]

void vnl_matrix_fixed< double , nrows, ncols >::sub ( const double *  a,
double  b,
double *  r 
)
staticinherited

Definition at line 89 of file vnl_matrix_fixed.hxx.

◆ sub() [3/3]

void vnl_matrix_fixed< double , nrows, ncols >::sub ( double  a,
const double *  b,
double *  r 
)
staticinherited

Definition at line 98 of file vnl_matrix_fixed.hxx.

◆ swap()

void vnl_matrix_fixed< double , nrows, ncols >::swap ( vnl_matrix_fixed< double , nrows, ncols > &  that)
inherited

Swap this matrix with that matrix.

Definition at line 432 of file vnl_matrix_fixed.hxx.

◆ transpose()

vnl_matrix_fixed< double , ncols, nrows > vnl_matrix_fixed< double , nrows, ncols >::transpose ( ) const
inherited

Return transpose.

Definition at line 252 of file vnl_matrix_fixed.hxx.

◆ update()

vnl_matrix_fixed< double , nrows, ncols > & vnl_matrix_fixed< double , nrows, ncols >::update ( vnl_matrix< double > const &  m,
unsigned  top = 0,
unsigned  left = 0 
)
inherited

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]

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]

vnl_vector_fixed< double , M > operator * ( const vnl_matrix_fixed_ref_const< double , M, N > &  a,
const vnl_vector_fixed_ref_const< double , 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]

vnl_vector_fixed< double , M > operator * ( const vnl_matrix_fixed< double , M, N > &  a,
const vnl_vector_fixed< double , 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]

vnl_matrix_fixed< double , M, O > operator * ( const vnl_matrix_fixed_ref_const< double , M, N > &  a,
const vnl_matrix_fixed_ref_const< double , 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]

vnl_vector_fixed< double , N > operator * ( const vnl_vector_fixed< double , M > &  a,
const vnl_matrix_fixed< double , 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]

vnl_matrix_fixed< double , M, O > operator * ( const vnl_matrix_fixed< double , M, N > &  a,
const vnl_matrix_fixed< double , 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<()

VNL_EXPORT bool operator< ( vnl_matrix_fixed< double , n, m > const &  lhs,
vnl_matrix_fixed< double , 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]

VNL_EXPORT vnl_matrix_fixed< std::complex< double >, r, c > vnl_complexify ( vnl_matrix_fixed< double , r, c > const &  R)
related

Return complexified version of real fixed matrix R.

◆ vnl_complexify() [2/3]

vnl_matrix_fixed< std::complex< double >, r, c > vnl_complexify ( vnl_matrix_fixed< double , r, c > const &  R,
vnl_matrix_fixed< double , 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]

vnl_diag_matrix_fixed< std::complex< double >, n > vnl_complexify ( vnl_diag_matrix_fixed< double , n > const &  R,
vnl_diag_matrix_fixed< double , 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]

double vnl_det ( vnl_matrix_fixed< double , 1, 1 > const &  m)
related

Determinant of small size matrices.

Definition at line 36 of file vnl_det.h.

◆ vnl_det() [2/4]

double vnl_det ( vnl_matrix_fixed< double , 2, 2 > const &  m)
related

Determinant of small size matrices.

Definition at line 41 of file vnl_det.h.

◆ vnl_det() [3/4]

double vnl_det ( vnl_matrix_fixed< double , 3, 3 > const &  m)
related

Determinant of small size matrices.

Definition at line 46 of file vnl_det.h.

◆ vnl_det() [4/4]

double vnl_det ( vnl_matrix_fixed< double , 4, 4 > const &  m)
related

Determinant of small size matrices.

Definition at line 51 of file vnl_det.h.

◆ vnl_determinant()

double vnl_determinant ( vnl_matrix_fixed< double , 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()

vnl_matrix_fixed< double , NRow, NCol > vnl_imag ( vnl_matrix_fixed< std::complex< double >, 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]

vnl_matrix_fixed< double , 1, 1 > vnl_inverse ( vnl_matrix_fixed< double , 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]

vnl_matrix_fixed< double , 2, 2 > vnl_inverse ( vnl_matrix_fixed< double , 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]

vnl_matrix_fixed< double , 3, 3 > vnl_inverse ( vnl_matrix_fixed< double , 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]

vnl_matrix_fixed< double , 4, 4 > vnl_inverse ( vnl_matrix_fixed< double , 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]

vnl_matrix_fixed< double , 1, 1 > vnl_inverse_transpose ( vnl_matrix_fixed< double , 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]

vnl_matrix_fixed< double , 2, 2 > vnl_inverse_transpose ( vnl_matrix_fixed< double , 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]

vnl_matrix_fixed< double , 3, 3 > vnl_inverse_transpose ( vnl_matrix_fixed< double , 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]

vnl_matrix_fixed< double , 4, 4 > vnl_inverse_transpose ( vnl_matrix_fixed< double , 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()

VNL_EXPORT std::ostream & vnl_matlab_print ( std::ostream &  ,
vnl_matrix_fixed< double , 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]

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]

VNL_EXPORT SquareMatrix vnl_matrix_exp ( SquareMatrix const &  X)
related

Compute the exponential of a square matrix - easy form.

◆ vnl_power()

vnl_matrix_fixed< double , d, d > vnl_power ( vnl_matrix_fixed< double , 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()

vnl_matrix_fixed< double , NRow, NCol > vnl_real ( vnl_matrix_fixed< std::complex< double >, 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()

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()

double vnl_trace ( vnl_matrix_fixed< double , N1, N2 > const &  M)
related

Calculate trace of a matrix.

Definition at line 34 of file vnl_trace.h.

◆ vsl_b_read()

void vsl_b_read ( vsl_b_istream &  is,
vnl_matrix_fixed< double , m, n > &  v 
)
related

Binary load vnl_matrix_fixed from stream.

◆ vsl_b_write()

void vsl_b_write ( vsl_b_ostream &  os,
const vnl_matrix_fixed< double , m, n > &  v 
)
related

Binary save vnl_matrix_fixed to stream.

◆ vsl_print_summary()

void vsl_print_summary ( std::ostream &  os,
const vnl_matrix_fixed< double , m, n > &  b 
)
related

Print human readable summary of object to a stream.

◆ x_write()

void x_write ( std::ostream &  os,
vnl_matrix_fixed< double , m, n > const &  v,
std::string  name = "vnl_matrix_fixed< double, 3, 2 >" 
)
related

XML save vnl_matrix_fixed to stream.

◆ x_write_tree()

void x_write_tree ( std::ostream &  os,
vnl_matrix_fixed< double , m, n > const &  v,
std::string  name = "vnl_matrix_fixed< double, 3, 2 >" 
)
related

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


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