New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 196 - Move all resize functionality to DenseBase
Summary: Move all resize functionality to DenseBase
Status: DECISIONNEEDED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: unspecified
Hardware: All All
: Normal API Change
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-24 15:34 UTC by Hauke Heibel
Modified: 2014-11-04 00:56 UTC (History)
3 users (show)



Attachments

Description Hauke Heibel 2011-02-24 15:34:46 UTC
Some resize functionality is currently located in PlainObjectBase. We should move that to DenseBase. 

The idea is to be able to write generic code and allow resizing on expressions. This would be a NOP in cases where the expressions already have the requested size.

We might want to discuss at some point whether it is the right approach to template over DenseBase<Derived> when an algorithm requires resizing.
Comment 1 Christoph Hertzberg 2014-11-03 15:46:13 UTC
Maybe I'm missing something, but DenseBase seems to have had resize functionality since its creation:
https://bitbucket.org/eigen/eigen/src/f6ccbdd635c0/Eigen/src/Core/DenseBase.h#cl-168
Comment 2 Christoph Hertzberg 2014-11-03 15:52:33 UTC
Ok, sorry for the hasty closing. I guess you intended to actually call
  derived()->resize(...) from DenseBase::resize(...)?
I'm not entirely against that, but we need to carefully avoid recursion where if Derived does not implement resize.
Comment 3 Gael Guennebaud 2014-11-04 00:56:42 UTC
I guess that the idea is rather to move the other variants of resize, i.e., the ones taking NoChange, conservativeResize, etc.

Note You need to log in before you can comment on or make changes to this bug.