boost::ublas toolkit

I have been working more and more with boost::ublas, so i created a toolkit
for it, you should be able to read/write vectors and matrices from/to property
files and you can access/manipulate them in your scripts.

It is not yet completely finished but maybe it can be a starter for others to
finish/polish it.

Ruben

Ruben Smits's picture

boost::ublas toolkit

On Monday 06 October 2008 16:17:21 Ruben Smits wrote:
> I have been working more and more with boost::ublas, so i created a toolkit
> for it, you should be able to read/write vectors and matrices from/to
> property files and you can access/manipulate them in your scripts.
>
> It is not yet completely finished but maybe it can be a starter for others
> to finish/polish it.

The composing/decomposing did not work yet ->fixed
The operator[] for ublas_vector wasn't enabled -> fixed
Constructor for ublas_matrix wasn't available -> fixed

See the attachments for the new version

In the attachements you can also find a resulting propertyfile: test.cpf

you can use the types ublas_vector and ublas_matrix in the
scripting/taskbrowser.

for the ublas_vector two constructors are available: ublas_vector(size) and
ublas_vector(size,value)

for the ublas_matrix only the constructor ublas_matrix(size1,size2) is
available.

I'm trying to get the operator[] with two arguments to work for the
ublas_matrix, i added all classes/functions to support ternary operations (see
attached rtt-ternary-operators.patch) but i cannot get the Parser to recognize
the expression, it keeps thinking it is the binary expression. If someone can
help me out on this one, that would be great.

Ruben

> Ruben

boost::ublas toolkit

On Tuesday 07 October 2008 13:37:51 Ruben Smits wrote:
> On Monday 06 October 2008 16:17:21 Ruben Smits wrote:
> > I have been working more and more with boost::ublas, so i created a
> > toolkit for it, you should be able to read/write vectors and matrices
> > from/to property files and you can access/manipulate them in your
> > scripts.
> >
> > It is not yet completely finished but maybe it can be a starter for
> > others to finish/polish it.
>
> The composing/decomposing did not work yet ->fixed
> The operator[] for ublas_vector wasn't enabled -> fixed
> Constructor for ublas_matrix wasn't available -> fixed
>
> See the attachments for the new version
>
> In the attachements you can also find a resulting propertyfile: test.cpf
>
> you can use the types ublas_vector and ublas_matrix in the
> scripting/taskbrowser.
>
> for the ublas_vector two constructors are available: ublas_vector(size) and
> ublas_vector(size,value)
>
> for the ublas_matrix only the constructor ublas_matrix(size1,size2) is
> available.
>
> I'm trying to get the operator[] with two arguments to work for the
> ublas_matrix, i added all classes/functions to support ternary operations
> (see attached rtt-ternary-operators.patch) but i cannot get the Parser to
> recognize the expression, it keeps thinking it is the binary expression.
> If someone can help me out on this one, that would be great.

It requires modification of the grammar in ExpressionParser.cpp. Submit it in
a bug report such that we can track this issue.

I would propose to add a 'toolkits' directory in the ocl tree such that
examples like these can be shared among users.

Peter

boost::ublas toolkit

Hi Ruben,

On Mon, Oct 6, 2008 at 4:17 PM, Ruben Smits
<ruben [dot] smits [..] ...> wrote:
> I have been working more and more with boost::ublas, so i created a toolkit
> for it, you should be able to read/write vectors and matrices from/to property
> files and you can access/manipulate them in your scripts.
>
> It is not yet completely finished but maybe it can be a starter for others to
> finish/polish it.

Seems a very useful feature to me. Maybe it's a good idea to provide
an example of a script and a property file too, along with the source
code?

Klaas