Boost logo

Ublas :

From: Suneel Suresh (compressor_at_[hidden])
Date: 2006-08-22 22:17:44


hi gunter thanks for the response. i have never used boost so i am not
really sure what exactly is wrong. but i have managed to find out
exactly where the error occurs. When decalring an iterator for matrix
row the error appears.

eg:-

typedef matrix<T> Matrix;
typedef matrix_row<Matrix> Matrix_Row;
typedef matrix_column<Matrix> Matrix_Col;
// this line below wont compile
typename Matrix_Row::const_iterator ri_ite;

and the error is

error C2064: term does not evaluate to a function taking 0 arguments
1> D:\Program Files\Microsoft Visual Studio
8\VC\include\boost/numeric/ublas/matrix_proxy.hpp(260) : while
compiling class template member function
'boost::numeric::ublas::matrix_row<M>::const_iterator::const_iterator(const
std::iterator<_Category,_Ty> &)'
1> with
1> [
1> M=Matrix,
1> _Category=boost::numeric::ublas::dense_random_access_iterator_tag,
1> _Ty=float
1> ]
1> d:\graphics\research\temp\sigmatch_v2\ludecomposition.h(64)
: see reference to class template instantiation
'boost::numeric::ublas::matrix_row<M>::const_iterator' being compiled
1> with
1> [
1> M=Matrix
1> ]

regards
suneel

On 8/22/06, Gunter Winkler <guwi17_at_[hidden]> wrote:
> On Tuesday 22 August 2006 10:27, Suneel Suresh wrote:
> > hi
> > i am using a 3rd party program that does thin plate spline
> > morphing. this program is called TPS demo and can be searched from the
> > web. This program uses boost for LU solving. it was working fine with
> > VC 2003 , but now when i try to compile it with VC2005 i get the
> > following error
>
> Without a sample program that reproduces the error it is very hard to give any
> help. The general answer is: avoid the use of proxy classes because the life
> time is very short. E.g. all iterators of a sparse matrix become invalid if a
> single element is inserted.
>
> >
> > ERROR1
> > boost/numeric/ublas/matrix_proxy.hpp(261) : error C2064: term does not
> > evaluate to a function taking 0 arguments
> > 1> D:\Program Files\Microsoft Visual Studio
> > 8\VC\include\boost/numeric/ublas/matrix_proxy.hpp(260) : while
> > compiling class template member function
> > 'boost::numeric::ublas::matrix_row<M>::const_iterator::const_iterator(const
> > std::iterator<_Category,_Ty> &)'
>
> This may be a namespace problem because std::iterator<Cat,Type> should not
> appear as result of any ublas function, although it is the base class of
> random_access_iterator_base and similar.
>
> an alternative is to directly use ublas::lu_factorize(...) and
> ublas::lu_substitute(...).
>
> >
> > code where this problem occurs
> >
> > typename Matrix_Row::const_iterator ri_ite(LUrowi.begin());
> > typename Matrix_Col::const_iterator cj_ite( LUcolj.begin());
> >
> > ERROR2
> > include\boost/numeric/ublas/matrix_proxy.hpp(261) : error C2039: 'it_'
> >
> > : is not a member of 'std::iterator<_Category,_Ty>'
> >
> > Jason Zhang also got ERROR1 and has posted it under the subject
> > Compiling problem with uBlas using VC 2005. Any idea what i am
> > supposed to do cause i have never used boost.
>
>
> mfg
> Gunter
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>