This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1487 - cwise Operations
Summary: cwise Operations
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Documentation
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-16 11:13 UTC by Timo Sachsenberg
Modified: 2019-12-04 17:17 UTC (History)
2 users (show)



Attachments

Description Timo Sachsenberg 2017-11-16 11:13:13 UTC
Hi,
I love the tables that show what/how operations can be performed on matrices and vectors. Unfortunately, documentation falls a bit short for sparse matrices and sparse vectors. Assuming that most of you guys probably spend their precious time working on other topics I think it would still make a great difference to provide such a table on e.g.: https://eigen.tuxfamily.org/dox/group__TutorialSparse.html

I had some troubles (and still don't fully understand) why:
(sv1 - sv2).cwiseAbs() or sv1.sum() works but e.g.:
sv1.cwiseMin(1.0) doesn't (requires sv1.coeffs().cwiseMin(1.0))

I also quite often run into errors like:
error: ‘const CwiseAbsReturnType’ has no member named ‘coeffs’
float sum = (sv1 - sv2).cwiseAbs().coeffs().cwiseMax(0).sum();

or error: ‘Constant’ is not a member of ‘Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, const Eigen::SparseVector<float> >’
float sum = sv1.cwiseAbs().cwiseMax(0).sum();

while: float sum = sv1.coeffs().cwiseMax(0).sum(); compiles

I guess these are probably newbie errors but I thought it might be worth to give feedback and some hints where the documentation could be improved,
Timo
Comment 1 Nobody 2019-12-04 17:17:30 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com'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: https://gitlab.com/libeigen/eigen/issues/1487.

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