utils.hpp File Reference

utility functions for the Dytex library. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
bool inp_minbnd (Mat &mtx, T minval)
 bound the minimum entroy of a matrix.
void dumpMatSize (const Mat &m)
 dump the size of the Mat.
void scaleRows (Mat &m, const Mat &w)
 scale the rows of a Mat.
void scaleCols (Mat &m, const Mat &w)
 scale the columns of a Mat.
ostream & operator<< (ostream &output, const Range &r)
 dump class Range to an output stream.
void timer_start ()
 start a runtime timer using clock().
double timer_stop ()
 stop the runtime timer, and return the elapsed time in seconds.
void timer_print ()
 print the elapsed time of the current timer.
void timerOn ()
 start a runtime timer using rusage.
int timerOff ()
 stop the runtime timer.
void timerPrint ()
 print the elapsed time of the current timer.
void strtok2 (string str, string del, string &key, string &valuestr)
 matlab equivalent to strtok
int checkOptionInStr (string str, string opt)
 matlab any(str=='opt')
OPT_F_TYPE computeVariance3dDouble (Mat input)
template<class T >
double meanOfStdVector (std::vector< T > input)
template<class T >
T minOfStdVector (std::vector< T > input)
void matlabSVD (Mat X, Mat &U, Mat &S, Mat &V)
char * readMatrix (char *mptr, Mat &mtx)
char * writeMatrix (char *mptr, Mat &mtx)
Mat eigc (Mat &X)
 compute complex eigenvalues.
Mat eigc_abs (Mat &W)
 Compute the absolute value of complex eigenvalues.
void exitWithError (const std::string &error)

Detailed Description

utility functions for the Dytex library.

Definition in file utils.hpp.


Function Documentation

void dumpMatSize ( const Mat &  m  ) 

dump the size of the Mat.

Definition at line 52 of file utils.cpp.

Mat eigc ( Mat &  X  ) 

compute complex eigenvalues.

Compute the complex eigenvalues of X, and return the results in a matrix where the first column is the real-part, and the second column is the imag-part.

Parameters:
X matrix
Returns:
complex eigenvalues
See also:
eigr, eigc_abs

Definition at line 614 of file utils.cpp.

Mat eigc_abs ( Mat &  W  ) 

Compute the absolute value of complex eigenvalues.

Compute the absolute value of complex eigenvalues W, return the result.

Parameters:
W complex eigenvalues
Returns:
absolute value of W
See also:
eigc, eigr

Definition at line 592 of file utils.cpp.

template<typename T >
bool inp_minbnd ( Mat &  mtx,
T  minval 
) [inline]

bound the minimum entroy of a matrix.

Parameters:
mtx the matrix (will be modified)
minval the minimum value
Returns:
true if an entry in mtx is modified, false otherwise.

Definition at line 29 of file utils.hpp.

ostream& operator<< ( ostream &  output,
const Range &  r 
)

dump class Range to an output stream.

Definition at line 83 of file utils.cpp.

void scaleCols ( Mat &  m,
const Mat &  w 
)

scale the columns of a Mat.

scale each m.column(j) by w(j)

Definition at line 76 of file utils.cpp.

void scaleRows ( Mat &  m,
const Mat &  w 
)

scale the rows of a Mat.

scale each m.row(i) by w(i).

Definition at line 69 of file utils.cpp.

void strtok2 ( string  str,
string  del,
string &  key,
string &  valuestr 
)

matlab equivalent to strtok

See also:
timerOff, timerOn

Definition at line 170 of file utils.cpp.

void timer_print (  ) 

print the elapsed time of the current timer.

See also:
timer_stop, timer_start

Definition at line 104 of file utils.cpp.

void timer_start (  ) 

start a runtime timer using clock().

See also:
timer_stop, timer_print

Definition at line 94 of file utils.cpp.

double timer_stop (  ) 

stop the runtime timer, and return the elapsed time in seconds.

See also:
timer_start, timer_print

Definition at line 99 of file utils.cpp.

int timerOff (  ) 

stop the runtime timer.

See also:
timerOn, timerPrint

Definition at line 121 of file utils.cpp.

void timerOn (  ) 

start a runtime timer using rusage.

This is only compatible with UNIX/Linux systems, and should be more accurate than the clock() version.

See also:
timerOff, timerPrint

Definition at line 111 of file utils.cpp.

void timerPrint (  ) 

print the elapsed time of the current timer.

See also:
timerOff, timerOn

Definition at line 139 of file utils.cpp.


Generated on 18 Dec 2014 for libdt-OpenCV by  doxygen 1.6.1