This bugzilla service is closed. All entries have been migrated to
Bug 679 - Performing cwiseMax()/cwiseMin() on Map
Summary: Performing cwiseMax()/cwiseMin() on Map
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - expression templates (show other bugs)
Version: 3.2
Hardware: All All
: Normal Unknown
Assignee: Nobody
Depends on:
Reported: 2013-10-14 09:58 UTC by newstzpz
Modified: 2019-12-04 12:42 UTC (History)
3 users (show)


Description newstzpz 2013-10-14 09:58:13 UTC
The following code snippet will not compile since cc is a mapping.

std::vector<double> value(5, 0);
Eigen::Map<Eigen::VectorXd> cc(, value.size());
auto dd = cc.cwiseMax(3);
auto ee = cc.array().cwiseMax(3);

Other functions, like cwiseInverse(), cwiseAbs() work well.
Comment 1 Christoph Hertzberg 2013-10-15 19:14:31 UTC
I fixed this in the dev-branch:
A unit case for this would actually be nice (therefore I don't close it yet).
Comment 2 Gael Guennebaud 2013-10-16 00:17:14 UTC
unit test:
Changeset:   ab730abc5eae
User:        ggael
Date:        2013-10-15 23:51:01
Summary:     bug 679: add respective unit test

Both changesets have been backported to 3.2
Comment 3 Christoph Hertzberg 2013-10-16 10:00:15 UTC
The unit test still does not cover Maps or Blocks (or .transpose(), ...)
Comment 4 Gael Guennebaud 2013-10-16 11:19:04 UTC
we cannot test all operations with all possible expressions. The problem was that cwiseMin/Max worked only on Matrix or Array object. The new tests check for a more general expression that seems enough to me.
Comment 5 Nobody 2019-12-04 12:42:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance:

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