[med-svn] [SCM] mia branch, master, updated. upstream/2.0.7-64-gb612b58
Gert Wollny
gw.fossdev at gmail.com
Wed Feb 27 10:38:43 UTC 2013
The following commit has been merged in the master branch:
commit 00732a4c8dfc9f3c8c891d5900fba922dfc55a0d
Author: Gert Wollny <gw.fossdev at gmail.com>
Date: Tue Feb 26 17:14:45 2013 +0100
add patch to debian tree
diff --git a/debian/patches/03_fix_test_close_to_zero.patch b/debian/patches/03_fix_test_close_to_zero.patch
index 4124ca1..176675b 100644
--- a/debian/patches/03_fix_test_close_to_zero.patch
+++ b/debian/patches/03_fix_test_close_to_zero.patch
@@ -6,8 +6,6 @@ Description: Fix failing tests on powerpc 32 bit
.
* Initial release (Closes: #694437)
Author: Gert Wollny <gw.fossdev at gmail.com>
-Bug-Debian: http://bugs.debian.org/694437
-
Origin: upstream
Bug: https://sourceforge.net/p/mia/tickets/74/
Forwarded: not-needed
diff --git a/debian/patches/04_silence_ambiguous_function_warning.patch b/debian/patches/04_silence_ambiguous_function_warning.patch
new file mode 100644
index 0000000..88b8580
--- /dev/null
+++ b/debian/patches/04_silence_ambiguous_function_warning.patch
@@ -0,0 +1,150 @@
+Description: Silence some warnings about ambiguos functions
+ The wrapper around gsl_vector offers two options to interpret the []
+ operator. The index tyoe size_t makes shure the right one is usd.
+ .
+ mia (2.0.8-1) UNRELEASED; urgency=low
+ .
+ * Initial release (Closes: #694437)
+Author: Gert Wollny <gw.fossdev at gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Last-Update: 2013-02-26
+
+--- mia-2.0.8.orig/gsl++/test_vector.cc
++++ mia-2.0.8/gsl++/test_vector.cc
+@@ -126,8 +126,10 @@ BOOST_AUTO_TEST_CASE( test_vector_non_ow
+ {
+ gsl_vector *x = gsl_vector_calloc(10);
+ DoubleVector wx(x);
++
++ const size_t i2 = 2;
+
+- wx[2] = 2.0;
++ wx[i2] = 2.0;
+
+ BOOST_CHECK_EQUAL(gsl_vector_get(x,2), 2.0);
+
+@@ -140,16 +142,17 @@ BOOST_AUTO_TEST_CASE( test_vector_copy )
+ DoubleVector wx(10, false);
+ DoubleVector wy(5, false);
+
+- wx[2] = 3.0;
+- BOOST_CHECK_EQUAL(wx[2], 3.0);
++ const size_t i2 = 2;
++ wx[i2] = 3.0;
++ BOOST_CHECK_EQUAL(wx[i2], 3.0);
+
+- wy[2] = 2.0;
+- BOOST_CHECK_EQUAL(wy[2], 2.0);
++ wy[i2] = 2.0;
++ BOOST_CHECK_EQUAL(wy[i2], 2.0);
+
+ BOOST_CHECK_EQUAL(wx.size(), 10u);
+ wx = wy;
+ BOOST_CHECK_EQUAL(wx.size(), 5u);
+- BOOST_CHECK_EQUAL(wx[2], 2.0);
++ BOOST_CHECK_EQUAL(wx[i2], 2.0);
+
+ }
+
+--- mia-2.0.8.orig/gsl++/vector_template.hh
++++ mia-2.0.8/gsl++/vector_template.hh
+@@ -133,7 +133,7 @@ protected:
+ a compatibility layer to make it possible to use STL algorithms and constructs.
+ */
+ template <typename T>
+-class TVector : public gsl_vector_dispatch<T> {
++class TVector : gsl_vector_dispatch<T> {
+ public:
+ typedef typename gsl_vector_dispatch<T>::iterator iterator;
+ typedef typename gsl_vector_dispatch<T>::const_iterator const_iterator;
+--- mia-2.0.8.orig/gsl++/test_multimin.cc
++++ mia-2.0.8/gsl++/test_multimin.cc
+@@ -48,12 +48,15 @@ BOOST_AUTO_TEST_CASE(test_cfdf_multmin )
+ CFDFMinimizer minimizer(CFDFMinimizer::PProblem(new TestCFDFProblem), gsl_multimin_fdfminimizer_conjugate_fr );
+
+ DoubleVector x(2, false);
+- x[0] = 5.0;
+- x[1] = 7.0;
++ const size_t i0 = 0;
++ const size_t i1 = 1;
++
++ x[i0] = 5.0;
++ x[i1] = 7.0;
+
+ BOOST_REQUIRE(minimizer.run(x)== GSL_SUCCESS);
+- BOOST_CHECK_CLOSE(x[0], 1.0, 0.1);
+- BOOST_CHECK_CLOSE(x[1], 2.0, 0.1);
++ BOOST_CHECK_CLOSE(x[i0], 1.0, 0.1);
++ BOOST_CHECK_CLOSE(x[i1], 2.0, 0.1);
+ }
+
+ TestCFDFProblem::TestCFDFProblem():
+@@ -68,8 +71,11 @@ TestCFDFProblem::TestCFDFProblem():
+ double TestCFDFProblem::do_f(const DoubleVector& v)
+ {
+
+- const double x = v[0];
+- const double y = v[1];
++ const size_t i0 = 0;
++ const size_t i1 = 1;
++
++ const double x = v[i0];
++ const double y = v[i1];
+
+ return m_p[2] * (x - m_p[0]) * (x - m_p[0]) +
+ m_p[3] * (y - m_p[1]) * (y - m_p[1]) + m_p[4];
+@@ -78,11 +84,14 @@ double TestCFDFProblem::do_f(const Doub
+
+ void TestCFDFProblem::do_df(const DoubleVector& v, DoubleVector& g)
+ {
+- const double x = v[0];
+- const double y = v[1];
++ const size_t i0 = 0;
++ const size_t i1 = 1;
++
++ const double x = v[i0];
++ const double y = v[i1];
+
+- g[0] = 2.0 * m_p[2] * (x - m_p[0]);
+- g[1] = 2.0 * m_p[3] * (y - m_p[1]);
++ g[i0] = 2.0 * m_p[2] * (x - m_p[0]);
++ g[i1] = 2.0 * m_p[3] * (y - m_p[1]);
+ }
+
+ double TestCFDFProblem::do_fdf(const DoubleVector& x, DoubleVector& g)
+@@ -105,13 +114,16 @@ BOOST_AUTO_TEST_CASE(test_cf_multmin )
+ {
+ CFMinimizer minimizer(CFMinimizer::PProblem(new TestCFProblem), gsl_multimin_fminimizer_nmsimplex );
+
++ const size_t i0 = 0;
++ const size_t i1 = 1;
++
+ DoubleVector x(2, false);
+- x[0] = 5.0;
+- x[1] = 7.0;
++ x[i0] = 5.0;
++ x[i1] = 7.0;
+
+ BOOST_REQUIRE(minimizer.run(x)== GSL_SUCCESS);
+- BOOST_CHECK_CLOSE(x[0], 1.0, 1);
+- BOOST_CHECK_CLOSE(x[1], 2.0, 1);
++ BOOST_CHECK_CLOSE(x[i0], 1.0, 1);
++ BOOST_CHECK_CLOSE(x[i1], 2.0, 1);
+ }
+
+
+@@ -126,8 +138,11 @@ TestCFProblem::TestCFProblem():
+ double TestCFProblem::do_f(const DoubleVector& v)
+ {
+
+- const double x = v[0];
+- const double y = v[1];
++ const size_t i0 = 0;
++ const size_t i1 = 1;
++
++ const double x = v[i0];
++ const double y = v[i1];
+
+ return m_p[2] * (x - m_p[0]) * (x - m_p[0]) +
+ m_p[3] * (y - m_p[1]) * (y - m_p[1]) + m_p[4];
diff --git a/debian/patches/series b/debian/patches/series
index 0eb03fc..4427780 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
01_disable-treeview-for-jquery-compatibility.patch
02_2dmyoset-manpage-lintian-fix.patch
03_fix_test_close_to_zero.patch
+04_silence_ambiguous_function_warning.patch
diff --git a/gsl++/test_multimin.cc b/gsl++/test_multimin.cc
index 674ff47..1077ba0 100644
--- a/gsl++/test_multimin.cc
+++ b/gsl++/test_multimin.cc
@@ -48,15 +48,12 @@ BOOST_AUTO_TEST_CASE(test_cfdf_multmin )
CFDFMinimizer minimizer(CFDFMinimizer::PProblem(new TestCFDFProblem), gsl_multimin_fdfminimizer_conjugate_fr );
DoubleVector x(2, false);
- const size_t i0 = 0;
- const size_t i1 = 1;
-
- x[i0] = 5.0;
- x[i1] = 7.0;
+ x[0] = 5.0;
+ x[1] = 7.0;
BOOST_REQUIRE(minimizer.run(x)== GSL_SUCCESS);
- BOOST_CHECK_CLOSE(x[i0], 1.0, 0.1);
- BOOST_CHECK_CLOSE(x[i1], 2.0, 0.1);
+ BOOST_CHECK_CLOSE(x[0], 1.0, 0.1);
+ BOOST_CHECK_CLOSE(x[1], 2.0, 0.1);
}
TestCFDFProblem::TestCFDFProblem():
@@ -71,11 +68,8 @@ TestCFDFProblem::TestCFDFProblem():
double TestCFDFProblem::do_f(const DoubleVector& v)
{
- const size_t i0 = 0;
- const size_t i1 = 1;
-
- const double x = v[i0];
- const double y = v[i1];
+ const double x = v[0];
+ const double y = v[1];
return m_p[2] * (x - m_p[0]) * (x - m_p[0]) +
m_p[3] * (y - m_p[1]) * (y - m_p[1]) + m_p[4];
@@ -84,14 +78,11 @@ double TestCFDFProblem::do_f(const DoubleVector& v)
void TestCFDFProblem::do_df(const DoubleVector& v, DoubleVector& g)
{
- const size_t i0 = 0;
- const size_t i1 = 1;
-
- const double x = v[i0];
- const double y = v[i1];
+ const double x = v[0];
+ const double y = v[1];
- g[i0] = 2.0 * m_p[2] * (x - m_p[0]);
- g[i1] = 2.0 * m_p[3] * (y - m_p[1]);
+ g[0] = 2.0 * m_p[2] * (x - m_p[0]);
+ g[1] = 2.0 * m_p[3] * (y - m_p[1]);
}
double TestCFDFProblem::do_fdf(const DoubleVector& x, DoubleVector& g)
@@ -114,16 +105,13 @@ BOOST_AUTO_TEST_CASE(test_cf_multmin )
{
CFMinimizer minimizer(CFMinimizer::PProblem(new TestCFProblem), gsl_multimin_fminimizer_nmsimplex );
- const size_t i0 = 0;
- const size_t i1 = 1;
-
DoubleVector x(2, false);
- x[i0] = 5.0;
- x[i1] = 7.0;
+ x[0] = 5.0;
+ x[1] = 7.0;
BOOST_REQUIRE(minimizer.run(x)== GSL_SUCCESS);
- BOOST_CHECK_CLOSE(x[i0], 1.0, 1);
- BOOST_CHECK_CLOSE(x[i1], 2.0, 1);
+ BOOST_CHECK_CLOSE(x[0], 1.0, 1);
+ BOOST_CHECK_CLOSE(x[1], 2.0, 1);
}
@@ -138,11 +126,8 @@ TestCFProblem::TestCFProblem():
double TestCFProblem::do_f(const DoubleVector& v)
{
- const size_t i0 = 0;
- const size_t i1 = 1;
-
- const double x = v[i0];
- const double y = v[i1];
+ const double x = v[0];
+ const double y = v[1];
return m_p[2] * (x - m_p[0]) * (x - m_p[0]) +
m_p[3] * (y - m_p[1]) * (y - m_p[1]) + m_p[4];
diff --git a/gsl++/test_vector.cc b/gsl++/test_vector.cc
index 7ca16db..2fd34da 100644
--- a/gsl++/test_vector.cc
+++ b/gsl++/test_vector.cc
@@ -126,10 +126,8 @@ BOOST_AUTO_TEST_CASE( test_vector_non_owning )
{
gsl_vector *x = gsl_vector_calloc(10);
DoubleVector wx(x);
-
- const size_t i2 = 2;
- wx[i2] = 2.0;
+ wx[2] = 2.0;
BOOST_CHECK_EQUAL(gsl_vector_get(x,2), 2.0);
@@ -142,17 +140,16 @@ BOOST_AUTO_TEST_CASE( test_vector_copy )
DoubleVector wx(10, false);
DoubleVector wy(5, false);
- const size_t i2 = 2;
- wx[i2] = 3.0;
- BOOST_CHECK_EQUAL(wx[i2], 3.0);
+ wx[2] = 3.0;
+ BOOST_CHECK_EQUAL(wx[2], 3.0);
- wy[i2] = 2.0;
- BOOST_CHECK_EQUAL(wy[i2], 2.0);
+ wy[2] = 2.0;
+ BOOST_CHECK_EQUAL(wy[2], 2.0);
BOOST_CHECK_EQUAL(wx.size(), 10u);
wx = wy;
BOOST_CHECK_EQUAL(wx.size(), 5u);
- BOOST_CHECK_EQUAL(wx[i2], 2.0);
+ BOOST_CHECK_EQUAL(wx[2], 2.0);
}
diff --git a/gsl++/vector_template.hh b/gsl++/vector_template.hh
index 9de0bbe..4e5015d 100644
--- a/gsl++/vector_template.hh
+++ b/gsl++/vector_template.hh
@@ -133,7 +133,7 @@ protected:
a compatibility layer to make it possible to use STL algorithms and constructs.
*/
template <typename T>
-class TVector : gsl_vector_dispatch<T> {
+class TVector : public gsl_vector_dispatch<T> {
public:
typedef typename gsl_vector_dispatch<T>::iterator iterator;
typedef typename gsl_vector_dispatch<T>::const_iterator const_iterator;
--
Packaging of mia in Debian
More information about the debian-med-commit
mailing list