Bug#736985: libeigen3-dev: Spline Module: A call to Spline::derivative fails to compile if dimension=1

Philipp Büttgenbach Philipp.Buettgenbach at gmx.de
Tue Jan 28 22:26:31 UTC 2014


Package: libeigen3-dev
Version: 3.1.0-1
Severity: normal
Tags: patch

Dear Maintainer,

the bug can be demonstrated using Hauke's example from
http://forum.kde.nl/viewtopic.php?f=74&t=98871 (see enclosed file). The call to
Spline2d::derivative<1> is an extension of Hauke's example inserted
by me.  This call makes this example fail to compile:

---8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<----
$ LANG=C g++ -I/usr/include/eigen3/ eigen-spline-example-from-hauke.cpp
In file included from /usr/include/eigen3/Eigen/Core:300:0,
                 from eigen-spline-example-from-hauke.cpp:4:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In instantiation of
'static void Eigen::PlainObjectBase<Derived>::_check_template_params() [with
Derived = Eigen::Array<double, 1, -1, 0, 1, 2>]':
/usr/include/eigen3/Eigen/src/Core/Array.h:127:7:   required from
'Eigen::Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Array()
[with _Scalar = double; int _Rows = 1; int _Cols = -1; int _Options = 0; int
_MaxRows = 1; int _MaxCols = 2]'
/usr/include/eigen3/unsupported/Eigen/src/Splines/Spline.h:339:70:   required
from 'typename Eigen::SplineTraits<Eigen::Spline<Scalar, Dim, Degree>,
DerivativeOrder>::DerivativeType Eigen::Spline<Scalar, Dim,
Degree>::derivatives(Eigen::Spline<Scalar, Dim, Degree>::Scalar,
Eigen::DenseIndex) const [with int DerivativeOrder = 1; _Scalar = double; int
_Dim = 1; int _Degree = -1; typename Eigen::SplineTraits<Eigen::Spline<Scalar,
Dim, Degree>, DerivativeOrder>::DerivativeType = Eigen::Array<double, 1, -1, 0,
1, 2>; Eigen::Spline<Scalar, Dim, Degree>::Scalar = double; Eigen::DenseIndex =
int]'
eigen-spline-example-from-hauke.cpp:37:98:   required from here
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:654:7: error:
'INVALID_MATRIX_TEMPLATE_PARAMETERS' is not a member of
'Eigen::internal::static_assertion<false>'
---8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<----

This bug can be fixed by changing in
/usr/include/eigen3/unsupported/Eigen/src/Splines/SplineFwd.h the
DerivativeType from ColMajor to RowMajor (see enclosed patch for details).
With this change everything compiles fine:

---8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<----
$ LANG=C g++ -I/usr/include/eigen3/ -include SplineFwd.h eigen-spline-example-
from-hauke.cpp && echo $?
0
---8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<----









-- System Information:
Debian Release: 7.3
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

libeigen3-dev depends on no packages.

libeigen3-dev recommends no packages.

Versions of packages libeigen3-dev suggests:
ii  libeigen3-doc  3.1.0-1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eigen-spline-example-from-hauke.cpp
Type: text/x-c
Size: 1143 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20140128/2b9c6da5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SplineFwd.h.patch
Type: text/x-diff
Size: 668 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20140128/2b9c6da5/attachment.patch>


More information about the debian-science-maintainers mailing list