Skip to content

Commit

Permalink
promote base points on new TVectors.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Dec 9, 2024
1 parent 2efe152 commit 161d00d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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.15.23]
## [0.15.23] 09/12/2024

### Added

Expand Down
18 changes: 6 additions & 12 deletions src/ValidationManifold.jl
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,9 @@ function embed(M::ValidationManifold, p, X; kwargs...)
is_vector(M, p, X; within = embed, context = (:Input,), kwargs...)
Y = embed(M.manifold, internal_value(p), internal_value(X))
MEV = ValidationManifold(get_embedding(M.manifold), M)
is_vector(
MEV,
embed(M.manifold, internal_value(p)),
Y;
within = embed,
context = (:Output,),
kwargs...,
)
return ValidationTVector(Y)
q = embed(M.manifold, internal_value(p))
is_vector(MEV, q, Y; within = embed, context = (:Output,), kwargs...)
return ValidationTVector(Y, M.store_base_point ? q : nothing)
end

function embed!(M::ValidationManifold, q, p; kwargs...)
Expand Down Expand Up @@ -372,7 +366,7 @@ function embed_project(M::ValidationManifold, p, X; kwargs...)
is_vector(M, p, X; within = embed, context = (:Input,), kwargs...)
Y = embed_project(M.manifold, internal_value(p), internal_value(X))
is_vector(M, p, Y; within = embed, context = (:Output,), kwargs...)
return ValidationTVector(Y)
return ValidationTVector(Y, M.store_base_point ? copy(M, p) : nothing)
end

function embed_project!(M::ValidationManifold, q, p; kwargs...)
Expand Down Expand Up @@ -657,7 +651,7 @@ function log(M::ValidationManifold, p, q; kwargs...)
is_point(M, q; within = log, context = (:Input,), kwargs...)
X = log(M.manifold, internal_value(p), internal_value(q))
is_vector(M, p, X; within = log, context = (:Output,), kwargs...)
return ValidationTVector(X)
return ValidationTVector(X, M.store_base_point ? copy(M, p) : nothing)
end

function log!(M::ValidationManifold, X, p, q; kwargs...)
Expand Down Expand Up @@ -729,7 +723,7 @@ function riemann_tensor(M::ValidationManifold, p, X, Y, Z; kwargs...)
internal_value(Z),
)
is_vector(M, p, W; within = riemann_tensor, context = (:Output,), kwargs...)
return ValidationTVector(W)
return ValidationTVector(W, M.store_base_point ? copy(M, p) : nothing)
end

function riemann_tensor!(M::ValidationManifold, W, p, X, Y, Z; kwargs...)
Expand Down

0 comments on commit 161d00d

Please sign in to comment.