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

permute and reshape matab function in eigen

Tags: None
(comma "," separated)
kde-nicco
Registered Member
Posts
1
Karma
0
Hello !!

Are present in ' eigen ' the function permute and reshape like in MATLAB ?

PERMUTE Permute array dimensions.
B = PERMUTE(A,ORDER) rearranges the dimensions of A so that they
are in the order specified by the vector ORDER. The array produced
has the same values as A but the order of the subscripts needed to
access any particular element are rearranged as specified by ORDER.
For an N-D array A, numel(ORDER)>=ndims(A). All the elements of
ORDER must be unique.

RESHAPE Reshape array.
RESHAPE(X,M,N,P,...) returns an N-D array with the same
elements as X but reshaped to have the size M-by-N-by-P-by-...
M*N*P*... must be the same as PROD(SIZE(X)).

If it not exist in 'eigen' you can suggest me something ?

Thanks very much
jitseniesen
Registered Member
Posts
204
Karma
2
If I understand it correctly, the only thing you can do with PERMUTE with a matrix (2D array) is to transpose it, so you can use the transpose() and transposeInPlace() functions in Eigen. Higher-dimensional arrays (N greater than 2) are not supported in Eigen.

I think the equivalent of x = reshape(x,m,n) in matlab is x.conservativeResize(m,n) .


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]