Re: [eigen] Is it really impossible to modify a column of a matrix with in function? |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Is it really impossible to modify a column of a matrix with in function?*From*: Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx>*Date*: Tue, 30 Aug 2011 12:35:15 +0200

On 30.08.2011 11:58, Helmut Jarausch wrote:

void set_Col(VectorXi& V) { V[0]=1; } int main() { MatrixXi A(2,3); A<< 1,2,3, 4,5,6; set_Col(A.col(1)); std::cout<< "A=\n"<< A<< std::endl; } It looks as if a column cannot be passed by a non-const reference. Why doesn't the col-method return a non-const reference for a non- const object (the col-method could be overloaded with/without the const attribute)?

Look here for details: http://eigen.tuxfamily.org/dox/TopicFunctionTakingEigenTypes.html#TopicPlainFunctionsFailing Christoph -- ---------------------------------------------- Dipl.-Inf. Christoph Hertzberg Cartesium 0.051 Universität Bremen Enrique-Schmidt-Straße 5 28359 Bremen Tel: (+49) 421-218-64252 ----------------------------------------------

**Follow-Ups**:**Re: [eigen] Is it really impossible to modify a column of a matrix with in function?***From:*Helmut Jarausch

**References**:**[eigen] Is it really impossible to modify a column of a matrix with in function?***From:*Helmut Jarausch

**Messages sorted by:**[ date | thread ]- Prev by Date:
**[eigen] Is it really impossible to modify a column of a matrix with in function?** - Next by Date:
**Re: [eigen] Is it really impossible to modify a column of a matrix with in function?** - Previous by thread:
**[eigen] Is it really impossible to modify a column of a matrix with in function?** - Next by thread:
**Re: [eigen] Is it really impossible to modify a column of a matrix with in function?**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |