@@ -541,26 +541,16 @@ Delete the referened DFGFactor from the DFG.
541
541
"""
542
542
deleteFactor! (dfg:: CloudGraphsDFG , factor:: DFGFactor ):: DFGFactor = deleteFactor! (dfg, factor. label)
543
543
544
- # Returns a flat vector of the vertices, keyed by ID.
545
- # Assuming only variables here for now - think maybe not, should be variables+factors?
546
544
"""
547
545
$(SIGNATURES)
548
546
List the DFGVariables in the DFG.
549
547
Optionally specify a label regular expression to retrieves a subset of the variables.
550
548
"""
551
- function ls (dfg:: CloudGraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ):: Vector{DFGVariable}
549
+ function getVariables (dfg:: CloudGraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ):: Vector{DFGVariable}
552
550
variableIds = getVariableIds (dfg, regexFilter)
553
551
return map (vId-> getVariable (dfg, vId), variableIds)
554
552
end
555
553
556
- # Alias
557
- """
558
- $(SIGNATURES)
559
- List the DFGVariables in the DFG.
560
- Optionally specify a label regular expression to retrieves a subset of the variables.
561
- """
562
- getVariables (dfg:: CloudGraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ):: Vector{DFGVariable} = ls (dfg, regexFilter)
563
-
564
554
"""
565
555
$(SIGNATURES)
566
556
Get a list of IDs of the DFGVariables in the DFG.
@@ -575,32 +565,22 @@ function getVariableIds(dfg::CloudGraphsDFG, regexFilter::Union{Nothing, Regex}=
575
565
end
576
566
end
577
567
568
+ # Alias
578
569
"""
579
570
$(SIGNATURES)
580
- List the DFGFactors in the DFG.
581
- Optionally specify a label regular expression to retrieves a subset of the factors .
571
+ List the DFGVariables in the DFG.
572
+ Optionally specify a label regular expression to retrieves a subset of the variables .
582
573
"""
583
- function lsf (dfg:: CloudGraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ):: Vector{DFGFactor}
584
- factorIds = getFactorIds (dfg, regexFilter)
585
- return map (vId-> getFactor (dfg, vId), factorIds)
586
- end
574
+ ls (dfg:: CloudGraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ):: Vector{Symbol} = getVariableIds (dfg, regexFilter)
587
575
588
- # Alias
589
576
"""
590
577
$(SIGNATURES)
591
578
List the DFGFactors in the DFG.
592
579
Optionally specify a label regular expression to retrieves a subset of the factors.
593
580
"""
594
- getFactors (dfg:: CloudGraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ):: Vector{DFGFactor} = lsf (dfg, regexFilter)
595
-
596
- # Alias - getNeighbors
597
- # TODO : Refactor this
598
- """
599
- $(SIGNATURES)
600
- Get neighbors around a given node. TODO: Refactor this
601
- """
602
- function lsf (dfg:: CloudGraphsDFG , label:: Symbol ):: Vector{Symbol}
603
- return getNeighbors (dfg, label)
581
+ function getFactors (dfg:: CloudGraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ):: Vector{DFGFactor}
582
+ factorIds = getFactorIds (dfg, regexFilter)
583
+ return map (vId-> getFactor (dfg, vId), factorIds)
604
584
end
605
585
606
586
"""
@@ -617,6 +597,23 @@ function getFactorIds(dfg::CloudGraphsDFG, regexFilter::Union{Nothing, Regex}=no
617
597
end
618
598
end
619
599
600
+ # Alias
601
+ """
602
+ $(SIGNATURES)
603
+ List the DFGFactors in the DFG.
604
+ Optionally specify a label regular expression to retrieves a subset of the factors.
605
+ """
606
+ lsf (dfg:: CloudGraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ):: Vector{Symbol} = getFactorIds (dfg, regexFilter)
607
+
608
+ # Alias - getNeighbors
609
+ """
610
+ $(SIGNATURES)
611
+ Get neighbors around a given node. TODO: Refactor this
612
+ """
613
+ function lsf (dfg:: CloudGraphsDFG , label:: Symbol ):: Vector{Symbol}
614
+ return getNeighbors (dfg, label)
615
+ end
616
+
620
617
"""
621
618
$(SIGNATURES)
622
619
Checks if the graph is fully connected, returns true if so.
0 commit comments