You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@assertgetPointType(varType) != DataType "cannot add manifold point type $(getPointType(varType)), make sure the identity element argument in @defVariable $varType arguments is correct"
465
-
valpts=Vector{getPointType(varType)}(undef, N)
466
-
for i =1:length(valpts)
467
-
valpts[i] =getPointIdentity(varType)
466
+
val=Vector{getPointType(varType)}(undef, N)
467
+
for i =1:length(val)
468
+
val[i] =getPointIdentity(varType)
468
469
end
469
-
bws=zeros(dims, 1)
470
+
bw=zeros(dims, 1)
470
471
#
471
-
(valpts, bws)
472
+
(val, bw)
472
473
end
473
474
# make and set the new solverData
474
475
setSolverData!(
475
476
v,
476
-
VariableNodeData(
477
-
valpts,
478
-
bws,
479
-
Symbol[],
480
-
sp,
477
+
VariableNodeData(;
478
+
id=nothing,
479
+
val,
480
+
bw,
481
+
# Symbol[],
482
+
# sp,
481
483
dims,
482
-
false,
483
-
:_null,
484
-
Symbol[],
485
-
varType,
486
-
isinit,
487
-
zeros(getDimension(v)),
488
-
false,
484
+
#false,
485
+
#:_null,
486
+
#Symbol[],
487
+
variableType=varType,
488
+
initialized=isinit,
489
+
infoPerCoord=zeros(getDimension(v)),
490
+
ismargin=false,
489
491
dontmargin,
490
-
0,
491
-
0,
492
+
#0,
493
+
#0,
492
494
solveKey,
493
495
),
494
496
solveKey,
@@ -862,7 +864,7 @@ end
862
864
863
865
function DFG.addFactor!(
864
866
dfg::AbstractDFG,
865
-
xisyms::AbstractVector{Symbol},
867
+
vlbs::AbstractVector{Symbol},
866
868
usrfnc::AbstractFactor;
867
869
suppressChecks::Bool=false,
868
870
kw...,
@@ -871,11 +873,12 @@ function DFG.addFactor!(
871
873
872
874
# basic sanity check for unary vs n-ary
873
875
if!suppressChecks
874
-
_checkFactorAdd(usrfnc, xisyms)
876
+
_checkFactorAdd(usrfnc, vlbs)
877
+
@assertlength(vlbs) ==length(unique(vlbs)) "List of variables should be unique and ordered."
0 commit comments