Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding jprod_residual! and jtprod_residual! #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AntoninKns
Copy link
Member

Adding a workaround of jprod_residual! and jtprod_residual! in order for BundleAdjustmentModels to work better with other packages from JSO. The true detailed version of jprod_residual! and jtprod_residual! should be added later in order to avoid allocations and have better performance for these functions.

@codecov
Copy link

codecov bot commented Jul 11, 2022

Codecov Report

Merging #64 (13fd79f) into main (aec61a2) will increase coverage by 0.44%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
+ Coverage   92.20%   92.65%   +0.44%     
==========================================
  Files           5        5              
  Lines         295      313      +18     
==========================================
+ Hits          272      290      +18     
  Misses         23       23              
Impacted Files Coverage Δ
src/BundleAdjustmentNLSFunctions.jl 96.80% <100.00%> (+0.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aec61a2...13fd79f. Read the comment docs.

@AntoninKns AntoninKns requested review from dpo and tmigot July 11, 2022 22:07
@dpo
Copy link
Member

dpo commented Jul 11, 2022

I don't think this is a good idea. This is going to be so much slower than what you have now.

@AntoninKns
Copy link
Member Author

@tmigot asked me to add them in case these functions are called by other JSO packages at least it won't crash. I'll let him correct me, I might not have understood the reasons well.

@AntoninKns
Copy link
Member Author

If you think it's worth the time I can directly implement the jprod_residual! and jtprod_residual! manually based on the jacobian description.

@tmigot
Copy link
Member

tmigot commented Jul 11, 2022

I asked Antonin this, so that we can use the package. I get that this is a very basic version (and not efficient), but we can improve it later when Antonin is further advanced with his project.

Copy link
Member

@dpo dpo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's at least have a caching system for the Jacobian: only evaluate it if x changes. You should be able to compute the shasum of x and compare that instead of checking each component, and only be wrong with probability ε.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants