Macros | Functions
vnl_matlab_print.h File Reference

Print matrices and vectors in nice MATLAB format. More...

#include <iosfwd>
#include <vnl/vnl_fwd.h>
#include <vnl/vnl_matlab_print_format.h>
#include "vnl/vnl_export.h"

Go to the source code of this file.

Macros

#define MATLABPRINT(X)   (vnl_matlab_print(std::cerr, (X).as_ref(), #X))
 naughty naming-convention-defying-but-handy macro. More...
 

Functions

template<class T >
VNL_EXPORT std::ostream & vnl_matlab_print (std::ostream &, T const *array, unsigned length, vnl_matlab_print_format=vnl_matlab_print_format_default)
 print a 1D array. More...
 
template<class T >
VNL_EXPORT std::ostream & vnl_matlab_print (std::ostream &, T const *const *array, unsigned rows, unsigned cols, vnl_matlab_print_format=vnl_matlab_print_format_default)
 print a 2D array. More...
 
template<class T >
VNL_EXPORT std::ostream & vnl_matlab_print (std::ostream &, vnl_diag_matrix< T > const &, char const *variable_name=nullptr, vnl_matlab_print_format=vnl_matlab_print_format_default)
 print a vnl_diagonal_matrix<T>. More...
 
template<class T >
VNL_EXPORT std::ostream & vnl_matlab_print (std::ostream &, vnl_matrix< T > const &, char const *variable_name=nullptr, vnl_matlab_print_format=vnl_matlab_print_format_default)
 print a vnl_matrix<T>. More...
 
template<class T , 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 T >
VNL_EXPORT std::ostream & vnl_matlab_print (std::ostream &, vnl_matrix_ref< T > const &, char const *variable_name=nullptr, vnl_matlab_print_format=vnl_matlab_print_format_default)
 print a vnl_matrix_ref<T>. More...
 
template<class T >
VNL_EXPORT std::ostream & vnl_matlab_print (std::ostream &, vnl_vector< T > const &, char const *variable_name=nullptr, vnl_matlab_print_format=vnl_matlab_print_format_default)
 print a vnl_vector<T>. More...
 
template<class T , unsigned int n>
VNL_EXPORT std::ostream & vnl_matlab_print (std::ostream &, vnl_vector_fixed< T, n > const &, char const *variable_name=nullptr, vnl_matlab_print_format=vnl_matlab_print_format_default)
 print a vnl_vector_fixed<T>. More...
 

Detailed Description

Print matrices and vectors in nice MATLAB format.

Author
fsm, from awf's MatOps code.

Definition in file vnl_matlab_print.h.

Macro Definition Documentation

◆ MATLABPRINT

#define MATLABPRINT (   X)    (vnl_matlab_print(std::cerr, (X).as_ref(), #X))

naughty naming-convention-defying-but-handy macro.

Definition at line 93 of file vnl_matlab_print.h.

Function Documentation

◆ vnl_matlab_print() [1/8]

template<class T >
VNL_EXPORT std::ostream& vnl_matlab_print ( std::ostream &  ,
T const *  array,
unsigned  length,
vnl_matlab_print_format  = vnl_matlab_print_format_default 
)

print a 1D array.

Definition at line 26 of file vnl_matlab_print.hxx.

◆ vnl_matlab_print() [2/8]

template<class T >
VNL_EXPORT std::ostream& vnl_matlab_print ( std::ostream &  ,
T const *const *  array,
unsigned  rows,
unsigned  cols,
vnl_matlab_print_format  = vnl_matlab_print_format_default 
)

print a 2D array.

Definition at line 43 of file vnl_matlab_print.hxx.

◆ vnl_matlab_print() [3/8]

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

print a vnl_diagonal_matrix<T>.

Definition at line 54 of file vnl_matlab_print.hxx.

◆ vnl_matlab_print() [4/8]

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

print a vnl_matrix<T>.

Definition at line 71 of file vnl_matlab_print.hxx.

◆ vnl_matlab_print() [5/8]

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

Definition at line 112 of file vnl_matlab_print.hxx.

◆ vnl_matlab_print() [6/8]

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

print a vnl_matrix_ref<T>.

Definition at line 136 of file vnl_matlab_print.hxx.

◆ vnl_matlab_print() [7/8]

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

print a vnl_vector<T>.

Definition at line 95 of file vnl_matlab_print.hxx.

◆ vnl_matlab_print() [8/8]

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

print a vnl_vector_fixed<T>.

Definition at line 161 of file vnl_matlab_print.hxx.