Prev Next mat2cpp.hpp

The Matlab or Octave to C++ Using Ublas Include File

Syntax
# include <mat2cpp.hpp>


Purpose

Ublas Linkage
The mat2cpp.hpp contains the following include commands:
 
     # include <boost/numeric/ublas/matrix.hpp>
     # include <boost/numeric/ublas/matrix_proxy.hpp>
In addition, it links the following ublas identifiers to the mat2cpp namespace: matrix, zero_matrix, scalar_matrix, slice, matrix_slice. It also defines matrix_slice_double using
 
     typedef matrix_slice< matrix<double> >  matrix_slice_double;

mat2cpp Functions
The mat2cpp.hpp include also defines linkage for the following mat2cpp namespace functions:
abs Matlab or Octave Elementwise Unary Functions
log Matlab or Octave Elementwise Unary Functions
diag_prod Diagonal Matrix Product with General Matrix
matrix_div Matrix Division
max Maximum Element of a Matrix
min Minimum Element of a Matrix
scalar Convert Matrix to Scalar
sum Sum The Elements of a Matlab
rand Uniform Random Matrix
randn Normal Random Matrix

Fortran Linkage
The mat2cpp.hpp include also defines the following types:
fortran_integer the type in C++ corresponding to Fortran integer
fortran_double the type in C++ corresponding to Fortran double precision
fortran_subroutine the return type in C++ corresponding to Fortran subroutine

Input File: mat2cpp.hpp