Fixed size stack-stored vnl_matrix. More...
#include <vnl_fwd.h>

Public Types | |
| typedef T const * | const_iterator |
| Const iterators. More... | |
| typedef const T | element_type |
| Type defs for iterators. More... | |
| typedef const T * | iterator |
| Type defs for iterators. More... | |
| typedef vnl_c_vector< T >::abs_t | abs_t |
| Type def for norms. More... | |
Public Member Functions | |
| vnl_matrix_fixed_ref_const (const vnl_matrix_fixed< T, num_rows, num_cols > &rhs) | |
| vnl_matrix_fixed_ref_const (const T *dataptr) | |
| vnl_matrix_fixed_ref_const (const vnl_matrix_fixed_ref_const< T, num_rows, num_cols > &rhs) | |
| vnl_vector_fixed< T, num_rows > | get_row (unsigned row_index) const |
| Get j-th row. More... | |
| vnl_vector_fixed< T, num_cols > | get_column (unsigned column_index) const |
| Get j-th column. More... | |
| vnl_vector< T > | get_diagonal () const |
| Return a vector with the content of the (main) diagonal. More... | |
| const T * | data_block () const |
| const_iterator | begin () const |
| Iterator pointing to start of data. More... | |
| const_iterator | end () const |
| Iterator pointing to element beyond end of data. More... | |
| T const & | operator() (unsigned r, unsigned c) const |
| T const * | operator[] (unsigned r) const |
| return pointer to given row. More... | |
| unsigned | rows () const |
| Return number of rows. More... | |
| unsigned | columns () const |
| Return number of columns. More... | |
| unsigned | cols () const |
| Return number of columns. More... | |
| unsigned | size () const |
| Return number of elements. More... | |
| void | print (std::ostream &os) const |
| Print matrix to os in some hopefully sensible format. More... | |
| void | copy_out (T *) const |
| vnl_matrix_fixed< T, num_rows, num_cols > | apply (T(*f)(T)) const |
| Make a new matrix by applying function to each element. More... | |
| vnl_matrix_fixed< T, num_rows, num_cols > | apply (T(*f)(T const &)) const |
| Make a new matrix by applying function to each element. 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< T > | extract (unsigned rowz, unsigned colz, unsigned top=0, unsigned left=0) const |
| Extract a sub-matrix of size rows x cols, starting at (top,left). 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... | |
| 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... | |
| T | min_value () const |
| Return minimum value of elements. More... | |
| T | 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... | |
| T | 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_finite () const |
| Return true if finite. More... | |
| bool | has_nans () const |
| Return true if matrix contains NaNs. More... | |
| void | assert_size (unsigned rowz, unsigned colz) const |
| abort if size is not as expected. More... | |
| void | assert_finite () const |
| abort if matrix contains any INFs or NANs. 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) |
Protected Attributes | |
| const T * | data_ |
Private Member Functions | |
| const vnl_matrix_fixed_ref_const< T, num_rows, num_cols > & | operator= (const vnl_matrix_fixed_ref_const< T, num_rows, num_cols > &) const |
| 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... | |
Fixed size stack-stored vnl_matrix.
vnl_matrix_fixed_ref is a fixed-size vnl_matrix for which the data space has been supplied externally. This is useful for two main tasks:
(a) Treating some row-based "C" matrix as a vnl_matrix in order to perform vnl_matrix operations on it.
(b) Declaring a vnl_matrix that uses entirely stack-based storage for the matrix.
The big warning is that returning a vnl_matrix_fixed_ref pointer will free non-heap memory if deleted through a vnl_matrix pointer. This should be very difficult though, as vnl_matrix_fixed_ref objects may not be constructed using operator new. This in turn is plausible as the point is to avoid such calls.
| typedef vnl_c_vector<T>::abs_t vnl_matrix_fixed_ref_const< T, num_rows, num_cols >::abs_t |
Type def for norms.
Definition at line 280 of file vnl_matrix_fixed_ref.h.
| typedef T const* vnl_matrix_fixed_ref_const< T, num_rows, num_cols >::const_iterator |
Const iterators.
Definition at line 210 of file vnl_matrix_fixed_ref.h.
| typedef const T vnl_matrix_fixed_ref_const< T, num_rows, num_cols >::element_type |
Type defs for iterators.
Definition at line 217 of file vnl_matrix_fixed_ref.h.
| typedef const T* vnl_matrix_fixed_ref_const< T, num_rows, num_cols >::iterator |
Type defs for iterators.
Definition at line 219 of file vnl_matrix_fixed_ref.h.
|
inline |
Definition at line 174 of file vnl_matrix_fixed_ref.h.
|
inlineexplicit |
Definition at line 178 of file vnl_matrix_fixed_ref.h.
|
inline |
Definition at line 182 of file vnl_matrix_fixed_ref.h.
|
inline |
Return largest absolute value.
Definition at line 295 of file vnl_matrix_fixed_ref.h.
|
inline |
Return sum of absolute values of elements.
Definition at line 292 of file vnl_matrix_fixed_ref.h.
|
inlinestatic |
Definition at line 371 of file vnl_matrix_fixed_ref.h.
|
inlinestatic |
Definition at line 372 of file vnl_matrix_fixed_ref.h.
| vnl_matrix_fixed< T, nrows, ncols > vnl_matrix_fixed_ref_const< T, nrows, ncols >::apply | ( | T(*)(T) | f | ) | const |
Make a new matrix by applying function to each element.
Definition at line 82 of file vnl_matrix_fixed_ref.hxx.
| vnl_matrix_fixed< T, nrows, ncols > vnl_matrix_fixed_ref_const< T, nrows, ncols >::apply | ( | T(*)(T const &) | f | ) | const |
Make a new matrix by applying function to each element.
Definition at line 73 of file vnl_matrix_fixed_ref.hxx.
|
inline |
Return location of maximum value of elements.
Definition at line 322 of file vnl_matrix_fixed_ref.h.
|
inline |
Return location of minimum value of elements.
Definition at line 319 of file vnl_matrix_fixed_ref.h.
|
inline |
Return largest absolute element value.
Definition at line 289 of file vnl_matrix_fixed_ref.h.
|
inline |
Return sum of absolute values of elements.
Definition at line 283 of file vnl_matrix_fixed_ref.h.
|
inline |
Return square root of sum of squared absolute element values.
Definition at line 286 of file vnl_matrix_fixed_ref.h.
|
inline |
abort if matrix contains any INFs or NANs.
This function does or tests nothing if NDEBUG is defined
Definition at line 364 of file vnl_matrix_fixed_ref.h.
|
private |
Abort if any element of M is inf or nan.
Definition at line 483 of file vnl_matrix_fixed_ref.hxx.
|
inline |
abort if size is not as expected.
This function does or tests nothing if NDEBUG is defined
Definition at line 353 of file vnl_matrix_fixed_ref.h.
|
private |
Abort unless M has the given size.
Definition at line 511 of file vnl_matrix_fixed_ref.hxx.
|
inline |
Iterator pointing to start of data.
Definition at line 212 of file vnl_matrix_fixed_ref.h.
|
inline |
Return number of columns.
A synonym for columns()
Definition at line 243 of file vnl_matrix_fixed_ref.h.
|
inline |
Return number of columns.
A synonym for cols()
Definition at line 239 of file vnl_matrix_fixed_ref.h.
| vnl_matrix_fixed< T, ncols, nrows > vnl_matrix_fixed_ref_const< T, nrows, ncols >::conjugate_transpose | ( | ) | const |
Return conjugate transpose.
Definition at line 105 of file vnl_matrix_fixed_ref.hxx.
| void vnl_matrix_fixed_ref_const< T, nrows, ncols >::copy_out | ( | T * | p | ) | const |
Definition at line 165 of file vnl_matrix_fixed_ref.hxx.
|
inline |
Definition at line 207 of file vnl_matrix_fixed_ref.h.
|
inlinestatic |
Definition at line 378 of file vnl_matrix_fixed_ref.h.
|
inlinestatic |
Definition at line 379 of file vnl_matrix_fixed_ref.h.
|
inline |
Return true iff the size is zero.
Definition at line 330 of file vnl_matrix_fixed_ref.h.
|
inline |
Iterator pointing to element beyond end of data.
Definition at line 214 of file vnl_matrix_fixed_ref.h.
|
inlinestatic |
Definition at line 381 of file vnl_matrix_fixed_ref.h.
| vnl_matrix< T > vnl_matrix_fixed_ref_const< T, nrows, ncols >::extract | ( | unsigned | rowz, |
| unsigned | colz, | ||
| unsigned | top = 0, |
||
| unsigned | left = 0 |
||
| ) | const |
Extract a sub-matrix of size rows x cols, starting at (top,left).
Thus it contains elements [top,top+rows-1][left,left+cols-1]
Definition at line 135 of file vnl_matrix_fixed_ref.hxx.
|
inline |
Return Frobenius norm of matrix (sqrt of sum of squares of its elements).
Definition at line 307 of file vnl_matrix_fixed_ref.h.
|
inline |
Return Frobenius norm of matrix (sqrt of sum of squares of its elements).
Definition at line 304 of file vnl_matrix_fixed_ref.h.
|
inline |
Get j-th column.
Definition at line 196 of file vnl_matrix_fixed_ref.h.
| vnl_vector< T > vnl_matrix_fixed_ref_const< T, nrows, ncols >::get_diagonal | ( | ) | const |
Return a vector with the content of the (main) diagonal.
Definition at line 298 of file vnl_matrix_fixed_ref.hxx.
| vnl_matrix< T > vnl_matrix_fixed_ref_const< T, nrows, ncols >::get_n_columns | ( | unsigned | colstart, |
| unsigned | n | ||
| ) | const |
Get n columns beginning at colstart.
Definition at line 282 of file vnl_matrix_fixed_ref.hxx.
| vnl_matrix< T > vnl_matrix_fixed_ref_const< 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 269 of file vnl_matrix_fixed_ref.hxx.
|
inline |
Get j-th row.
Definition at line 187 of file vnl_matrix_fixed_ref.h.
| bool vnl_matrix_fixed_ref_const< T, nrows, ncols >::has_nans | ( | ) | const |
Return true if matrix contains NaNs.
Definition at line 458 of file vnl_matrix_fixed_ref.hxx.
| bool vnl_matrix_fixed_ref_const< T, nrows, ncols >::is_finite | ( | ) | const |
Return true if finite.
Definition at line 470 of file vnl_matrix_fixed_ref.hxx.
| bool vnl_matrix_fixed_ref_const< T, nrows, ncols >::is_identity | ( | ) | const |
Return true if all elements equal to identity.
Definition at line 400 of file vnl_matrix_fixed_ref.hxx.
| bool vnl_matrix_fixed_ref_const< 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 417 of file vnl_matrix_fixed_ref.hxx.
| bool vnl_matrix_fixed_ref_const< T, nrows, ncols >::is_zero | ( | ) | const |
Return true if all elements equal to zero.
Definition at line 433 of file vnl_matrix_fixed_ref.hxx.
| bool vnl_matrix_fixed_ref_const< T, nrows, ncols >::is_zero | ( | double | tol | ) | const |
Return true if all elements equal to zero, within given tolerance.
Definition at line 446 of file vnl_matrix_fixed_ref.hxx.
|
inline |
Return maximum value of elements.
Definition at line 316 of file vnl_matrix_fixed_ref.h.
|
inline |
Return mean of all matrix elements.
Definition at line 325 of file vnl_matrix_fixed_ref.h.
|
inline |
Return minimum value of elements.
Definition at line 313 of file vnl_matrix_fixed_ref.h.
|
inlinestatic |
Definition at line 376 of file vnl_matrix_fixed_ref.h.
|
inlinestatic |
Definition at line 377 of file vnl_matrix_fixed_ref.h.
|
inline |
Definition at line 221 of file vnl_matrix_fixed_ref.h.
|
inlineprivate |
Definition at line 384 of file vnl_matrix_fixed_ref.h.
|
inline |
return pointer to given row.
No boundary checking here.
Definition at line 232 of file vnl_matrix_fixed_ref.h.
| vnl_matrix_fixed_ref_const< T, nrows, ncols >::abs_t vnl_matrix_fixed_ref_const< T, nrows, ncols >::operator_inf_norm | ( | ) | const |
Definition at line 592 of file vnl_matrix_fixed_ref.hxx.
| vnl_matrix_fixed_ref_const< T, nrows, ncols >::abs_t vnl_matrix_fixed_ref_const< T, nrows, ncols >::operator_one_norm | ( | ) | const |
Definition at line 576 of file vnl_matrix_fixed_ref.hxx.
| void vnl_matrix_fixed_ref_const< T, nrows, ncols >::print | ( | std::ostream & | os | ) | const |
Print matrix to os in some hopefully sensible format.
Definition at line 59 of file vnl_matrix_fixed_ref.hxx.
|
inline |
Return RMS of all elements.
Definition at line 310 of file vnl_matrix_fixed_ref.h.
|
inline |
Return number of rows.
Definition at line 235 of file vnl_matrix_fixed_ref.h.
|
inline |
Return number of elements.
Definition at line 247 of file vnl_matrix_fixed_ref.h.
|
inlinestatic |
Definition at line 373 of file vnl_matrix_fixed_ref.h.
|
inlinestatic |
Definition at line 374 of file vnl_matrix_fixed_ref.h.
|
inlinestatic |
Definition at line 375 of file vnl_matrix_fixed_ref.h.
| vnl_matrix_fixed< T, ncols, nrows > vnl_matrix_fixed_ref_const< T, nrows, ncols >::transpose | ( | ) | const |
Return transpose.
Definition at line 94 of file vnl_matrix_fixed_ref.hxx.
|
protected |
Definition at line 172 of file vnl_matrix_fixed_ref.h.
1.8.15