NiHu  2.0
mex_matrix_interleaved.hpp File Reference

A Matlab mex matrix interface. More...

#include "eigen_utils.hpp"
#include "../core/result_matrix.hpp"
#include <complex>
#include <cstddef>
#include <mex.h>
#include <matrix.h>
#include <type_traits>
Include dependency graph for mex_matrix_interleaved.hpp:

Go to the source code of this file.

Classes

struct  NiHu::mex::classID< Scalar >
 metafunction assigning a Matlab class ID to a C type More...
 
struct  NiHu::mex::classID< std::complex< RealScalar > >
 
struct  NiHu::mex::classID< int >
 specialisation of classID to double More...
 
struct  NiHu::mex::classID< unsigned >
 
struct  NiHu::mex::classID< double >
 specialisation of classID to double More...
 
struct  NiHu::mex::classID< float >
 specialisation of classID to float More...
 
struct  NiHu::mex::complexity< Scalar >
 metafunction assigning a Matlab complexity to a C type More...
 
struct  NiHu::mex::complexity< std::complex< RealScalar > >
 
class  NiHu::mex::matrix< Scalar >
 Matlab mex matrix. More...
 
struct  NiHu::is_result_matrix_impl< mex::matrix< Scalar > >
 

Namespaces

 NiHu::mex
 Matlab mex interface classes.
 

Typedefs

template<class RealScalar >
using NiHu::mex::real_matrix = matrix< RealScalar >
 
template<class RealScalar >
using NiHu::mex::complex_matrix = matrix< std::complex< RealScalar > >
 

Functions

template<class Scalar >
void * NiHu::mex::get_data_ptr (mxArray const *pa)
 
template<class Scalar >
Scalar * NiHu::mex::get_data_pointer (mxArray const *pa)
 
template<>
void * NiHu::mex::get_data_ptr< double > (mxArray const *pa)
 
template<>
void * NiHu::mex::get_data_ptr< float > (mxArray const *pa)
 
template<>
void * NiHu::mex::get_data_ptr< int > (mxArray const *pa)
 
template<>
void * NiHu::mex::get_data_ptr< unsigned > (mxArray const *pa)
 
template<>
void * NiHu::mex::get_data_ptr< std::complex< double > > (mxArray const *pa)
 
template<>
void * NiHu::mex::get_data_ptr< std::complex< float > > (mxArray const *pa)
 
template<class Scalar >
const Scalar & NiHu::mex::get_scalar (mxArray const *pa)
 

Detailed Description

A Matlab mex matrix interface.

The interface makes it possible to use Matlab-borne matrices in C++ and to create Matlab matrices in C++. The interface handles real and complex matrices in a convenient manner, hiding mex implementation details from the C++ programmer.

Definition in file mex_matrix_interleaved.hpp.