push_back in ublas

Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

push_back in ublas

Boost - uBLAS mailing list
Hi,

I've got another funky question for the group:
what does it mean to make a push_back in ublas?

For a ublas::vector, it seems pretty obvious. For a matrix? Or a tensor?
If I decide to represent all the vectors as matrices now, they become row and column vectors then.

Should I expect the same effect on doing a push_back to a row vector and a column vector?

In general, could we make ublas STL compatible in general (means vector/matrix/tensor are STL compatible)?
Does my question even make sense?

It's a open problem... I'm looking forward reading your comments.

Cheers,
David

_______________________________________________
ublas mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: push_back in ublas

Boost - uBLAS mailing list
Hi David,




David Bellot via ublas <[hidden email]> schrieb am Sa., 8. Juni 2019, 08:25:
Hi,

I've got another funky question for the group:
what does it mean to make a push_back in ublas?

 think push_back does only make sense for vectors. I would prefer a free fuction such as 'cat' that can operate also on tensors. 


For a ublas::vector, it seems pretty obvious. For a matrix? Or a tensor?
If I decide to represent all the vectors as matrices now, they become row and column vectors then.

Should I expect the same effect on doing a push_back to a row vector and a column vector?

In general, could we make ublas STL compatible in general (means vector/matrix/tensor are STL compatible)?
Does my question even make sense?


Makes totally sense. I have already sth prepared. We can do it very generic.


It's a open problem... I'm looking forward reading your comments.

Thanks David.

Cheers,
David
_______________________________________________
ublas mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]

_______________________________________________
ublas mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: push_back in ublas

Boost - uBLAS mailing list
 think push_back does only make sense for vectors. I would prefer a free fuction such as 'cat' that can operate also on tensors.

Being also an R programmer, I like the functional approach with free functions. It also makes sense from a template point of view.
It's indeed a 'cat' or 'c' we need. In R for example, you also have rbind and cbind for adding rows or columns to matrices/data.frame and 'c' for anything which looks like a vector. It's very convenient to use.

For a ublas::vector, it seems pretty obvious. For a matrix? Or a tensor?
If I decide to represent all the vectors as matrices now, they become row and column vectors then.

Should I expect the same effect on doing a push_back to a row vector and a column vector?

In general, could we make ublas STL compatible in general (means vector/matrix/tensor are STL compatible)?
Does my question even make sense?
 
Makes totally sense. I have already sth prepared. We can do it very generic.

Awesome. Could you create a branch in the git and push your code on that branch so that we can start playing with it/

Cheers,
David

_______________________________________________
ublas mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [hidden email]