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

eigen::matrix as reurn type inside a struct type function

Tags: eigen library, eigen library, eigen library eigen library, eigen library, eigen library eigen library, eigen library, eigen library
(comma "," separated)
kde-saeed
Registered Member
Posts
1
Karma
0
i want to write a function that returns
typedef eignen::Matrix<double,1,3>

while this function is of struct type, which has been defined already.

e.g :

struct foo {
double a,b,c;
double d,e,f;
}

foo FOO(){
typedef eigen::Matrix<double,1,3> foofoo;
foo f;
instruction .. that evaluates
f.1;
f.2;
f.3;

foofoo<< f.1, f.2,f.3;

return foofoo;
}

how do i define such a function, i am also unsure about defining the eigen::Matrix, is it
better to define it inside the struct or the function?


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell