Re: [eigen] Value-initializing a Matrix |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Value-initializing a Matrix*From*: gabriel nützi <gnuetzi@xxxxxxxxx>*Date*: Sun, 19 Apr 2015 22:21:12 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=p8mMh0MgwxDVpA0hpYv2TxKoDNr4hfCMgBS22H/AnUs=; b=F972lvUDoJWM/QPnG6mIA8eXpTjzG7dNBhhc87YaxETd7k38q4d/cYq0p8iYShPPRI XOqLiE4v67tn5INmFQO88B1xWdEOVDtEN5Z/5rKNjJgvvr711D4H2MHhp3W3g4eDovcv L1wXzUxxIKz/38Lz4TAc65t4N3y+WlAtEzxP7ks/LhsQ6oskQ6RczIKQot0owWeEbH7j 8R58ILUsIPGbfEor2iTtH51hIFbxjrdWbGfLJs8ou4f/273oI7i8T8Oppaze7siTaHS8 dQTGYMEsUsWwDkOZCc/bfT9mtxNfuxFBI8yA9c1gfdPm7BwxGDENGXjAWqrnYFZyrDBj oVFQ==

I dont get your code?: Do you mean this: struct foo { foo() : v{} private: Eigen::Vector2d v; }; or struct foo { foo() : v() private: Eigen::Vector2d v; }; I think Eigen should support value initialization ( although its tricky business and I am not quite sure about all the different initialization, “default”, “value”, “zero”) I think Eigen3 should (at least in the next release ) include the c++11 conformance with value initialization such that v{} get initialized properly (that means to zero) and any default-initialization should result in undetermined values . Anyway how can we distinguish in C++ between MatrixXd M; < default-initialization -> uninitialized MatrixXd M{}; < value-initialized -> zero initialized What would need to be done to distinguish these two cases? Am 19.04.2015 um 00:44 schrieb Matan Nassau <matan.nassau@xxxxxxxxx>: To be clear, my question stands still whether the code is |

**Follow-Ups**:**Re: [eigen] Value-initializing a Matrix***From:*Billy Araujo

**References**:**[eigen] Value-initializing a Matring***From:*Matan Nassau

**Re: [eigen] Value-initializing a Matring***From:*Gael Guennebaud

**Re: [eigen] Value-initializing a Matring***From:*Matan Nassau

**Re: [eigen] Value-initializing a Matring***From:*Matan Nassau

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Value-initializing a Matring** - Next by Date:
**Re: [eigen] Value-initializing a Matrix** - Previous by thread:
**Re: [eigen] Value-initializing a Matring** - Next by thread:
**Re: [eigen] Value-initializing a Matrix**

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