[opengm] 110/386: bugfix
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:35:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository opengm.
commit 5769514375afa3c7fa155379803d7f70d7f63abb
Author: joergkappes <kappes at math.uni-heidelberg.de>
Date: Wed Dec 17 18:57:52 2014 +0100
bugfix
---
.../opengm/datastructures/marray/marray_hdf5.hxx | 6 ++---
include/opengm/learning/dataset/dataset_io.hxx | 2 ++
src/unittest/CMakeLists.txt | 30 +++++++++++-----------
3 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/include/opengm/datastructures/marray/marray_hdf5.hxx b/include/opengm/datastructures/marray/marray_hdf5.hxx
index cccf292..8e292f1 100644
--- a/include/opengm/datastructures/marray/marray_hdf5.hxx
+++ b/include/opengm/datastructures/marray/marray_hdf5.hxx
@@ -528,11 +528,11 @@ void loadVec(
std::vector<T>& out
)
{
- marray::Vector<T> v;
- loadShape( groupHandle,datasetName,v);
+ marray::Marray<T> v;
+ load( groupHandle,datasetName,v);
out.resize(v.size());
for(size_t j=0; j<v.size(); ++j) {
- out[j] = v[j];
+ out[j] = v(j);
}
}
diff --git a/include/opengm/learning/dataset/dataset_io.hxx b/include/opengm/learning/dataset/dataset_io.hxx
index e43ebbb..0746689 100644
--- a/include/opengm/learning/dataset/dataset_io.hxx
+++ b/include/opengm/learning/dataset/dataset_io.hxx
@@ -5,6 +5,7 @@
#include <vector>
#include <cstdlib>
#include <opengm/graphicalmodel/graphicalmodel_hdf5.hxx>
+#include <opengm/opengm.hxx>
//#include <H5Cpp.h>
namespace opengm{
@@ -76,6 +77,7 @@ namespace opengm{
marray::hdf5::loadVec(file, "gt", dataset.gts_[m]);
marray::hdf5::closeFile(file);
opengm::hdf5::load(dataset.gms_[m],ss.str(),"gm");
+ OPENGM_CHECK_OP(dataset.gts_[m].size(), == ,dataset.gms_[m].numberOfVariables(), "");
dataset.buildModelWithLoss(m);
}
};
diff --git a/src/unittest/CMakeLists.txt b/src/unittest/CMakeLists.txt
index 15faf77..f220c18 100644
--- a/src/unittest/CMakeLists.txt
+++ b/src/unittest/CMakeLists.txt
@@ -79,21 +79,21 @@ if(BUILD_TESTING)
add_test(test-io-hdf5 ${CMAKE_CURRENT_BINARY_DIR}/test-io-hdf5)
endif()
- if(WITH_TRWS)
- if(WITH_GUROBI)
- ADD_EXECUTABLE(test-learning test_learning.cxx ${headers})
- target_link_libraries(test-learning ${GUROBI_CXX_LIBRARY} ${GUROBI_LIBRARY})
- target_link_libraries(test-learning external-library-trws)
- add_test(test-learning ${CMAKE_CURRENT_BINARY_DIR}/test-learning)
- else()
- if(WITH_CPLEX)
- ADD_EXECUTABLE(test-learning test_learning.cxx ${headers})
- target_link_libraries(test-learning ${CPLEX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
- target_link_libraries(test-learning external-library-trws)
- add_test(test-learning ${CMAKE_CURRENT_BINARY_DIR}/test-learning)
- endif()
- endif()
- endif()
+# if(WITH_TRWS)
+# if(WITH_GUROBI)
+# ADD_EXECUTABLE(test-learning test_learning.cxx ${headers})
+# target_link_libraries(test-learning ${GUROBI_CXX_LIBRARY} ${GUROBI_LIBRARY})
+# target_link_libraries(test-learning external-library-trws)
+# add_test(test-learning ${CMAKE_CURRENT_BINARY_DIR}/test-learning)
+# else()
+# if(WITH_CPLEX)
+# ADD_EXECUTABLE(test-learning test_learning.cxx ${headers})
+# target_link_libraries(test-learning ${CPLEX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+# target_link_libraries(test-learning external-library-trws)
+# add_test(test-learning ${CMAKE_CURRENT_BINARY_DIR}/test-learning)
+# endif()
+# endif()
+# endif()
ADD_EXECUTABLE(test-memoryinfo test_memoryinfo.cxx ${headers})
add_test(test-memoryinfo ${CMAKE_CURRENT_BINARY_DIR}/test-memoryinfo)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opengm.git
More information about the debian-science-commits
mailing list