[opengm] 208/386: fixed major bug in editabledataset.hxx
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:37:46 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 d747e655f7de90da0ef61ef163c862c1e604b8d4
Author: DerThorsten <thorsten.beier at iwr.uni-heidelberg.de>
Date: Fri Jan 9 10:25:09 2015 +0100
fixed major bug in editabledataset.hxx
---
include/opengm/learning/dataset/editabledataset.hxx | 4 ++--
include/opengm/learning/dataset/testdatasets.hxx | 10 +++++-----
include/opengm/learning/struct-max-margin.hxx | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/opengm/learning/dataset/editabledataset.hxx b/include/opengm/learning/dataset/editabledataset.hxx
index 9ccb505..66f9e10 100644
--- a/include/opengm/learning/dataset/editabledataset.hxx
+++ b/include/opengm/learning/dataset/editabledataset.hxx
@@ -38,7 +38,7 @@ namespace opengm {
typedef opengm::learning::Weights<ValueType> Weights;
typedef std::vector<LabelType> GTVector;
- EditableDataset(size_t numInstances=0) : Dataset<GM, LOSS>(numInstances) {}
+ EditableDataset(size_t numInstances=0) : Dataset<GM, LOSS,LOSS_GM>(numInstances) {}
EditableDataset(std::vector<GM>& gms, std::vector<GTVector >& gts, std::vector<LossParameterType>& lossParams);
void setInstance(const size_t i, const GM& gm, const GTVector& gt, const LossParameterType& p=LossParameterType());
@@ -51,7 +51,7 @@ namespace opengm {
EditableDataset<GM, LOSS, LOSS_GM>::EditableDataset(std::vector<GM>& gms,
std::vector<GTVector >& gts,
std::vector<LossParameterType>& lossParams)
- : Dataset<GM, LOSS>(gms.size())
+ : Dataset<GM, LOSS, LOSS_GM>(gms.size())
{
for(size_t i=0; i<gms.size(); ++i){
setInstance(i, gms[i], gts[i], lossParams[i]);
diff --git a/include/opengm/learning/dataset/testdatasets.hxx b/include/opengm/learning/dataset/testdatasets.hxx
index 84d5484..c5f20f8 100644
--- a/include/opengm/learning/dataset/testdatasets.hxx
+++ b/include/opengm/learning/dataset/testdatasets.hxx
@@ -14,7 +14,7 @@ namespace opengm {
namespace datasets{
template<class GM, class LOSS>
- class TestDataset0 : public Dataset<GM,LOSS>{
+ class TestDataset0 : public Dataset<GM,LOSS,GM>{
public:
typedef GM GMType;
typedef GM GMWITHLOSS;
@@ -28,7 +28,7 @@ namespace opengm {
};
template<class GM, class LOSS>
- class TestDataset1 : public Dataset<GM,LOSS>{
+ class TestDataset1 : public Dataset<GM,LOSS,GM>{
public:
typedef GM GMType;
typedef GM GMWITHLOSS;
@@ -43,7 +43,7 @@ namespace opengm {
template<class GM, class LOSS>
- class TestDataset2 : public Dataset<GM,LOSS>{
+ class TestDataset2 : public Dataset<GM,LOSS,GM>{
public:
typedef GM GMType;
typedef GM GMWITHLOSS;
@@ -57,7 +57,7 @@ namespace opengm {
};
template<class GM, class LOSS>
- class TestDatasetSimple : public Dataset<GM,LOSS>{
+ class TestDatasetSimple : public Dataset<GM,LOSS,GM>{
public:
typedef GM GMType;
typedef GM GMWITHLOSS;
@@ -71,7 +71,7 @@ namespace opengm {
};
template<class GM, class LOSS>
- class EditableTestDataset : public EditableDataset<GM,LOSS>{
+ class EditableTestDataset : public EditableDataset<GM,LOSS,GM>{
public:
typedef GM GMType;
typedef GM GMWITHLOSS;
diff --git a/include/opengm/learning/struct-max-margin.hxx b/include/opengm/learning/struct-max-margin.hxx
index 2974c57..886d8b4 100644
--- a/include/opengm/learning/struct-max-margin.hxx
+++ b/include/opengm/learning/struct-max-margin.hxx
@@ -105,8 +105,8 @@ private:
// get E(x,y) and F(x,y)
//std::cout << "locking model " << i << " of " << _dataset.getNumberOfModels() << std::endl;
_dataset.lockModel(i);
- const typename DatasetType::GMType& gm = _dataset.getModel(i);
- const typename DatasetType::GMWITHLOSS& gml = _dataset.getModelWithLoss(i);
+ GMType & gm = _dataset.getModel(i);
+ GMWITHLOSS & gml = _dataset.getModelWithLoss(i);
// get the best-effort solution y'
const ConfigurationType& bestEffort = _dataset.getGT(i);
--
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