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 1480 - Sparse routines do not properly support AD scalar types
Summary: Sparse routines do not properly support AD scalar types
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Feature Request
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-28 02:47 UTC by Brad Bell
Modified: 2017-10-28 02:47 UTC (History)
2 users (show)



Attachments
Demonstrates problem using eigens AutoDiffScalar type. (1.37 KB, text/x-c++src)
2017-10-28 02:47 UTC, Brad Bell
no flags Details

Description Brad Bell 2017-10-28 02:47:09 UTC
Created attachment 799 [details]
Demonstrates problem using eigens AutoDiffScalar type.

In some cases Eigen drops entires from a sparse matrix that have value zero. For  an example, see the attached program which demonstrates the problem using the unsupported AutoDiffScalar type.


In the context of AD, even though a value is zero, its derivative may be non-zero. CppAD has the notation of a value being identically zero, so that certain optimizations can be done in that case.

In the case where the scalar type was double, equal to zero and identically equal to zero would be the same, so any related optimizations would take place.

I would like to suggest that custom scalar type could define a function IdenticalZero(x) which would return true if the value is zero, and cannot changes in any way. Then Eigen would only drop entries that are Identicaly zero.

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