ConverterNICEToMatlab.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifdef NICE_USELIB_MEX
  2. /**
  3. * @file ConverterNICEToMatlab.h
  4. * @author Alexander Freytag
  5. * @brief Several methods for converting NICE containers into Matlab data (Interface)
  6. * @date 15-01-2014 ( dd-mm-yyyy)
  7. */
  8. #ifndef _NICE_CONVERTERNICETOMATLABINCLUDE
  9. #define _NICE_CONVERTERNICETOMATLABINCLUDE
  10. // STL includes
  11. #include "mex.h"
  12. // NICE-core includes
  13. #include <core/vector/MatrixT.h>
  14. #include <core/vector/SparseVectorT.h>
  15. #include <core/vector/VectorT.h>
  16. namespace NICE {
  17. /**
  18. * @author Alexander Freytag, Johannes Ruehle
  19. * @brief Several methods for converting Matlab data into NICE containers
  20. */
  21. namespace MatlabConversion {
  22. /**
  23. * @brief Convert a SparseVector into a Matlab 1xD sparse matrix
  24. * @author Alexander Freytag
  25. * @date 15-01-2014 ( dd-mm-yyyy)
  26. *
  27. * @param niceSvec a NIC::SparseVector
  28. * @param b_adaptIndexCtoM if true, dim k will be inserted as k, not as k+1 (which would be the default for C->M) Defaults to false.
  29. * @return mxArray*
  30. **/
  31. mxArray* convertSparseVectorFromNice( const NICE::SparseVector & niceSvec, const bool & b_adaptIndexCtoM = false );
  32. /**
  33. * @brief Convert a NICE::Matrix into a full Matlab MxD matrix
  34. * @author Alexander Freytag
  35. * @date 15-01-2014 ( dd-mm-yyyy)
  36. *
  37. * @param niceMatrix a NICE::Matrix
  38. * @return mxArray*
  39. **/
  40. mxArray* convertMatrixFromNice( const NICE::Matrix & niceMatrix );
  41. /**
  42. * @brief Convert a NICE::Vector into a full Matlab 1xD matrix
  43. * @author Alexander Freytag
  44. * @date 15-01-2014 ( dd-mm-yyyy)
  45. *
  46. * @param niceVector a NICE::Vector
  47. * @return mxArray*
  48. **/
  49. mxArray* convertVectorFromNice( const NICE::Vector & niceVector );
  50. } // ns MatlabConversion
  51. }
  52. #endif
  53. #endif