This forum has been archived. All content is frozen. Please use KDE Discuss instead.

slicing matrix

Tags: None
(comma "," separated)
yaji
Registered Member
Posts
2
Karma
0
OS

slicing matrix

Sat Apr 30, 2011 1:46 am
Hi All

I'm in the process of evaluating which matrix library to use,
and I heard good things about Eigen.

However when I looked at the manual, I noticed that sub blocking in Eigen is pretty limited, which matters a quite a lot to me.
Is there a way to slice a matrix in particular rows and columns that is not continuous in Eigen?

(For those who know Boost uBlas, I'm looking for matrix_indirect type of function)

For example, given matrix as below I want to get a sub matrix of say columns 2 and 4 and rows 3 and 5 (index starts from 1)

From this
A=
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25

B=
12 14
22 24

I would like to get it with simple operation like:

B = A((2,4), (3,5))

Is there such a thing?
Thank you for your information in advance.

Cheers
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: slicing matrix

Sat Apr 30, 2011 2:06 am
No, there is no such thing at the moment.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
Zviri
Registered Member
Posts
1
Karma
0
OS

Re: slicing matrix

Sun May 01, 2011 4:48 pm
Hi,

I have exactly the same problem, I need to delete a set of rows and columns from a matrix, there really is no way how to do it?
I was messing arround with << and .col(), .row(), but this works only statically.

Thx


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora