فهرست منبع

adapted to new matio version with hdf5

bodesheim 12 سال پیش
والد
کامیت
c36290235d
3فایلهای تغییر یافته به همراه13 افزوده شده و 7 حذف شده
  1. 6 3
      core/matlabAccess/MatFileIO.cpp
  2. 6 4
      core/matlabAccess/MatFileIO.h
  3. 1 0
      core/matlabAccess/libdepend.inc

+ 6 - 3
core/matlabAccess/MatFileIO.cpp

@@ -30,7 +30,10 @@ namespace NICE {
       } 
       
       // Default destructor
-      MatFileIO::~MatFileIO() {}
+      MatFileIO::~MatFileIO() {
+        
+        Mat_Close(mat);
+      }
       
       //------------------------------------------------------
       // count number of stored variables
@@ -420,14 +423,14 @@ namespace NICE {
 	
 	if (matvar == NULL) {
 	  
-	  fthrow(Exception, "MatFileIO::getFeatureMatrixViaName(char * _name, feature_matrix_order order): variable with specified name does not exist");
+	  fthrow(Exception, "MatFileIO::getVectorViaName(NICE::Vector & vec, std::string _name): variable with specified name does not exist");
 	  return;
 	}
 	
 	// it can happen that a vector is treated as (N x 1) or (1 x N) matrix with two dimensions
 	if (matvar->rank > 2 || ( (matvar->rank == 2) && (matvar->dims[0] != 1) && (matvar->dims[1] != 1) ) ) {
 	  
-	  fthrow(Exception, "MatFileIO::getFeatureMatrixViaName(char * _name, feature_matrix_order order): dimension of variable > 1");
+	  fthrow(Exception, "MatFileIO::getVectorViaName(NICE::Vector & vec, std::string _name): dimension of variable > 1");
 	  return;
 	}  
 	

+ 6 - 4
core/matlabAccess/MatFileIO.h

@@ -26,6 +26,9 @@
 
 #include <matio/matio.h>
 
+#ifndef sparse_t
+#define sparse_t mat_sparse_t
+#endif
 
 namespace NICE {
   
@@ -39,7 +42,7 @@ namespace NICE {
 
       //------------------------------------------------------
       // several constructors and destructors
-      //------------------------------------------------------
+      //----------------------------------------------------
 
       /** 
       * @brief Default constructor
@@ -130,9 +133,8 @@ namespace NICE {
       * @param _name name of the variable
       * @param vec result: vector with name _name in format NICE::Vector 
       */ 
-      void getVectorViaName(NICE::Vector & vec, std::string _name);
-      
-      
+      void getVectorViaName(NICE::Vector & vec, std::string _name);  
+            
   }; // class
   
 } // namespace

+ 1 - 0
core/matlabAccess/libdepend.inc

@@ -1,3 +1,4 @@
 $(call PKG_DEPEND_INT,core/basics/)
 $(call PKG_DEPEND_INT,core/vector/)
 $(call PKG_DEPEND_EXT_ESSENTIAL,MATIO)
+$(call PKG_DEPEND_EXT_ESSENTIAL,HDF5)