ConverterNICEToMatlab.h 1.7 KB

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