Skip to content

Commit 872bc12

Browse files
committed
AdjacencyMatrix
1 parent 7fc3638 commit 872bc12

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/DistributedFactorGraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function __init__()
6262
Rows are all factors, columns are all variables, and each cell contains either nothing or the symbol of the relating factor.
6363
The first column is the factor headings.
6464
"""
65-
function getAdjacencyMatrixDataFrame(dfg::Union{GraphsDFG, LightGraphsDFG})::Main.DataFrames.DataFrame
65+
function getAdjacencyMatrixDataFrame(dfg::Union{GraphsDFG, LightGraphsDFG, SymbolDFG})::Main.DataFrames.DataFrame
6666
varLabels = sort(map(v->v.label, getVariables(dfg)))
6767
factLabels = sort(map(f->f.label, getFactors(dfg)))
6868
adjDf = DataFrames.DataFrame(:Factor => Union{Missing, Symbol}[])

src/SymbolDFG/SymbolDFG.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ import ...DistributedFactorGraphs: setSolverParams,
2828
lsf,
2929
isFullyConnected,
3030
hasOrphans,
31-
getNeighbors
31+
getNeighbors,
32+
getAdjacencyMatrix
3233

3334
include("SymbolFactorGraphs/SymbolFactorGraphs.jl")
3435
using .SymbolFactorGraphs

src/SymbolDFG/services/SymbolDFG.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ function getSubgraph(dfg::SymbolDFG, variableFactorLabels::Vector{Symbol}, inclu
466466
_copyIntoGraph!(dfg, addToDFG, variableFactorLabels, includeOrphanFactors)
467467
return addToDFG
468468
end
469-
469+
=#
470470
"""
471471
$(SIGNATURES)
472472
Get an adjacency matrix for the DFG, returned as a Matrix{Union{Nothing, Symbol}}.
@@ -489,7 +489,7 @@ function getAdjacencyMatrix(dfg::SymbolDFG)::Matrix{Union{Nothing, Symbol}}
489489
return adjMat
490490
end
491491

492-
492+
#=
493493
"""
494494
$(SIGNATURES)
495495
Produces a dot-format of the graph for visualization.

0 commit comments

Comments
 (0)