Skip to content

Commit c8bdce8

Browse files
committed
mini cleanup
1 parent 574c11b commit c8bdce8

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/services/CalcFactor.jl

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ DevNotes
1919
- TODO only works on `.threadid()==1` at present, see #1094
2020
- Also see, JuliaRobotics/RoME.jl#465
2121
"""
22-
function sampleFactor(cf::CalcFactor{<:AbstractFactor},
23-
N::Int=1 )
24-
#
25-
getSample(cf, N)
26-
end
22+
sampleFactor(cf::CalcFactor{<:AbstractFactor}, N::Int=1 ) = getSample(cf, N)
2723

2824

2925

@@ -71,9 +67,6 @@ Notes
7167
- Binary factors only at this stage, and `multihypo` does not have to be considered in this test
7268
- Assumes calculation is for a single particle, so `meas::Tuple{Z,other}` is only a single particles value.
7369
74-
DevNotes
75-
- TODO generalize for n-ary factors
76-
7770
Example
7871
```julia
7972
residual = calcFactorResidualTemporary(Pose2Pose2(...), (RoME.Pose2,RoME.Pose2), (z_i,), (x1, x2))
@@ -99,9 +92,8 @@ function calcFactorResidualTemporary( fct::AbstractRelative,
9992
measurement
10093
else
10194
# now use the CommonConvWrapper object in `_dfgfct`
102-
ccw = IIF._getCCW(_dfgfct)
103-
cfo = CalcFactor(ccw)
104-
getSample(cfo, 1)
95+
cfo = CalcFactor(_getCCW(_dfgfct))
96+
sampleFactor(cfo, 1)
10597
end
10698

10799
# assume a single sample point is being run

0 commit comments

Comments
 (0)