operator []

While trying to compile BFL using the debian package of newmat, I
encountered this error which running make check

make[4]: Entering directory
`/home/klaas/SVN/bfl-trunk/build-newmat-deb/src/pdf/test'
if g++ -DHAVE_CONFIG_H -I. -I../../../../src/pdf/test -I../../..
-I../../../../src -D __RNGWRAPPER_BOOST__ -I/usr/include -g -O2
-I/home/klaas/install/matrix-wrapper-newmat-deb//include/matrixwrapper
-D __MATRIXWRAPPER_NEWMAT__ -I/usr//include -MT test_gaussian.o -MD
-MP -MF ".deps/test_gaussian.Tpo" \
-c -o test_gaussian.o `test -f
'../../../../src/pdf/test/test_gaussian.cpp' || echo
'../../../../src/pdf/test/'`../../../../src/pdf/test/test_gaussian.cpp;
\
then mv -f ".deps/test_gaussian.Tpo" ".deps/test_gaussian.Po"; \
else rm -f ".deps/test_gaussian.Tpo"; exit 1; \
fi
../../../../src/pdf/test/test_gaussian.cpp: In function 'int main()':
../../../../src/pdf/test/test_gaussian.cpp:59: error: no match for
'operator[]' in 'mu[0]'
../../../../src/pdf/test/test_gaussian.cpp:59: error: no match for
'operator[]' in 'mu[1]'
../../../../src/pdf/test/test_gaussian.cpp:60: error: no match for
'operator[]' in 'sigma[rows]'
../../../../src/pdf/test/test_gaussian.cpp:68: error: no match for
'operator[]' in 'sigma2[rows]'
../../../../src/pdf/test/test_gaussian.cpp:69: error: no match for
'operator[]' in 'sigma2[0]'

Indeed, it appears that the operator[] has disappeared from the matrix
and vector wrapper classes?
I don't know yet why the error occurred only now (maybe because I used
the debian matrixwrapper package until now), but if the operator[] is
not defined in matrix and vector_wrapper.h, we shouldn't use it in
(portable) tests I guess...
So unless I forgot something, I consider this a bug.

regards,

Klaas
_______________________________________________
I hereby promise not to top-post on the
BFL mailing list
BFL [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/bfl

wmeeusse's picture

operator []

> Indeed, it appears that the operator[] has disappeared from the matrix
> and vector wrapper classes?
> I don't know yet why the error occurred only now (maybe because I used
> the debian matrixwrapper package until now), but if the operator[] is
> not defined in matrix and vector_wrapper.h, we shouldn't use it in
> (portable) tests I guess...
> So unless I forgot something, I consider this a bug.

This is already fixed in the experimental branch.

Wim

_______________________________________________
I hereby promise not to top-post on the
BFL mailing list
BFL [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/bfl

operator []

On 4/27/07, Wim meeussen <wim [dot] meeussen [..] ...> wrote:
> > Indeed, it appears that the operator[] has disappeared from the matrix
> > and vector wrapper classes?
> > I don't know yet why the error occurred only now (maybe because I used
> > the debian matrixwrapper package until now), but if the operator[] is
> > not defined in matrix and vector_wrapper.h, we shouldn't use it in
> > (portable) tests I guess...
> > So unless I forgot something, I consider this a bug.
>
> This is already fixed in the experimental branch.

patch, revision number?
_______________________________________________
I hereby promise not to top-post on the
BFL mailing list
BFL [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/bfl

wmeeusse's picture

operator []

On Saturday 28 April 2007 10:56:06 Klaas Gadeyne wrote:
> On 4/27/07, Wim meeussen <wim [dot] meeussen [..] ...> wrote:
> > > Indeed, it appears that the operator[] has disappeared from the matrix
> > > and vector wrapper classes?

AFAIK the operator [] disappeared from the matrix wrapper a few years ago.

> > > I don't know yet why the error occurred only now

I suspect a change in the Newmat Debian package.

> > > but if the operator[] is
> > > not defined in matrix and vector_wrapper.h, we shouldn't use it in
> > > (portable) tests I guess...
> > > So unless I forgot something, I consider this a bug.

> > This is already fixed in the experimental branch.

> patch, revision number?

One of the lasts commits on the experimental branch. The log message will help
you to locate it.

As the proting to cmake in the experimental branch is finished, and everything
seems to work very well now, I would like to make this branch the trunk in
the near future. So now is a good time to try out the experimental branch and
give comments/feedback. I tested everything with newmat/lti/boost/ginac.

Wim
_______________________________________________
I hereby promise not to top-post on the
BFL mailing list
BFL [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/bfl