@@ -135,65 +135,141 @@ end
135
135
# # Deprecated in v0.11 Remove in the v0.12 cycle
136
136
# #==============================================================================
137
137
138
- # @warn("BREAKING CHANGE coming to DistributedFactorGraphs v0.12: deprecating AbstractRelativeFactor, use AbstractRelativeRoots instead")
139
- # @warn("BREAKING CHANGE coming to DistributedFactorGraphs v0.12: deprecating AbstractRelativeFactorMinimize, use AbstractRelativeMinimize instead")
140
- # export AbstractRelativeFactor, AbstractRelativeFactorMinimize
141
- const AbstractRelativeFactor = AbstractRelativeRoots
142
- const AbstractRelativeFactorMinimize = AbstractRelativeMinimize
143
-
144
- # #-------------------------------------------------------------------------------
145
- # # softtype -> variableType deprecation
146
- # #-------------------------------------------------------------------------------
147
-
148
- function Base. getproperty (x:: VariableNodeData ,f:: Symbol )
149
- if f == :softtype
150
- Base. depwarn (" `VariableNodeData` field `softtype` is deprecated, use `variableType`" , :getproperty )
151
- f = :variableType
138
+ # # @warn("BREAKING CHANGE coming to DistributedFactorGraphs v0.12: deprecating AbstractRelativeFactor, use AbstractRelativeRoots instead")
139
+ # # @warn("BREAKING CHANGE coming to DistributedFactorGraphs v0.12: deprecating AbstractRelativeFactorMinimize, use AbstractRelativeMinimize instead")
140
+ # # export AbstractRelativeFactor, AbstractRelativeFactorMinimize
141
+ # const AbstractRelativeFactor = AbstractRelativeRoots
142
+ # const AbstractRelativeFactorMinimize = AbstractRelativeMinimize
143
+
144
+ # ##-------------------------------------------------------------------------------
145
+ # ## softtype -> variableType deprecation
146
+ # ##-------------------------------------------------------------------------------
147
+
148
+ # function Base.getproperty(x::VariableNodeData,f::Symbol)
149
+ # if f == :softtype
150
+ # Base.depwarn("`VariableNodeData` field `softtype` is deprecated, use `variableType`", :getproperty)
151
+ # f = :variableType
152
+ # end
153
+ # getfield(x,f)
154
+ # end
155
+
156
+ # function Base.setproperty!(x::VariableNodeData, f::Symbol, val)
157
+ # if f == :softtype
158
+ # Base.depwarn("`VariableNodeData` field `softtype` is deprecated, use `variableType`", :getproperty)
159
+ # f = :variableType
160
+ # end
161
+ # return setfield!(x, f, convert(fieldtype(typeof(x), f), val))
162
+ # end
163
+
164
+
165
+ # function Base.getproperty(x::PackedVariableNodeData,f::Symbol)
166
+ # if f == :softtype
167
+ # Base.depwarn("`PackedVariableNodeData` field `softtype` is deprecated, use `variableType`", :getproperty)
168
+ # f = :variableType
169
+ # end
170
+ # getfield(x,f)
171
+ # end
172
+
173
+ # function Base.setproperty!(x::PackedVariableNodeData, f::Symbol, val)
174
+ # if f == :softtype
175
+ # Base.depwarn("`PackedVariableNodeData` field `softtype` is deprecated, use `variableType`", :getproperty)
176
+ # f = :variableType
177
+ # end
178
+ # return setfield!(x, f, convert(fieldtype(typeof(x), f), val))
179
+ # end
180
+
181
+
182
+ # function Base.getproperty(x::DFGVariableSummary,f::Symbol)
183
+ # if f == :softtypename
184
+ # Base.depwarn("`DFGVariableSummary` field `softtypename` is deprecated, use `variableTypeName`", :getproperty)
185
+ # f = :variableTypeName
186
+ # end
187
+ # getfield(x,f)
188
+ # end
189
+
190
+ # function Base.setproperty!(x::DFGVariableSummary, f::Symbol, val)
191
+ # if f == :softtypename
192
+ # Base.depwarn("`DFGVariableSummary` field `softtypename` is deprecated, use `variableTypeName`", :getproperty)
193
+ # f = :variableTypeName
194
+ # end
195
+ # return setfield!(x, f, convert(fieldtype(typeof(x), f), val))
196
+ # end
197
+
198
+ # @deprecate getSofttype(args...) getVariableType(args...)
199
+ # @deprecate getSofttypename(args...) getVariableTypeName(args...)
200
+
201
+
202
+ # # ================================================================================
203
+ # # Deprecate before v0.17
204
+ # #=================================================================================
205
+
206
+
207
+ Base. propertynames (x:: VariableNodeData , private:: Bool = false ) = private ? (:inferdim , :infoPerCoord ) : (:infoPerCoord ,)
208
+
209
+ Base. getproperty (x:: VariableNodeData ,f:: Symbol ) = begin
210
+ if f == :inferdim
211
+ Base. depwarn (" vnd.inferdim::Float64 is deprecated, use vnd.infoPerCoord::Vector{Float64} instead" , :getproperty )
212
+ # @warn "vnd.inferdim is deprecated, use .infoPerCoord instead"
213
+ getfield (x, :infoPerCoord )
214
+ else
215
+ getfield (x,f)
152
216
end
153
- getfield (x,f)
154
217
end
155
218
156
- function Base. setproperty! (x:: VariableNodeData , f:: Symbol , val)
157
- if f == :softtype
158
- Base. depwarn (" `VariableNodeData` field `softtype` is deprecated, use `variableType`" , :getproperty )
159
- f = :variableType
219
+ function Base. setproperty! (x:: VariableNodeData , f:: Symbol , val:: Real )
220
+ _val = if f == :inferdim
221
+ Base. depwarn (" vnd.inferdim::Float64 is deprecated, use vnd.infoPerCoord::Vector{Float64} instead" , :setproperty! )
222
+ f = :infoPerCoord
223
+ Float64[val;]
224
+ else
225
+ val
160
226
end
161
- return setfield! (x, f, convert ( fieldtype ( typeof (x), f), val) )
227
+ return setfield! (x, f, _val )
162
228
end
163
229
164
-
165
- function Base. getproperty (x:: PackedVariableNodeData ,f:: Symbol )
166
- if f == :softtype
167
- Base. depwarn (" `PackedVariableNodeData` field `softtype` is deprecated, use `variableType`" , :getproperty )
168
- f = :variableType
230
+ function Base. setproperty! (x:: VariableNodeData , f:: Symbol , val:: AbstractVector{<:Real} )
231
+ if f == :inferdim
232
+ Base. depwarn (" vnd.inferdim::Float64 is deprecated, use vnd.infoPerCoord::Vector{Float64} instead" , :setproperty! )
233
+ f = :infoPerCoord
169
234
end
170
- getfield (x,f )
235
+ return setfield! (x, f, val )
171
236
end
172
237
173
- function Base. setproperty! (x:: PackedVariableNodeData , f:: Symbol , val)
174
- if f == :softtype
175
- Base. depwarn (" `PackedVariableNodeData` field `softtype` is deprecated, use `variableType`" , :getproperty )
176
- f = :variableType
238
+ #
239
+
240
+ Base. propertynames (x:: PackedVariableNodeData , private:: Bool = false ) = private ? (:inferdim , :infoPerCoord ) : (:infoPerCoord ,)
241
+
242
+ Base. getproperty (x:: PackedVariableNodeData ,f:: Symbol ) = begin
243
+ if f == :inferdim
244
+ Base. depwarn (" pvnd.inferdim::Float64 is deprecated, use vnd.infoPerCoord::Vector{Float64} instead" , :getproperty )
245
+ getfield (x, :infoPerCoord )
246
+ else
247
+ getfield (x,f)
177
248
end
178
- return setfield! (x, f, convert (fieldtype (typeof (x), f), val))
179
249
end
180
250
181
-
182
- function Base. getproperty (x:: DFGVariableSummary ,f:: Symbol )
183
- if f == :softtypename
184
- Base. depwarn (" `DFGVariableSummary` field `softtypename` is deprecated, use `variableTypeName`" , :getproperty )
185
- f = :variableTypeName
251
+ function Base. setproperty! (x:: PackedVariableNodeData , f:: Symbol , val:: Real )
252
+ _val = if f == :inferdim
253
+ Base. depwarn (" pvnd.inferdim::Float64 is deprecated, use vnd.infoPerCoord::Vector{Float64} instead" , :setproperty! )
254
+ f = :infoPerCoord
255
+ Float64[val;]
256
+ else
257
+ val
186
258
end
187
- getfield (x,f )
259
+ return setfield! (x, f, _val )
188
260
end
189
261
190
- function Base. setproperty! (x:: DFGVariableSummary , f:: Symbol , val)
191
- if f == :softtypename
192
- Base. depwarn (" `DFGVariableSummary` field `softtypename` is deprecated, use `variableTypeName` " , :getproperty )
193
- f = :variableTypeName
262
+ function Base. setproperty! (x:: PackedVariableNodeData , f:: Symbol , val:: AbstractVector{<:Real} )
263
+ if f == :inferdim
264
+ Base. depwarn (" pvnd.inferdim::Float64 is deprecated, use vnd.infoPerCoord::Vector{Float64} instead " , :setproperty! )
265
+ f = :infoPerCoord
194
266
end
195
- return setfield! (x, f, convert ( fieldtype ( typeof (x), f), val) )
267
+ return setfield! (x, f, val)
196
268
end
197
269
198
- @deprecate getSofttype (args... ) getVariableType (args... )
199
- @deprecate getSofttypename (args... ) getVariableTypeName (args... )
270
+
271
+ @deprecate VariableNodeData (val:: Vector ,bw:: AbstractMatrix{<:Real} ,BayesNetOutVertIDs:: AbstractVector{Symbol} ,dimIDs:: AbstractVector{Int} ,dims:: Int ,eliminated:: Bool ,BayesNetVertID:: Symbol ,separator:: AbstractVector{Symbol} ,variableType,initialized:: Bool ,inferdim:: Real ,w... ;kw... ) VariableNodeData (val,bw,BayesNetOutVertIDs,dimIDs,dims,eliminated,BayesNetVertID,separator,variableType,initialized,Float64[inferdim;],w... ;kw... )
272
+
273
+
274
+
275
+ #
0 commit comments