armamexcpp

armamexcpp #

arma/mex interface using Matlab C++ API

More…

Functions #

Name
template <class T >
std::vector< arma::Mat< T > >
m2a_cellmat(matlab::data::CellArray & matlab_cell)
Convert matlab cell array to vector of armadillo matrices.
template <class T >
std::vector< T >
m2s_vec(matlab::data::TypedArray< T > & matlab_array)
Convert matlab matrix to a vector of scalars.
template <class T >
arma::Col< T >
m2a_vec(matlab::data::TypedArray< T > matlab_array)
Convert matlab to armadillo vector.
template <class T >
arma::Mat< T >
m2a_mat(matlab::data::TypedArray< T > matlab_array)
Convert matlab to armadillo matrix.
template <class T >
matlab::data::TypedArray< T >
a2m_mat(const arma::Mat< T > & arma_mat, matlab::data::ArrayFactory & factory)
Convert armadillo to matlab matrix.
template <class T >
matlab::data::TypedArray< T >
a2m_vec(const arma::Col< T > & arma_vec, matlab::data::ArrayFactory & factory)
Convert armadillo to matlab vector.
template <class T >
matlab::data::TypedArray< T >
s2m_vec(const std::vector< T > & std_vec, matlab::data::ArrayFactory & factory)
Convert vector of scalar T to matlab matrix.

Detailed Description #

utilities for arma/mex interface using Matlab C++ API

Function Details #

m2a_cellmat #

template <class T >
std::vector< arma::Mat< T > > m2a_cellmat(
    matlab::data::CellArray & matlab_cell
)

Parameters:

  • matlab_cell matlab cell

Template Parameters:

  • T type

Return: vector of armadillo matrices of type T

m2s_vec #

template <class T >
std::vector< T > m2s_vec(
    matlab::data::TypedArray< T > & matlab_array
)

Parameters:

  • matlab_array matlab array

Template Parameters:

  • T type

Return: vector of type T

m2a_vec #

template <class T >
arma::Col< T > m2a_vec(
    matlab::data::TypedArray< T > matlab_array
)

Parameters:

  • matlab_array matlab array

Template Parameters:

  • T type

Return: armadillo vector of type T

m2a_mat #

template <class T >
arma::Mat< T > m2a_mat(
    matlab::data::TypedArray< T > matlab_array
)

Parameters:

  • matlab_array matlab matrix

Template Parameters:

  • T type

Return: armadillo matrix of type T

a2m_mat #

template <class T >
matlab::data::TypedArray< T > a2m_mat(
    const arma::Mat< T > & arma_mat,
    matlab::data::ArrayFactory & factory
)

Parameters:

  • arma_mat arma matrix
  • factory matlab “array factory”

Template Parameters:

  • T type

Return: matlab matrix

a2m_vec #

template <class T >
matlab::data::TypedArray< T > a2m_vec(
    const arma::Col< T > & arma_vec,
    matlab::data::ArrayFactory & factory
)

Parameters:

  • arma_vec armadillo vector
  • factory matlab “array factory”

Template Parameters:

  • T type

Return: matlab matrix

s2m_vec #

template <class T >
matlab::data::TypedArray< T > s2m_vec(
    const std::vector< T > & std_vec,
    matlab::data::ArrayFactory & factory
)

Parameters:

  • std_vec standard vector
  • factory matlab “array factory”

Template Parameters:

  • T type

Return: matlab matrix


Updated on 19 May 2022 at 17:16:03 Eastern Daylight Time