Skip to content

Commit

Permalink
Standardise to use getManifold
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie committed Oct 12, 2023
1 parent bbed441 commit f9af5ce
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Factors/Circular.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function getSample(cf::CalcFactor{<:PriorCircular})
end

function (cf::CalcFactor{<:PriorCircular})(m, p)
M = cf.manifold # getManifold(cf.factor)
M = getManifold(cf)
Xc = vee(M, p, log(M, p, m))
return Xc
end
Expand Down
2 changes: 1 addition & 1 deletion src/Factors/GenericFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ DFG.getManifold(f::ManifoldPriorPartial) = f.M

function getSample(cf::CalcFactor{<:ManifoldPriorPartial})
Z = cf.factor.Z
M = cf.manifold # getManifold(cf.factor)
M = getManifold(cf)
partial = collect(cf.factor.partial)

return (samplePointPartial(M, Z, partial),)
Expand Down
4 changes: 2 additions & 2 deletions src/manifolds/services/ManifoldSampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ See also: [`getMeasurementParametric`](@ref)
function getSample end

function getSample(cf::CalcFactor{<:AbstractPrior})
M = cf.manifold # getManifold(cf.factor)
M = getManifold(cf)
if hasfield(typeof(cf.factor), :Z)
X = samplePoint(M, cf.factor.Z)
else
Expand All @@ -132,7 +132,7 @@ function getSample(cf::CalcFactor{<:AbstractPrior})
end

function getSample(cf::CalcFactor{<:AbstractRelative})
M = cf.manifold # getManifold(cf.factor)
M =getManifold(cf)
if hasfield(typeof(cf.factor), :Z)
X = sampleTangent(M, cf.factor.Z)
else
Expand Down
2 changes: 1 addition & 1 deletion src/services/CalcFactor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ end

# the same as legacy, getManifold(ccwl.usrfnc!)
getManifold(ccwl::CommonConvWrapper) = ccwl.manifold
getManifold(cf::CalcFactor) = cf.manifold
getManifold(cf::CalcFactor) = getManifold(cf.factor)

function _resizePointsVector!(
vecP::AbstractVector{P},
Expand Down

0 comments on commit f9af5ce

Please sign in to comment.