Boost logo

Ublas :

From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2007-01-05 08:28:21


That is correct: size2 was changed into size_M in the ublas cvs head.
Therefore, the bindings were also changed. Using an older version of

~/boost-sandbox/boost/numeric/bindings/traits/ublas_matrix.hpp

or replacing size_M by size2 should help you.

Karl

Preben Holm wrote:

>Hello,
>
>Now after having done that, the problem arises (short version of error):
>~/boost-sandbox/boost/numeric/bindings/traits/ublas_matrix.hpp:78
> error: 'size_M' is not a member of 'boost::numeric::ublas::column_major'
>
>Looking at the cvs web interface tell's me that someone changed from a
>size2 to size_M, but don't know if this is the problem for me?
>
>
>Thanks,
>Preben
>
>
>
>
>>Hello,
>>
>>You should add
>>
>>#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
>>
>>
>>best,
>>
>>Karl
>>
>>
>>Preben Hagh Strunge Holm wrote:
>>
>>
>>
>>>Hi everyone
>>>
>>>I just ran into quite a problem. I checked out the latest cvs version of
>>>the boost-sandbox to try the bindings for lapack.
>>>
>>>I tried list little sample program - just to get something working
>>>(compilation):
>>>--------
>>>#include <iostream>
>>>
>>>#include <boost/numeric/bindings/lapack/gesv.hpp>
>>>#include <boost/numeric/ublas/matrix.hpp>
>>>
>>>
>>>namespace ublas = boost::numeric::ublas;
>>>namespace lapack = boost::numeric::bindings::lapack;
>>>
>>>
>>>int main() {
>>> ublas::matrix<double, ublas::column_major> A(3,3), B(3,1);
>>>
>>> lapack::gesv(A,B);
>>>
>>> return 0;
>>>}
>>>--------
>>>
>>>As far as the examples I've seen the boost bindings for lapack should do
>>>this without trouble since the matrix is column major.
>>>
>>>But compilation (with stl-filt and gcc 3.4.6) gives me this error:
>>>
>>>--------
>>>preben_at_thinkgen ~/working/master/src $
>>>/home/preben/scripts/gstlfilt/gfilt -I
>>>/home/preben/working/boost-sandbox/ -c ublas_lapack.cpp
>>>BD Software STL Message Decryptor v2.47a for gcc
>>>/home/preben/working/boost-
>>> sandbox/boost/numeric/bindings/traits/matrix_traits.hpp: In function
>>> `int boost::numeric::bindings::traits::matrix_size1(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )':
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:137:
>>> instantiated from
>>> `int boost::numeric::bindings::lapack::gesv(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> , boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )'
>>>ublas_lapack.cpp:14: instantiated from here
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/traits/matrix_traits.hpp:102:
>>> error: `size1' is not a member of
>>> `boost::numeric::bindings::traits::matrix_traits<
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> >
>>> >'
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:
>>>In
>>> function
>>> `int boost::numeric::bindings::lapack::gesv(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &, boost::numeric::bindings::traits::detail::array<int> &
>>> , boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )':
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:139:
>>> instantiated from
>>> `int boost::numeric::bindings::lapack::gesv(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> , boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )'
>>>ublas_lapack.cpp:14: instantiated from here
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:100:
>>> error: no type named `matrix_structure' in
>>> `boost::numeric::bindings::traits::matrix_traits<
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> >
>>> >'
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:100:
>>> error: size of array has non-integral type `<type error>'
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:104:
>>> error: no type named `matrix_structure' in
>>> `boost::numeric::bindings::traits::matrix_traits<
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> >
>>> >'
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:104:
>>> error: size of array has non-integral type `<type error>'
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:139:
>>> instantiated from
>>> `int boost::numeric::bindings::lapack::gesv(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> , boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )'
>>>ublas_lapack.cpp:14: instantiated from here
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:116:
>>> error: No match for
>>> `matrix_storage(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )'
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:139:
>>> instantiated from
>>> `int boost::numeric::bindings::lapack::gesv(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> , boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )'
>>>ublas_lapack.cpp:14: instantiated from here
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:116:
>>> error: No match for
>>> `matrix_storage(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )'
>>>/home/preben/working/boost-
>>> sandbox/boost/numeric/bindings/traits/matrix_traits.hpp: In function
>>> `int boost::numeric::bindings::traits::matrix_size2(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )':
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:111:
>>> instantiated from
>>> `int boost::numeric::bindings::lapack::gesv(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &, boost::numeric::bindings::traits::detail::array<int> &
>>> , boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )'
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:139:
>>> instantiated from
>>> `int boost::numeric::bindings::lapack::gesv(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> , boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )'
>>>ublas_lapack.cpp:14: instantiated from here
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/traits/matrix_traits.hpp:106:
>>> error: `size2' is not a member of
>>> `boost::numeric::bindings::traits::matrix_traits<
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> >
>>> >'
>>>/home/preben/working/boost-
>>> sandbox/boost/numeric/bindings/traits/matrix_traits.hpp: In function
>>> `int boost::numeric::bindings::traits::leading_dimension(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )':
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:116:
>>> instantiated from
>>> `int boost::numeric::bindings::lapack::gesv(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &, boost::numeric::bindings::traits::detail::array<int> &
>>> , boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )'
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/lapack/gesv.hpp:139:
>>> instantiated from
>>> `int boost::numeric::bindings::lapack::gesv(
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> , boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> > &
>>> )'
>>>ublas_lapack.cpp:14: instantiated from here
>>>/home/preben/working/boost-sandbox/boost/numeric/bindings/traits/matrix_traits.hpp:131:
>>> error: `leading_dimension' is not a member of
>>> `boost::numeric::bindings::traits::matrix_traits<
>>> boost::numeric::ublas::matrix<
>>> double, boost::numeric::ublas::column_major
>>> , boost::numeric::ublas::unbounded_array<double>
>>> >
>>> >'
>>>preben_at_thinkgen ~/working/master/src $
>>>---------
>>>
>>>It seems to me that the size1 and size2 isn't a member function? What
>>>the * is wrong here?
>>>
>>>
>>>I'm using the 1.33.1 version of boost (just from the gentoo ebuild).
>>>
>>>
>>>Thanks for helping!
>>>
>>>/ Preben
>>>_______________________________________________
>>>ublas mailing list
>>>ublas_at_[hidden]
>>>http://lists.boost.org/mailman/listinfo.cgi/ublas
>>>
>>>
>>>
>>>
>>Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>>_______________________________________________
>>ublas mailing list
>>ublas_at_[hidden]
>>http://lists.boost.org/mailman/listinfo.cgi/ublas
>>
>>
>>
>
>
>
>

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm