Skip to content

Commit 8ab0173

Browse files
committed
upgrading
1 parent 20dc71a commit 8ab0173

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

src/DistributedFactorGraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export timestamp # DEPRECATED
2626
export label, getTimestamp, setTimestamp!, tags, setTags!, estimates, estimate, data, softtype, solverData, getData, solverDataDict, setSolverData, setSolverData!, internalId, smallData, setSmallData!, bigData
2727
export DFGVariableSummary, DFGFactorSummary, AbstractDFGSummary
2828
export addBigDataEntry!, getBigDataEntry, updateBigDataEntry!, deleteBigDataEntry!, getBigDataEntries, getBigDataKeys
29-
export showFactor, showVariable
29+
export printFactor, printVariable
3030

3131
#Skeleton types
3232
export SkeletonDFGVariable, SkeletonDFGFactor

src/services/AbstractDFG.jl

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -646,27 +646,28 @@ Display and return to console the user factor identified by tag name.
646646
showFactor(fgl::G, fsym::Symbol) where G <: AbstractDFG = @show getFactor(fgl,fsym)
647647

648648

649-
# """
650-
# $SIGNATURES
651-
#
652-
# TODO: OLD, NEEDS TO BE REWORKED
653-
# Display the content of `VariableNodeData` to console for a given factor graph and variable tag`::Symbol`.
654-
#
655-
# Dev Notes
656-
# - TODO split as two show macros between AMP and DFG
657-
# """
658-
# function showVariable(fgl::G, vsym::Symbol) where G <: AbstractDFG
659-
# vert = DFG.getVariable(fg, vsym)
660-
# vnd = solverData(vert)
661-
# println("label: $(vert.label), exVertexId: $(vert.index)")
662-
# println("tags: $( haskey(vert.attributes, string(:tags)) ? vert.attributes[string(:tags)] : string(:none))")
663-
# println("size marginal samples $(size(getVal(vnd)))")
664-
# println("kde bandwidths: $(getBW(vnd)[:,1])")
665-
# println("kde mean: $(round.(getKDEMean(getKDE(vnd)),digits=4))")
666-
# println("kde max: $(round.(getKDEMax(getKDE(vnd)),digits=4))")
667-
# println()
668-
# vnd
669-
# end
649+
"""
650+
$SIGNATURES
651+
652+
TODO: OLD, NEEDS TO BE REWORKED
653+
Display the content of `VariableNodeData` to console for a given factor graph and variable tag`::Symbol`.
654+
655+
Dev Notes
656+
- TODO split as two show macros between AMP and DFG
657+
"""
658+
function printVariable(fgl::AbstractDFG, vsym::Symbol)
659+
vert = getVariable(fgl, vsym)
660+
vnd = solverData(vert)
661+
println("label: $(vert.label)")
662+
println("tags: $(getTags(vert))")
663+
println("size marginal samples $(size(getVal(vnd)))")
664+
println("kde bandwidths: $(getBW(vnd)[:,1])")
665+
println("PPE.suggested: $(round.(getVariablePPE(vnd).suggested,digits=4))")
666+
# println("kde max: $(round.(getKDEMax(getKDE(vnd)),digits=4))")
667+
# println("kde max: $(round.(getKDEMax(getKDE(vnd)),digits=4))")
668+
println()
669+
vnd
670+
end
670671

671672
"""
672673
$(SIGNATURES)

0 commit comments

Comments
 (0)