Opened 16 years ago

Closed 13 years ago

#169 closed discussion (wontfix)

Use MTL for Vector and Matrix

Reported by: Jari Häkkinen Owned by: Jari Häkkinen
Priority: major Milestone:
Component: utility Version: trunk
Keywords: Cc:

Description (last modified by Jari Häkkinen)

Check what boost offers. Boost will offer Matrix Template Library, MTL,

What is the reason for doing this transition? One reason is that the vector (and maybe matrix) could be used in STL algorithms. There are problems though, how to treat strides!=1 and views? How to implement iterators for matrix? What is the reason for STL not to include std::matrix and std::tensor? Is it a problem of iterators?

This issue needs to be seriously thought over and a specification must be written before rewriting matrix and vector.

Change History (6)

comment:1 Changed 15 years ago by Jari Häkkinen

Description: modified (diff)
Type: enhancementspecification

comment:2 Changed 15 years ago by Jari Häkkinen

Type: specificationdiscussion

comment:3 Changed 15 years ago by Peter

I don't think this a good idea. The reason? The stride!=1 mentioned above makes the iterator (vector::iterator) not behaving as expected. Also the offset variable in gsl_vector is a problem.

So instead of storing the data in std::vector in order to get an iterator for free, I suggest that we implement an iterator for the vector class. This would connect the vector class to STL in a nice way and allow users to emply STLs algorithms together with the yat::vector.

A bonus thing is that we could make the sort function work properly by using std::sort instead GSLs sort (which does not handle ints).

comment:4 Changed 15 years ago by Jari Häkkinen

Description: modified (diff)

There is a branch for MTL testing, source:/branches/mtl-test

comment:5 Changed 14 years ago by Peter

Summary: Use standard containers as underlying data structures for matrix and vectorUse MTL for Vector and Matrix

comment:6 Changed 13 years ago by Jari Häkkinen

Milestone: yat 0.x+
Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.