Skip to content

Commit

Permalink
do not create a view on coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie committed Oct 16, 2023
1 parent 1bbb150 commit ba6f425
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/groups/special_euclidean.jl
Original file line number Diff line number Diff line change
Expand Up @@ -739,26 +739,27 @@ function get_vector(
basis::DefaultOrthogonalBasis,
)
return ArrayPartition(
get_vector(M.manifold.manifolds[1].manifold, p.x[1], view(c, 1:2), basis),
get_vector(M.manifold.manifolds[2].manifold, p.x[2], c[3], basis),
get_vector(M.manifold.manifolds[1].manifold, p.x[1], c[SOneTo(2)], basis),
get_vector(M.manifold.manifolds[2].manifold, p.x[2], c[SA[3]], basis),
)
end

function hat(M::SpecialEuclidean{3}, p::ArrayPartition, c)
M1, M2 = M.manifold.manifolds
return ArrayPartition(
get_vector_orthogonal(M1.manifold, p.x[1], view(c, 1:3), ℝ),
get_vector_orthogonal(M2.manifold, p.x[2], view(c, 4:6), ℝ),
get_vector_orthogonal(M1.manifold, p.x[1], c[SOneTo(3)], ℝ),
get_vector_orthogonal(M2.manifold, p.x[2], c[SA[4,5,6]], ℝ),

Check warning on line 751 in src/groups/special_euclidean.jl

View workflow job for this annotation

GitHub Actions / Format Check

[JuliaFormatter] reported by reviewdog 🐶 Raw Output: src/groups/special_euclidean.jl:751:- get_vector_orthogonal(M2.manifold, p.x[2], c[SA[4,5,6]], ℝ), src/groups/special_euclidean.jl:751:+ get_vector_orthogonal(M2.manifold, p.x[2], c[SA[4, 5, 6]], ℝ),
)
end
function get_vector(
M::SpecialEuclidean{3},
p::ArrayPartition,
Xc::AbstractVector,
c::AbstractVector,
basis::DefaultOrthogonalBasis,
)
return ArrayPartition(
get_vector(M.manifold.manifolds[1].manifold, p.x[1], view(Xc, 1:3), basis),
get_vector(M.manifold.manifolds[2].manifold, p.x[2], view(Xc, 4:6), basis),
get_vector(M.manifold.manifolds[1].manifold, p.x[1], c[SOneTo(3)], basis),
get_vector(M.manifold.manifolds[2].manifold, p.x[2], c[SA[4,5,6]], basis),

Check warning on line 762 in src/groups/special_euclidean.jl

View workflow job for this annotation

GitHub Actions / Format Check

[JuliaFormatter] reported by reviewdog 🐶 Raw Output: src/groups/special_euclidean.jl:762:- get_vector(M.manifold.manifolds[2].manifold, p.x[2], c[SA[4,5,6]], basis), src/groups/special_euclidean.jl:762:+ get_vector(M.manifold.manifolds[2].manifold, p.x[2], c[SA[4, 5, 6]], basis),
)
end
function compose(::SpecialEuclidean, p::ArrayPartition, q::ArrayPartition)
Expand Down

0 comments on commit ba6f425

Please sign in to comment.