@@ -102,7 +102,8 @@ function addEntropyOnManifold!(
102
102
# preallocate
103
103
T = number_eltype (points[1 ])
104
104
Xc = zeros (T, manifold_dimension (M))
105
- X = get_vector (M, points[1 ], Xc, DefaultOrthogonalBasis ())
105
+ # allocate to change SMatrix to MMatrix
106
+ X = allocate (get_vector (M, points[1 ], Xc, DefaultOrthogonalBasis ()))
106
107
107
108
for idx = 1 : length (points)
108
109
# build tangent coordinate random
@@ -115,8 +116,8 @@ function addEntropyOnManifold!(
115
116
get_vector! (M, X, points[idx], Xc, DefaultOrthogonalBasis ())
116
117
# update point
117
118
# exp!(M, points[idx], points[idx], X)
118
- retract! (M, points[idx], points[idx], X)
119
- # points[idx] = exp (M, points[idx], X)
119
+ # retract!(M, points[idx], points[idx], X)
120
+ points[idx] = retract (M, points[idx], X)
120
121
121
122
end
122
123
#
@@ -369,6 +370,16 @@ function evalPotentialSpecific(
369
370
return ccwl. varValsAll[ccwl. varidx[]], ipc
370
371
end
371
372
373
+
374
+ # TODO workaround for supporting bitstypes, need rewrite, can do with `PowerManifoldNestedReplacing` or similar
375
+ function AMP. setPointsMani! (dest:: AbstractArray{T} , src:: AbstractArray{U} , destIdx, srcIdx= destIdx) where {T<: AbstractArray ,U<: AbstractArray }
376
+ if isbitstype (T)
377
+ dest[destIdx] = src[srcIdx]
378
+ else
379
+ setPointsMani! (dest[destIdx],src[srcIdx])
380
+ end
381
+ end
382
+
372
383
# TODO `measurement` might not be properly wired up yet
373
384
# TODO consider 1051 here to inflate proposals as general behaviour
374
385
function evalPotentialSpecific (
@@ -436,7 +447,7 @@ function evalPotentialSpecific(
436
447
for m in (1 : length (addEntr))[ahmask]
437
448
# FIXME , selection for all measurement::Tuple elements
438
449
# @info "check broadcast" ccwl.usrfnc! addEntr[m] ccwl.measurement[1][m]
439
- setPointsMani! (addEntr[m] , ccwl. measurement[m] )
450
+ setPointsMani! (addEntr, ccwl. measurement, m )
440
451
# addEntr[m] = ccwl.measurement[m][1]
441
452
end
442
453
# ongoing part of RoME.jl #244
0 commit comments