|
2 | 2 | # deprecation staging area
|
3 | 3 | ##==============================================================================
|
4 | 4 |
|
| 5 | + |
5 | 6 | ##==============================================================================
|
6 |
| -## Remove in 0.7 |
| 7 | +## Remove in 0.8 |
7 | 8 | ##==============================================================================
|
8 | 9 |
|
9 |
| -Base.getproperty(x::DFGVariable,f::Symbol) = begin |
10 |
| - if f == :estimateDict |
11 |
| - @warn "estimateDict is deprecated, use ppeDict instead" |
12 |
| - getfield(x, :ppeDict) |
13 |
| - elseif f == :solvable |
14 |
| - getfield(x,:_dfgNodeParams).solvable |
15 |
| - elseif f == :_internalId |
16 |
| - getfield(x,:_dfgNodeParams)._internalId |
17 |
| - else |
18 |
| - getfield(x,f) |
19 |
| - end |
20 |
| - end |
21 |
| - |
22 |
| -Base.setproperty!(x::DFGVariable,f::Symbol, val) = begin |
23 |
| - if f == :estimateDict |
24 |
| - error("estimateDict is deprecated, use ppeDict instead") |
25 |
| - elseif f == :solvable |
26 |
| - getfield(x,:_dfgNodeParams).solvable = val |
27 |
| - elseif f == :_internalId |
28 |
| - getfield(x,:_dfgNodeParams)._internalId = val |
29 |
| - else |
30 |
| - setfield!(x,f,val) |
31 |
| - end |
32 |
| - end |
33 |
| - |
34 |
| -Base.getproperty(x::DFGVariableSummary,f::Symbol) = begin |
35 |
| - if f == :estimateDict |
36 |
| - @warn "estimateDict is deprecated, use ppeDict instead" |
37 |
| - getfield(x, :ppeDict) |
38 |
| - else |
39 |
| - getfield(x,f) |
40 |
| - end |
41 |
| - end |
42 |
| - |
43 |
| - |
44 |
| -Base.getproperty(x::DFGFactor,f::Symbol) = begin |
45 |
| - if f == :solvable |
46 |
| - getfield(x,:_dfgNodeParams).solvable |
47 |
| - elseif f == :_internalId |
48 |
| - getfield(x,:_dfgNodeParams)._internalId |
49 |
| - elseif f == :data |
50 |
| - |
51 |
| - if !(@isdefined getFactorDataWarnOnce) |
52 |
| - @warn "get: data field is deprecated, use getSolverData. Further warnings are suppressed" |
53 |
| - global getFactorDataWarnOnce = true |
54 |
| - end |
55 |
| - |
56 |
| - getfield(x, :solverData) |
57 |
| - else |
58 |
| - getfield(x,f) |
59 |
| - end |
60 |
| -end |
61 |
| - |
62 |
| -Base.setproperty!(x::DFGFactor,f::Symbol, val) = begin |
63 |
| - if f == :solvable |
64 |
| - setfield!(x,f,val) |
65 |
| - getfield(x,:_dfgNodeParams).solvable = val |
66 |
| - elseif f == :_internalId |
67 |
| - getfield(x,:_dfgNodeParams)._internalId = val |
68 |
| - elseif f == :data |
69 |
| - |
70 |
| - if !(@isdefined setFactorDataWarnOnce) |
71 |
| - @warn "set: data field is deprecated, use ...TODO? Further warnings are suppressed" |
72 |
| - global setFactorDataWarnOnce = true |
73 |
| - end |
74 |
| - |
75 |
| - setfield!(x,:solverData, val) |
76 |
| - else |
77 |
| - setfield!(x,f,val) |
78 |
| - end |
79 |
| - end |
80 |
| - |
81 |
| -Base.getproperty(x::GenericFunctionNodeData,f::Symbol) = begin |
82 |
| - f == :fncargvID && Base.depwarn("GenericFunctionNodeData field fncargvID will be deprecated, use `getVariableOrder` instead",:getproperty)#@warn "fncargvID is deprecated, use `getVariableOrder` instead" |
83 |
| - |
84 |
| - getfield(x, f) |
85 |
| - |
86 |
| -end |
87 |
| - |
88 |
| -Base.setproperty!(x::GenericFunctionNodeData,f::Symbol, val) = begin |
89 |
| - f == :fncargvID && Base.depwarn("GenericFunctionNodeData field fncargvID will be deprecated, use `getVariableOrder` instead",:getproperty)#@warn "fncargvID is deprecated, use `getVariableOrder` instead" |
90 |
| - |
91 |
| - setfield!(x,f,val) |
92 |
| - |
93 |
| -end |
94 |
| - |
95 |
| -# update is implied, see API wiki |
96 |
| -@deprecate mergeUpdateVariableSolverData!(dfg, sourceVariable) mergeVariableData!(dfg, sourceVariable) |
97 |
| -@deprecate mergeUpdateGraphSolverData!(sourceDFG, destDFG, varSyms) mergeGraphVariableData!(destDFG, sourceDFG, varSyms) |
98 |
| - |
99 | 10 | #TODO alias or deprecate
|
100 | 11 | @deprecate getVariableIds(dfg::AbstractDFG, regexFilter::Union{Nothing, Regex}=nothing; tags::Vector{Symbol}=Symbol[], solvable::Int=0) listVariables(dfg, regexFilter, tags=tags, solvable=solvable)
|
101 | 12 |
|
102 | 13 | @deprecate getFactorIds(dfg, regexFilter=nothing; solvable=0) listFactors(dfg, regexFilter, solvable=solvable)
|
103 | 14 |
|
104 | 15 |
|
105 |
| -#TODO doesn't look like this existed |
106 |
| -# @deprecate timestamp(v) getTimestamp(v) |
107 |
| - |
108 |
| -@deprecate setSolverParams(args...) setSolverParams!(args...) |
109 |
| - |
110 |
| -@deprecate setDescription(args...) setDescription!(args...) |
111 |
| - |
112 |
| -@deprecate getAdjacencyMatrixSparse(dfg::AbstractDFG; solvable::Int=0) getBiadjacencyMatrix(dfg, solvable=solvable) |
113 |
| - |
114 |
| -@deprecate solverData(f::DFGFactor) getSolverData(f) |
115 |
| - |
116 |
| -@deprecate solverData(v::DFGVariable, key::Symbol=:default) getSolverData(v, key) |
117 |
| - |
118 |
| -@deprecate solverDataDict(args...) getSolverDataDict(args...) |
119 |
| - |
120 |
| -@deprecate internalId(args...) getInternalId(args...) |
121 |
| - |
122 |
| -@deprecate pack(dfg::AbstractDFG, d::VariableNodeData) packVariableNodeData(dfg, d) |
123 |
| -@deprecate unpack(dfg::AbstractDFG, d::PackedVariableNodeData) unpackVariableNodeData(dfg, d) |
124 |
| - |
125 |
| -export getLabelDict |
126 |
| -getLabelDict(dfg::AbstractDFG) = error("getLabelDict is deprecated, consider using listing functions") |
127 |
| - |
128 |
| -export getAdjacencyMatrix |
129 |
| -""" |
130 |
| - $(SIGNATURES) |
131 |
| -Get a matrix indicating relationships between variables and factors. Rows are |
132 |
| -all factors, columns are all variables, and each cell contains either nothing or |
133 |
| -the symbol of the relating factor. The first row and first column are factor and |
134 |
| -variable headings respectively. |
135 |
| -""" |
136 |
| -function getAdjacencyMatrix(dfg::AbstractDFG; solvable::Int=0)::Matrix{Union{Nothing, Symbol}} |
137 |
| - error("Deprecated function, please use getBiadjacencyMatrix") |
138 |
| -end |
139 |
| - |
140 |
| - |
141 |
| -export buildSubgraphFromLabels |
142 |
| -function buildSubgraphFromLabels(dfg::G, |
143 |
| - syms::Vector{Symbol}; |
144 |
| - subfg::AbstractDFG=(G <: InMemoryDFGTypes ? G : GraphsDFG)(params=getSolverParams(dfg)), |
145 |
| - solvable::Int=0, |
146 |
| - allowedFactors::Union{Nothing, Vector{Symbol}}=nothing )::G where G <: AbstractDFG |
147 |
| - # |
148 |
| - @warn "Deprecated buildSubgraphFromLabels, use buildSubgraphFromLabels! instead." |
149 |
| - buildSubgraphFromLabels!(dfg, syms, subfg=subfg, solvable=solvable, allowedFactors=allowedFactors ) |
150 |
| -end |
151 |
| - |
152 |
| -@deprecate sortVarNested(vars::Vector{Symbol}) sortDFG(vars) |
153 |
| - |
| 16 | +##============================================================================== |
| 17 | +## Remove in 0.7 |
| 18 | +##============================================================================== |
154 | 19 |
|
155 |
| -#NOTE This one is still used in IIF so maybe leave a bit longer |
156 |
| -@deprecate getfnctype(args...) getFactorType(args...) |
| 20 | +# Base.getproperty(x::DFGVariable,f::Symbol) = begin |
| 21 | +# if f == :estimateDict |
| 22 | +# @warn "estimateDict is deprecated, use ppeDict instead" |
| 23 | +# getfield(x, :ppeDict) |
| 24 | +# elseif f == :solvable |
| 25 | +# getfield(x,:_dfgNodeParams).solvable |
| 26 | +# elseif f == :_internalId |
| 27 | +# getfield(x,:_dfgNodeParams)._internalId |
| 28 | +# else |
| 29 | +# getfield(x,f) |
| 30 | +# end |
| 31 | +# end |
| 32 | +# |
| 33 | +# Base.setproperty!(x::DFGVariable,f::Symbol, val) = begin |
| 34 | +# if f == :estimateDict |
| 35 | +# error("estimateDict is deprecated, use ppeDict instead") |
| 36 | +# elseif f == :solvable |
| 37 | +# getfield(x,:_dfgNodeParams).solvable = val |
| 38 | +# elseif f == :_internalId |
| 39 | +# getfield(x,:_dfgNodeParams)._internalId = val |
| 40 | +# else |
| 41 | +# setfield!(x,f,val) |
| 42 | +# end |
| 43 | +# end |
| 44 | +# |
| 45 | +# Base.getproperty(x::DFGVariableSummary,f::Symbol) = begin |
| 46 | +# if f == :estimateDict |
| 47 | +# @warn "estimateDict is deprecated, use ppeDict instead" |
| 48 | +# getfield(x, :ppeDict) |
| 49 | +# else |
| 50 | +# getfield(x,f) |
| 51 | +# end |
| 52 | +# end |
| 53 | +# |
| 54 | +# |
| 55 | +# Base.getproperty(x::DFGFactor,f::Symbol) = begin |
| 56 | +# if f == :solvable |
| 57 | +# getfield(x,:_dfgNodeParams).solvable |
| 58 | +# elseif f == :_internalId |
| 59 | +# getfield(x,:_dfgNodeParams)._internalId |
| 60 | +# elseif f == :data |
| 61 | +# |
| 62 | +# if !(@isdefined getFactorDataWarnOnce) |
| 63 | +# @warn "get: data field is deprecated, use getSolverData. Further warnings are suppressed" |
| 64 | +# global getFactorDataWarnOnce = true |
| 65 | +# end |
| 66 | +# |
| 67 | +# getfield(x, :solverData) |
| 68 | +# else |
| 69 | +# getfield(x,f) |
| 70 | +# end |
| 71 | +# end |
| 72 | +# |
| 73 | +# Base.setproperty!(x::DFGFactor,f::Symbol, val) = begin |
| 74 | +# if f == :solvable |
| 75 | +# setfield!(x,f,val) |
| 76 | +# getfield(x,:_dfgNodeParams).solvable = val |
| 77 | +# elseif f == :_internalId |
| 78 | +# getfield(x,:_dfgNodeParams)._internalId = val |
| 79 | +# elseif f == :data |
| 80 | +# |
| 81 | +# if !(@isdefined setFactorDataWarnOnce) |
| 82 | +# @warn "set: data field is deprecated, use ...TODO? Further warnings are suppressed" |
| 83 | +# global setFactorDataWarnOnce = true |
| 84 | +# end |
| 85 | +# |
| 86 | +# setfield!(x,:solverData, val) |
| 87 | +# else |
| 88 | +# setfield!(x,f,val) |
| 89 | +# end |
| 90 | +# end |
| 91 | +# |
| 92 | +# Base.getproperty(x::GenericFunctionNodeData,f::Symbol) = begin |
| 93 | +# f == :fncargvID && Base.depwarn("GenericFunctionNodeData field fncargvID will be deprecated, use `getVariableOrder` instead",:getproperty)#@warn "fncargvID is deprecated, use `getVariableOrder` instead" |
| 94 | +# |
| 95 | +# getfield(x, f) |
| 96 | +# |
| 97 | +# end |
| 98 | +# |
| 99 | +# Base.setproperty!(x::GenericFunctionNodeData,f::Symbol, val) = begin |
| 100 | +# f == :fncargvID && Base.depwarn("GenericFunctionNodeData field fncargvID will be deprecated, use `getVariableOrder` instead",:getproperty)#@warn "fncargvID is deprecated, use `getVariableOrder` instead" |
| 101 | +# |
| 102 | +# setfield!(x,f,val) |
| 103 | +# |
| 104 | +# end |
| 105 | +# |
| 106 | +# # update is implied, see API wiki |
| 107 | +# @deprecate mergeUpdateVariableSolverData!(dfg, sourceVariable) mergeVariableData!(dfg, sourceVariable) |
| 108 | +# @deprecate mergeUpdateGraphSolverData!(sourceDFG, destDFG, varSyms) mergeGraphVariableData!(destDFG, sourceDFG, varSyms) |
| 109 | +# |
| 110 | +# |
| 111 | +# #TODO doesn't look like this existed |
| 112 | +# # @deprecate timestamp(v) getTimestamp(v) |
| 113 | +# |
| 114 | +# @deprecate setSolverParams(args...) setSolverParams!(args...) |
| 115 | +# |
| 116 | +# @deprecate setDescription(args...) setDescription!(args...) |
| 117 | +# |
| 118 | +# @deprecate getAdjacencyMatrixSparse(dfg::AbstractDFG; solvable::Int=0) getBiadjacencyMatrix(dfg, solvable=solvable) |
| 119 | +# |
| 120 | +# @deprecate solverData(f::DFGFactor) getSolverData(f) |
| 121 | +# |
| 122 | +# @deprecate solverData(v::DFGVariable, key::Symbol=:default) getSolverData(v, key) |
| 123 | +# |
| 124 | +# @deprecate solverDataDict(args...) getSolverDataDict(args...) |
| 125 | +# |
| 126 | +# @deprecate internalId(args...) getInternalId(args...) |
| 127 | +# |
| 128 | +# @deprecate pack(dfg::AbstractDFG, d::VariableNodeData) packVariableNodeData(dfg, d) |
| 129 | +# @deprecate unpack(dfg::AbstractDFG, d::PackedVariableNodeData) unpackVariableNodeData(dfg, d) |
| 130 | +# |
| 131 | +# export getLabelDict |
| 132 | +# getLabelDict(dfg::AbstractDFG) = error("getLabelDict is deprecated, consider using listing functions") |
| 133 | +# |
| 134 | +# export getAdjacencyMatrix |
| 135 | +# """ |
| 136 | +# $(SIGNATURES) |
| 137 | +# Get a matrix indicating relationships between variables and factors. Rows are |
| 138 | +# all factors, columns are all variables, and each cell contains either nothing or |
| 139 | +# the symbol of the relating factor. The first row and first column are factor and |
| 140 | +# variable headings respectively. |
| 141 | +# """ |
| 142 | +# function getAdjacencyMatrix(dfg::AbstractDFG; solvable::Int=0)::Matrix{Union{Nothing, Symbol}} |
| 143 | +# error("Deprecated function, please use getBiadjacencyMatrix") |
| 144 | +# end |
| 145 | +# |
| 146 | +# |
| 147 | +# export buildSubgraphFromLabels |
| 148 | +# function buildSubgraphFromLabels(dfg::G, |
| 149 | +# syms::Vector{Symbol}; |
| 150 | +# subfg::AbstractDFG=(G <: InMemoryDFGTypes ? G : GraphsDFG)(params=getSolverParams(dfg)), |
| 151 | +# solvable::Int=0, |
| 152 | +# allowedFactors::Union{Nothing, Vector{Symbol}}=nothing )::G where G <: AbstractDFG |
| 153 | +# # |
| 154 | +# @warn "Deprecated buildSubgraphFromLabels, use buildSubgraphFromLabels! instead." |
| 155 | +# buildSubgraphFromLabels!(dfg, syms, subfg=subfg, solvable=solvable, allowedFactors=allowedFactors ) |
| 156 | +# end |
| 157 | +# |
| 158 | +# @deprecate sortVarNested(vars::Vector{Symbol}) sortDFG(vars) |
| 159 | +# |
| 160 | +# |
| 161 | +# #NOTE This one is still used in IIF so maybe leave a bit longer |
| 162 | +# @deprecate getfnctype(args...) getFactorType(args...) |
0 commit comments