Skip to content

Commit 1dc45ed

Browse files
authored
alias for sort dfg symbol lists
closes #115
1 parent ee35907 commit 1dc45ed

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/Common.jl

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
export sortVarNested
2+
export sortVarNested, sortDFG
33
export isPrior, lsfPriors
44
export getData
55
export getVariableType, getSofttype
@@ -82,6 +82,24 @@ function sortVarNested(vars::Vector{Symbol})::Vector{Symbol}
8282
return retvars
8383
end
8484

85+
"""
86+
$SIGNATURES
87+
88+
Sort variable (factor) lists in a meaningful way, for example `[:april;:x1_3;:x1_6;]`
89+
90+
Notes
91+
- Not fool proof, but does better than native sort.
92+
93+
Example
94+
95+
`sortDFG(ls(dfg))`
96+
97+
Related
98+
99+
ls, lsf
100+
"""
101+
sortDFG(vars::Vector{Symbol})::Vector{Symbol} = sortVarNested(vars)
102+
85103
"""
86104
$SIGNATURES
87105

0 commit comments

Comments
 (0)