Skip to content

Commit f0e1f4d

Browse files
committed
GraphsDFG robot,user,session ids and minor updates
1 parent 0a10534 commit f0e1f4d

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

src/Common.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export getData
55
export getVariableType, getSofttype
66
export getFactorType, getfnctype
77
export lsTypes, lsfTypes
8-
8+
export lsWho, lsfWho
99

1010
"""
1111
$(SIGNATURES)

src/GraphsDFG/entities/GraphsDFG.jl

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,21 @@ const FGType = Graphs.GenericIncidenceList{GraphsNode,Graphs.Edge{GraphsNode},Di
1111
mutable struct GraphsDFG{T <: AbstractParams} <: AbstractDFG
1212
g::FGType
1313
description::String
14+
userId::String
15+
robotId::String
16+
sessionId::String
1417
nodeCounter::Int64
1518
labelDict::Dict{Symbol, Int64}
1619
addHistory::Vector{Symbol} #TODO: Discuss more - is this an audit trail?
1720
solverParams::T # Solver parameters
18-
GraphsDFG{T}(g::FGType=Graphs.incdict(GraphsNode,is_directed=false),
19-
d::String="Graphs.jl implementation",
20-
n::Int64=0,
21-
l::Dict{Symbol, Int64}=Dict{Symbol, Int64}(),
22-
a::Vector{Symbol}=Symbol[];
23-
params::T=NoSolverParams()) where T <: AbstractParams = new{T}(g, d, n, l, a, params)
2421
end
22+
23+
GraphsDFG{T}( g::FGType=Graphs.incdict(GraphsNode,is_directed=false),
24+
d::String="Graphs.jl implementation",
25+
n::Int64=0,
26+
l::Dict{Symbol, Int64}=Dict{Symbol, Int64}(),
27+
a::Vector{Symbol}=Symbol[];
28+
userId::String = "UserID",
29+
robotId::String = "robotID",
30+
sessionId::String = "sessionID",
31+
params::T=NoSolverParams()) where T <: AbstractParams = GraphsDFG{T}(g, d, userId, robotId, sessionId, n, l, a, params)

src/LightDFG/entities/LightDFG.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ function LightDFG{T,V,F}(g::FactorGraph{Int,V,F}=FactorGraph{Int,V,F}();
2424
LightDFG{T,V,F}(g, description, userId, robotId, sessionId, Symbol[], params)
2525
end
2626

27-
LightDFG{T}(g::FactorGraph{Int,DFGVariable,DFGFactor}=FactorGraph{Int,DFGVariable,DFGFactor}(); kwargs...) where T <: AbstractParams = LightDFG{T,DFGVariable,DFGFactor}(g, kwargs...)
27+
# LightDFG{T}(; kwargs...) where T <: AbstractParams = LightDFG{T,DFGVariable,DFGFactor}(;kwargs...)
28+
29+
LightDFG{T}(g::FactorGraph{Int,DFGVariable,DFGFactor}=FactorGraph{Int,DFGVariable,DFGFactor}(); kwargs...) where T <: AbstractParams = LightDFG{T,DFGVariable,DFGFactor}(g; kwargs...)
2830

2931
Base.propertynames(x::LightDFG, private::Bool=false) =
3032
(:g, :description, :userId, :robotId, :sessionId, :nodeCounter, :labelDict, :addHistory, :solverParams)

src/SymbolDFG/entities/SymbolDFG.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function SymbolDFG{T,V,F}(g::SymbolFactorGraph{V,F}=SymbolFactorGraph{V,F}();
2424
SymbolDFG{T,V,F}(g, description, userId, robotId, sessionId, Symbol[], params)
2525
end
2626

27-
SymbolDFG{T}(g::SymbolFactorGraph{DFGVariable,DFGFactor}=SymbolFactorGraph{DFGVariable,DFGFactor}(); kwargs...) where T <: AbstractParams = SymbolDFG{T,DFGVariable,DFGFactor}(g, kwargs...)
27+
SymbolDFG{T}(g::SymbolFactorGraph{DFGVariable,DFGFactor}=SymbolFactorGraph{DFGVariable,DFGFactor}(); kwargs...) where T <: AbstractParams = SymbolDFG{T,DFGVariable,DFGFactor}(g; kwargs...)
2828

2929
Base.propertynames(x::SymbolDFG, private::Bool=false) =
3030
(:g, :description, :userId, :robotId, :sessionId, :nodeCounter, :labelDict, :addHistory, :solverParams)

0 commit comments

Comments
 (0)