Skip to content

Commit 95e53d4

Browse files
committed
missed AbsRelRoots
1 parent a204368 commit 95e53d4

File tree

4 files changed

+40
-42
lines changed

4 files changed

+40
-42
lines changed

src/Deprecated.jl

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -124,22 +124,46 @@ end
124124
## Deprecate code below before v0.35
125125
##==============================================================================
126126

127-
function _checkErrorCCWNumerics(
128-
ccwl::Union{CommonConvWrapper{F}, CommonConvWrapper{Mixture{N_, F, S, T}}},
129-
testshuffle::Bool = false,
130-
) where {N_, F <: AbstractRelativeRoots, S, T}
131-
#
132-
# error("<:AbstractRelativeRoots is obsolete, use one of the other <:AbstractRelative types instead.")
133-
# TODO get xDim = getDimension(getVariableType(Xi[sfidx])) but without having Xi
134-
if testshuffle || ccwl.partial
135-
error(
136-
"<:AbstractRelativeRoots factors with less or more measurement dimensions than variable dimensions have been discontinued, rather use <:AbstractManifoldMinimize.",
137-
)
138-
# elseif !(_getZDim(ccwl) >= ccwl.xDim && !ccwl.partial)
139-
# error("Unresolved numeric <:AbstractRelativeRoots solve case")
140-
end
141-
return nothing
142-
end
127+
# function _perturbIfNecessary(
128+
# fcttype::Union{F, <:Mixture{N_, F, S, T}},
129+
# len::Int = 1,
130+
# perturbation::Real = 1e-10,
131+
# ) where {N_, F <: AbstractRelativeRoots, S, T}
132+
# return perturbation * randn(len)
133+
# end
134+
135+
# function _checkErrorCCWNumerics(
136+
# ccwl::Union{CommonConvWrapper{F}, CommonConvWrapper{Mixture{N_, F, S, T}}},
137+
# testshuffle::Bool = false,
138+
# ) where {N_, F <: AbstractRelativeRoots, S, T}
139+
# #
140+
# # error("<:AbstractRelativeRoots is obsolete, use one of the other <:AbstractRelative types instead.")
141+
# # TODO get xDim = getDimension(getVariableType(Xi[sfidx])) but without having Xi
142+
# if testshuffle || ccwl.partial
143+
# error(
144+
# "<:AbstractRelativeRoots factors with less or more measurement dimensions than variable dimensions have been discontinued, rather use <:AbstractManifoldMinimize.",
145+
# )
146+
# # elseif !(_getZDim(ccwl) >= ccwl.xDim && !ccwl.partial)
147+
# # error("Unresolved numeric <:AbstractRelativeRoots solve case")
148+
# end
149+
# return nothing
150+
# end
151+
152+
# function _solveLambdaNumeric(
153+
# fcttype::Union{F, <:Mixture{N_, F, S, T}},
154+
# objResX::Function,
155+
# residual::AbstractVector{<:Real},
156+
# u0::AbstractVector{<:Real},
157+
# islen1::Bool = false,
158+
# ) where {N_, F <: AbstractRelativeRoots, S, T}
159+
# #
160+
161+
# #
162+
# r = NLsolve.nlsolve((res, x) -> res .= objResX(x), u0; inplace = true) #, ftol=1e-14)
163+
164+
# #
165+
# return r.zero
166+
# end
143167

144168
# should probably deprecate the abstract type approach?
145169
abstract type _AbstractThreadModel end
@@ -154,22 +178,6 @@ struct SingleThreaded <: _AbstractThreadModel end
154178
# struct MultiThreaded <: _AbstractThreadModel end
155179

156180

157-
function _solveLambdaNumeric(
158-
fcttype::Union{F, <:Mixture{N_, F, S, T}},
159-
objResX::Function,
160-
residual::AbstractVector{<:Real},
161-
u0::AbstractVector{<:Real},
162-
islen1::Bool = false,
163-
) where {N_, F <: AbstractRelativeRoots, S, T}
164-
#
165-
166-
#
167-
r = NLsolve.nlsolve((res, x) -> res .= objResX(x), u0; inplace = true) #, ftol=1e-14)
168-
169-
#
170-
return r.zero
171-
end
172-
173181
##==============================================================================
174182
## Deprecate code below before v0.35
175183
##==============================================================================

src/services/CalcFactor.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ function _setCCWDecisionDimsConv!(
294294
F <: Union{
295295
AbstractManifoldMinimize,
296296
AbstractRelativeMinimize,
297-
# AbstractRelativeRoots,
298297
AbstractPrior,
299298
},
300299
S,

src/services/FactorGradients.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ end
171171
function FactorGradientsCached!(
172172
fct::Union{
173173
<:AbstractRelativeMinimize,
174-
# <:AbstractRelativeRoots,
175174
<:AbstractManifoldMinimize,
176175
},
177176
varTypes::Tuple,

src/services/NumericalCalculations.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ function _perturbIfNecessary(
3131
end
3232
#
3333

34-
function _perturbIfNecessary(
35-
fcttype::Union{F, <:Mixture{N_, F, S, T}},
36-
len::Int = 1,
37-
perturbation::Real = 1e-10,
38-
) where {N_, F <: AbstractRelativeRoots, S, T}
39-
return perturbation * randn(len)
40-
end
41-
#
4234

4335
# internal use only, and selected out from approxDeconv functions
4436
function _solveLambdaNumeric(

0 commit comments

Comments
 (0)