ENH: Array, OptimizerParameters constructors with size and initial value#2248
Conversation
Added explicit constructors to `Array` and `OptimizerParameters`, allowing to specify the size (dimension) and the initial value of each element. Both `std::vector` and `vnl_vector` have a similar constructor. Included a GoogleTest unit test for `OptimizerParameters`.
|
Thanks for your approval, Dženan! @thewtex Matt, do you think that this pull request could still be included with ITK 5.2? I think it's pretty simple enhancement, but it could certainly make the use of The pull request would allow, hopefully for ITK 5.2: |
|
This does not seem like a potentially problematic feature. #2246 might qualify for that. But we did not announce a feature freeze. If you are not going to request more reviews, you could merge this PR Niels. |
@dzenanz Thanks Dženan, could you please do the merge? I always prefer not to merge my own PRs, if possibly 😃 It looks nicer to me when there are two names with a commit (author + committer). |
Using the `OptimizerParameters(const SizeValueType dimension, const ValueType & value)` constructor, which was added to ITK with pull request InsightSoftwareConsortium/ITK#2248 commit InsightSoftwareConsortium/ITK@73ce4ca (merged on 11 January 2021).
Using the `OptimizerParameters(const SizeValueType dimension, const ValueType & value)` constructor, which was added to ITK with pull request InsightSoftwareConsortium/ITK#2248 commit InsightSoftwareConsortium/ITK@73ce4ca (merged on 11 January 2021).
Follow-up to pull request InsightSoftwareConsortium#2248 commit 73ce4ca "ENH: Array, OptimizerParameters constructors with size and initial value"
Follow-up to pull request InsightSoftwareConsortium#2248 commit 73ce4ca "ENH: Array, OptimizerParameters constructors with size and initial value"
Follow-up to pull request InsightSoftwareConsortium#2248 commit 73ce4ca "ENH: Array, OptimizerParameters constructors with size and initial value"
Follow-up to pull request InsightSoftwareConsortium#2248 commit 73ce4ca "ENH: Array, OptimizerParameters constructors with size and initial value"
Follow-up to pull request InsightSoftwareConsortium#2248 commit 73ce4ca "ENH: Array, OptimizerParameters constructors with size and initial value"
Added explicit constructors to
ArrayandOptimizerParameters, allowing to specify the size (dimension) and the initial value of each element.Both
std::vectorandvnl_vectorhave a similar constructor.Included a GoogleTest unit test for
OptimizerParameters.