Boost logo

Boost Users :

From: speedsnaii speedsnaii_at_[hidden])
Date: 2003-02-26 11:01:14


This is an addendum to my previous post...

I looked into the bayesclasses as you were suggesting and as far as I
see the use of the uBLAS does something I was presuming before. There
is a local Vec and Matrix class which are defined as following:

==============================================================
class Vec: public ublas::vector<double>
{
...
    template <class E>
     Vec(const ublas::vector_expression<E>& e) : ublas::vector<double>
(e)
         {} // vector_expression conversion constructor
...
  template <class E>
    Vec& operator=(const ublas::vector_expression<E>& r)
     { // Expression assignment, may be dependant on r
         ublas::vector<double>::operator=(r);
         return *this;
     }
...
}
==============================================================

This essentially removes the expression information in the
assignment. Am I right? Now when defining
void foo(Vec& arg) {}
there is no passing of the expression tree to the function, since it
is converted to vector<double> when passed as an argument.
I presume this will create a temporary, won't it?

So I end up wondering whether it is a good idea to use
boost::multi_arry as a container and boost:numeric::matrix for
expression evaluation? Will it be easy to interface back and forth?
Or is this a completely odd idea?

Listening eagerly,
Roland


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net