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

Hyperrectangle #720

Merged
merged 14 commits into from
Apr 22, 2024
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ jobs:
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./lcov.info
name: codecov-umbrella
fail_ci_if_error: false
if: ${{ matrix.os =='ubuntu-latest' }}
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.16] – unreleased
## [0.9.17] – unreleased

### Added

* `Hyperrectangle` manifold with boundary.

## [0.9.16] – 2024-04-01

### Changed

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Manifolds"
uuid = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e"
authors = ["Seth Axen <seth.axen@gmail.com>", "Mateusz Baran <mateuszbaran89@gmail.com>", "Ronny Bergmann <manopt@ronnybergmann.net>", "Antoine Levitt <antoine.levitt@gmail.com>"]
version = "0.9.16"
version = "0.9.17"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ makedocs(;
"Grassmann" => "manifolds/grassmann.md",
"Hamiltonian" => "manifolds/hamiltonian.md",
"Hyperbolic space" => "manifolds/hyperbolic.md",
"Hyperrectangle" => "manifolds/hyperrectangle.md",
"Lorentzian manifold" => "manifolds/lorentz.md",
"Multinomial doubly stochastic matrices" => "manifolds/multinomialdoublystochastic.md",
"Multinomial matrices" => "manifolds/multinomial.md",
Expand Down
3 changes: 1 addition & 2 deletions docs/src/manifolds/grassmann.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ Pages = ["manifolds/GrassmannProjector.jl"]
Order = [:type,:function]
```


## Literature

```@bibliography
Pages = ["grassmann.md"]
Canonical=false
```
```
20 changes: 20 additions & 0 deletions docs/src/manifolds/hyperrectangle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# [Hyperrectangle](@id HyperrectangleSection)

Hyperrectangle is a manifold with corners [Joyce:2010](@cite), and also a subset of the real [Euclidean](@ref Main.Manifolds.Euclidean) manifold.
It is useful for box-constrained optimization, for example it is implicitly used in the classic L-BFGS-B algorithm.

!!! note
This is a manifold with corners. Some parts of its interface specific to this property are experimental and may change without a breaking release.

```@autodocs
Modules = [Manifolds]
Pages = ["manifolds/Hyperrectangle.jl"]
Order = [:type,:function]
```

## Literature

```@bibliography
Pages = ["hyperrectangle.md"]
Canonical=false
```
9 changes: 9 additions & 0 deletions docs/src/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,15 @@ @article{JourneeBachAbsilSepulchre:2010
TITLE = {Low-Rank Optimization on the Cone of Positive Semidefinite Matrices},
JOURNAL = {SIAM Journal on Optimization}
}

@misc{Joyce:2010,
TITLE = {On manifolds with corners},
DOI = {10.48550/arXiv.0910.3518},
AUTHOR = {Joyce, Dominic},
YEAR = {2010},
EPRINT = {0910.3518},
EPRINTTYPE = {arXiv}
}
#
# K
# ----------------------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions src/Manifolds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ include("manifolds/FlagStiefel.jl")
include("manifolds/GeneralizedGrassmann.jl")
include("manifolds/GeneralizedStiefel.jl")
include("manifolds/Hyperbolic.jl")
include("manifolds/Hyperrectangle.jl")
include("manifolds/MultinomialDoublyStochastic.jl")
include("manifolds/MultinomialSymmetric.jl")
include("manifolds/MultinomialSymmetricPositiveDefinite.jl")
Expand Down Expand Up @@ -645,6 +646,7 @@ export Euclidean,
HamiltonianMatrices,
HeisenbergGroup,
Hyperbolic,
Hyperrectangle,
KendallsPreShapeSpace,
KendallsShapeSpace,
Lorentz,
Expand Down
11 changes: 5 additions & 6 deletions src/manifolds/Euclidean.jl
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ where ``I`` is the set of vectors ``k ∈ ℕ^i``, such that for all
For the special case of ``i ≤ 2``, i.e. matrices and vectors, this simplifies to

````math
g_p(X,Y) = X^{\mathrm{H}}Y,
g_p(X,Y) = \operatorname{tr}(X^{\mathrm{H}}Y),
````

where ``⋅^{\mathrm{H}}`` denotes the Hermitian, i.e. complex conjugate transposed.
Expand Down Expand Up @@ -745,7 +745,6 @@ end

Compute the Riemann tensor ``R(X,Y)Z`` at point `p` on [`Euclidean`](@ref) manifold `M`.
Its value is always the zero tangent vector.
````
"""
riemann_tensor(M::Euclidean, p, X, Y, Z)

Expand Down Expand Up @@ -894,13 +893,13 @@ Weingarten(::Euclidean, p, X, V)
Weingarten!(::Euclidean, Y, p, X, V) = fill!(Y, 0)

"""
zero_vector(M::Euclidean, x)
zero_vector(M::Euclidean, p)

Return the zero vector in the tangent space of `x` on the [`Euclidean`](@ref)
`M`, which here is just a zero filled array the same size as `x`.
Return the zero vector in the tangent space of `p` on the [`Euclidean`](@ref)
`M`, which here is just a zero filled array the same size as `p`.
"""
zero_vector(::Euclidean, ::Any...)
zero_vector(::Euclidean{TypeParameter{Tuple{}}}, p::Number) = zero(p)
zero_vector(::Euclidean{Tuple{}}, p::Number) = zero(p)

zero_vector!(::Euclidean, v, ::Any) = fill!(v, 0)
zero_vector!(::Euclidean, X, ::Any) = fill!(X, 0)
Loading
Loading