Thank you for the answers VXL users ..
Hi Markus and users, I was just asking about the SVD because
at the beginning I thought that it behave like a normal
vnl_matrix. That you can declare it some where in your program
and use it when ever you want.
Something like:
vnl_matrix <double> A;
.....
.....
A.set_size(i,j);
A.clear();
But with the svd_matrix ....
But the other way works too ;)
Thanks you
On Wed, 20070221 at 12:34 +0100, Markus Moll wrote:
> Hi
>
> (Sorry Julio for receiving the mail twice, forgot to reply to the
> mailing list)
>
> On Wed, 20070221 at 11:59 +0100, Julio Pastrana wrote:
> > I am using the vnl_svd but when compile I get errors if I do the
> > following:
> >
> > when I declare an SVD matrix and after that make a call
> > to cunstruct the U,W,V matrix.
> > I mean this:
> >
> > vnl_svd<double> svdMatrix;
> > svdMatrix(A); // where a is a vnl_matrix
>
> Yes, that won't work. You cannot defer construction of a blockscope
> automatic object. Your problems appear to be closer related to C++
than
> to VXL.
>
> > I get Errors:
> > error: no matching function for call to
‘vnl_svd<double>::vnl_svd()’
> > /usr/local/include/vxl/core/vnl/algo/vnl_svd.h:193: note: candidates
> > are: vnl_svd<T>::vnl_svd(const vnl_svd<T>&) [with T = double]
> > /usr/local/include/vxl/core/vnl/algo/vnl_svd.h:83: note:
> > vnl_svd<T>::vnl_svd(const vnl_matrix<T>&, double) [with T = double]
>
> I.e., there is no defaultconstructor for vnl_svd<double>, you have
the
> choice between a copyconstructor and a constructor taking a matrix
and
> an optional double.
>
> > The only way to make it work is:
> >
> > vnl_svd<double> svdMatrix(A); // where a is a vnl_matrix
>
> Here you use the latter.
>
> >
> > or just
> >
> > vnl_svd<double> svdMatrix();
>
> Watch out, here you declare a function named svdMatrix. This is
probably
> not what you want.
>
> > My question is .... The call to the constructor has to be at the
same
> > time when declaring the svd_matrix?? is there a way to declare and
> > then solve?
>
> This sounds a bit confused. In C++, the constructor of an object with
> automatic storage duration is invoked when the object is defined.
> >From my understanding, vnl_svd is meant to be a decomposition of some
> matrix, so every vnl_svd object has to be initialized with some matrix
> in order to have a sane state. Maybe you could explain your problem?
>
> Regards
> Markus
>
