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

Use sectional_curvature from ManifoldsBase #365

Merged
merged 8 commits into from
Mar 15, 2024

Conversation

mateuszbaran
Copy link
Member

Ideally it should use sectional_curvature_max but it's not generally implemented in Manifolds.jl yet.

I've also removed the unused k_min keyword argument.

@mateuszbaran mateuszbaran added the Ready-for-Review A label for pull requests that are feature-ready label Mar 14, 2024
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.73%. Comparing base (15194b0) to head (94122a8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #365      +/-   ##
==========================================
- Coverage   99.73%   99.73%   -0.01%     
==========================================
  Files          73       73              
  Lines        6822     6819       -3     
==========================================
- Hits         6804     6801       -3     
  Misses         18       18              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mateuszbaran
Copy link
Member Author

Documenter.jl thinks ManifoldsBase.jl 0.15.8 doesn't exist but CI tests use it without issue... weird.

@kellertuer
Copy link
Member

Maybe the docs need a small bump? But I wanted to check real quick the interlinks anyways, now that ManifoldsBase has run on Documenter 1.3 and has a first such index to use for the inter-docs :)

@kellertuer
Copy link
Member

This looks good to me. Maybe we can check whether the docs are ok when merged with #366 .

Changelog.md Outdated Show resolved Hide resolved
Copy link
Member

@kellertuer kellertuer left a comment

Choose a reason for hiding this comment

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

@hajg-ijk do you maybe want to take a look as well?

@hajg-ijk
Copy link
Member

Looks good to me, too.
The only note here is that ζ_1 (which is not used anywhere at the moment) in theory takes in the lower bound on the curvature k_min as an input.

@mateuszbaran
Copy link
Member Author

Now we have a different error:

┌ Error: On "src/solvers/convex_bundle_method.md", cannot resolve external link: Cannot find "`ManifoldsBase.sectional_curvature`" in any InterLinks inventory: ["ManifoldsBase"]
│   node =
│    @ast MarkdownAST.Link("@extref", "") do
│      MarkdownAST.Code("ManifoldsBase.sectional_curvature")
│    end
│    
└ @ DocumenterInterLinks ~/.julia/packages/DocumenterInterLinks/jzyZp/src/expand_extrefs.jl:93

I thought that would work, like https://github.com/JuliaManifolds/Manopt.jl/pull/366/files#diff-6b82ea9e272b78f9938c76cb57acca981b149e4c4a319e5be73944701d1d693bR29 ?

at least when the function does not have a unique signature.
@kellertuer
Copy link
Member

Had to take a look, the main problem is, that the method has 3 signatures (abstract manifold, power, product) so you have to specify the signature. That is what I fixed in my commit.

Might look a bit complicated, but I also have no idea how InterLink could make that better.

@kellertuer
Copy link
Member

In other places I do not use the ManifoldsBase prefix in the link text – should we keep that here, what do you think?

@mateuszbaran
Copy link
Member Author

I see, it's different for types and methods. I think we can remove the prefix then.

@kellertuer
Copy link
Member

kellertuer commented Mar 15, 2024

One tipp that Michael also gave is, to using DocumenterInterLinks and then load the

links = InterLinks(
    "ManifoldsBase" => ("https://juliamanifolds.github.io/ManifoldsBase.jl/stable/")
)

then you can query

julia> links["ManifoldsBase"]("sectional_curvature-")
3-element Vector{DocInventories.InventoryItem}:
 InventoryItem(":jl:method:`ManifoldsBase.sectional_curvature-Tuple{AbstractManifold, Any, Any, Any}`" => "functions/#ManifoldsBase.sectional_curvature-Tuple%7BAbstractManifold%2C%20Any%2C%20Any%2C%20Any%7D")
 InventoryItem(":jl:method:`ManifoldsBase.sectional_curvature-Tuple{AbstractPowerManifold, Any, Any, Any}`" => "metamanifolds/#ManifoldsBase.sectional_curvature-Tuple%7BAbstractPowerManifold%2C%20Any%2C%20Any%2C%20Any%7D")
 InventoryItem(":jl:method:`ManifoldsBase.sectional_curvature-Tuple{ProductManifold, Any, Any, Any}`" => "metamanifolds/#ManifoldsBase.sectional_curvature-Tuple%7BProductManifold%2C%20Any%2C%20Any%2C%20Any%7D")

and everything after the method: is what you copy (you might guess this can also indicate types or sections or such)

@mateuszbaran
Copy link
Member Author

Thanks, that's a good tip.

@kellertuer
Copy link
Member

I see, it's different for types and methods.

Yes, since types are uniquely identified by their name, methods need the full signature with parameters, but then the list from above is helpful.

@mateuszbaran mateuszbaran merged commit 9b34085 into master Mar 15, 2024
15 checks passed
@kellertuer kellertuer deleted the mbaran/base-sectional-curvature branch May 4, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready-for-Review A label for pull requests that are feature-ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants