public class ElementGraphs extends java.lang.Object
ElementGraph
.Modifier and Type | Method and Description |
---|---|
static EnumMultiMap<FlowElement> |
annotations(ElementGraph elementGraph) |
static ElementDirectedGraph |
asElementDirectedGraph(java.util.Collection<ElementGraph> elementGraphs) |
static ElementMultiGraph |
asElementMultiGraph(java.util.Collection<ElementGraph> elementGraphs) |
static ElementGraph |
asExtentMaskedSubGraph(ElementGraph elementGraph)
Returns a new ElementGraph (a MaskedSubGraph) of the given ElementGraph that will not contain the
Extent
head or tail instances. |
static FlowElementGraph |
asFlowElementGraph(PlatformInfo platformInfo,
FlowStepGraph flowStepGraph) |
static <F extends FlowElement> |
asSinkMap(ElementGraph elementGraph,
java.util.Set<F> elements) |
static <F extends FlowElement> |
asSourceMap(ElementGraph elementGraph,
java.util.Set<F> elements) |
static ElementSubGraph |
asSubGraph(ElementGraph elementGraph,
ElementGraph contractedGraph,
java.util.Set<FlowElement> excludes) |
static java.lang.String |
canonicalHash(ElementGraph graph) |
static java.lang.String |
canonicalHash(org.jgrapht.Graph<FlowElement,Scope> graph) |
static org.jgrapht.DirectedGraph<FlowElement,Scope> |
directed(ElementGraph elementGraph) |
static boolean |
equals(ElementGraph lhs,
ElementGraph rhs) |
static boolean |
equalsIgnoreAnnotations(ElementGraph lhs,
ElementGraph rhs) |
static <V,E> boolean |
equalsIgnoreAnnotations(org.jgrapht.Graph<V,E> lhs,
org.jgrapht.Graph<V,E> rhs) |
static java.util.Set<Group> |
findAllGroups(ElementGraph elementGraph) |
static <V,E> Pair<java.util.Set<V>,java.util.Set<E>> |
findClosureViaFloydWarshall(org.jgrapht.DirectedGraph<V,E> full,
org.jgrapht.DirectedGraph<V,E> contracted) |
static <V,E> Pair<java.util.Set<V>,java.util.Set<E>> |
findClosureViaFloydWarshall(org.jgrapht.DirectedGraph<V,E> full,
org.jgrapht.DirectedGraph<V,E> contracted,
java.util.Set<V> excludes) |
static Pipe |
findFirstPipeNamed(ElementGraph elementGraph,
java.lang.String name) |
static Pipe |
findLastPipeNamed(ElementGraph elementGraph,
java.lang.String name) |
static java.util.Set<Tap> |
findSinks(ElementGraph elementGraph) |
static <F extends FlowElement> |
findSinks(ElementGraph elementGraph,
java.lang.Class<F> type) |
static java.util.Set<Tap> |
findSources(ElementGraph elementGraph) |
static <F extends FlowElement> |
findSources(ElementGraph elementGraph,
java.lang.Class<F> type) |
static java.util.Collection<FlowElement> |
getAllElementsBetweenExclusive(ElementGraph graph,
FlowElement from,
FlowElement to) |
static java.util.Collection<FlowElement> |
getAllElementsBetweenInclusive(ElementGraph graph,
FlowElement from,
FlowElement to) |
static java.util.Set<Scope> |
getAllMultiEdgesBetween(java.util.Collection<Scope> edgeList,
ElementGraph current) |
static <V,E> java.util.List<org.jgrapht.GraphPath<V,E>> |
getAllShortestPathsBetween(org.jgrapht.DirectedGraph<V,E> graph,
V from,
V to) |
static java.util.List<org.jgrapht.GraphPath<FlowElement,Scope>> |
getAllShortestPathsBetween(ElementGraph graph,
FlowElement from,
FlowElement to) |
static java.util.Iterator<FlowElement> |
getReverseTopologicalIterator(ElementGraph graph) |
static java.util.Iterator<FlowElement> |
getTopologicalIterator(ElementGraph graph) |
static int |
hashCodeIgnoreAnnotations(ElementGraph elementGraph) |
static <V,E> int |
hashCodeIgnoreAnnotations(org.jgrapht.Graph<V,E> graph) |
static void |
insertFlowElementAfter(ElementGraph elementGraph,
FlowElement previousElement,
FlowElement flowElement) |
static void |
insertFlowElementBefore(ElementGraph graph,
FlowElement nextElement,
FlowElement flowElement) |
static void |
insertFlowElementBetweenEdge(ElementGraph elementGraph,
Scope previousEdge,
FlowElement newElement) |
static boolean |
isEmpty(ElementGraph elementGraph) |
static boolean |
isMultiGraph(ElementGraph elementGraph) |
protected static int |
pair(int lhs,
int rhs) |
static boolean |
printElementGraph(java.lang.String filename,
ElementGraph graph,
PlatformInfo platformInfo) |
static boolean |
printProcessGraph(java.lang.String filename,
ElementGraph graph,
ProcessGraph<? extends ProcessModel> processGraph) |
static void |
removeAndContract(ElementGraph elementGraph,
FlowElement flowElement) |
static boolean |
removeBranchBetween(ElementGraph elementGraph,
FlowElement first,
FlowElement second,
boolean inclusive) |
static boolean |
removeBranchContaining(ElementGraph elementGraph,
FlowElement flowElement) |
static void |
replaceElementWith(ElementGraph elementGraph,
FlowElement replace,
FlowElement replaceWith) |
static int |
shortestDistance(ElementGraph graph,
FlowElement lhs,
FlowElement rhs)
Returns the number of edges found on the shortest distance between the lhs and rhs.
|
public static FlowElementGraph asFlowElementGraph(PlatformInfo platformInfo, FlowStepGraph flowStepGraph)
public static ElementDirectedGraph asElementDirectedGraph(java.util.Collection<ElementGraph> elementGraphs)
public static ElementMultiGraph asElementMultiGraph(java.util.Collection<ElementGraph> elementGraphs)
public static boolean isEmpty(ElementGraph elementGraph)
public static org.jgrapht.DirectedGraph<FlowElement,Scope> directed(ElementGraph elementGraph)
public static EnumMultiMap<FlowElement> annotations(ElementGraph elementGraph)
public static boolean isMultiGraph(ElementGraph elementGraph)
public static int hashCodeIgnoreAnnotations(ElementGraph elementGraph)
public static <V,E> int hashCodeIgnoreAnnotations(org.jgrapht.Graph<V,E> graph)
public static boolean equalsIgnoreAnnotations(ElementGraph lhs, ElementGraph rhs)
public static <V,E> boolean equalsIgnoreAnnotations(org.jgrapht.Graph<V,E> lhs, org.jgrapht.Graph<V,E> rhs)
public static boolean equals(ElementGraph lhs, ElementGraph rhs)
public static java.lang.String canonicalHash(ElementGraph graph)
public static java.lang.String canonicalHash(org.jgrapht.Graph<FlowElement,Scope> graph)
protected static int pair(int lhs, int rhs)
public static java.util.Iterator<FlowElement> getTopologicalIterator(ElementGraph graph)
public static java.util.Iterator<FlowElement> getReverseTopologicalIterator(ElementGraph graph)
public static java.util.Collection<FlowElement> getAllElementsBetweenExclusive(ElementGraph graph, FlowElement from, FlowElement to)
public static java.util.Collection<FlowElement> getAllElementsBetweenInclusive(ElementGraph graph, FlowElement from, FlowElement to)
public static java.util.List<org.jgrapht.GraphPath<FlowElement,Scope>> getAllShortestPathsBetween(ElementGraph graph, FlowElement from, FlowElement to)
public static <V,E> java.util.List<org.jgrapht.GraphPath<V,E>> getAllShortestPathsBetween(org.jgrapht.DirectedGraph<V,E> graph, V from, V to)
public static ElementSubGraph asSubGraph(ElementGraph elementGraph, ElementGraph contractedGraph, java.util.Set<FlowElement> excludes)
public static ElementGraph asExtentMaskedSubGraph(ElementGraph elementGraph)
Extent
head or tail instances.
If the given ElementGraph does not contain head or tail, it will be returned unchanged.elementGraph
- public static <V,E> Pair<java.util.Set<V>,java.util.Set<E>> findClosureViaFloydWarshall(org.jgrapht.DirectedGraph<V,E> full, org.jgrapht.DirectedGraph<V,E> contracted)
public static <V,E> Pair<java.util.Set<V>,java.util.Set<E>> findClosureViaFloydWarshall(org.jgrapht.DirectedGraph<V,E> full, org.jgrapht.DirectedGraph<V,E> contracted, java.util.Set<V> excludes)
public static void removeAndContract(ElementGraph elementGraph, FlowElement flowElement)
public static boolean printElementGraph(java.lang.String filename, ElementGraph graph, PlatformInfo platformInfo)
public static boolean printProcessGraph(java.lang.String filename, ElementGraph graph, ProcessGraph<? extends ProcessModel> processGraph)
public static void insertFlowElementAfter(ElementGraph elementGraph, FlowElement previousElement, FlowElement flowElement)
public static void insertFlowElementBefore(ElementGraph graph, FlowElement nextElement, FlowElement flowElement)
public static void insertFlowElementBetweenEdge(ElementGraph elementGraph, Scope previousEdge, FlowElement newElement)
public static <F extends FlowElement> java.util.Map<java.lang.String,F> asSourceMap(ElementGraph elementGraph, java.util.Set<F> elements)
public static java.util.Set<Tap> findSources(ElementGraph elementGraph)
public static <F extends FlowElement> java.util.Set<F> findSources(ElementGraph elementGraph, java.lang.Class<F> type)
public static <F extends FlowElement> java.util.Map<java.lang.String,F> asSinkMap(ElementGraph elementGraph, java.util.Set<F> elements)
public static <F extends FlowElement> java.util.Set<F> findSinks(ElementGraph elementGraph, java.lang.Class<F> type)
public static java.util.Set<Tap> findSinks(ElementGraph elementGraph)
public static java.util.Set<Group> findAllGroups(ElementGraph elementGraph)
public static java.util.Set<Scope> getAllMultiEdgesBetween(java.util.Collection<Scope> edgeList, ElementGraph current)
public static void replaceElementWith(ElementGraph elementGraph, FlowElement replace, FlowElement replaceWith)
public static Pipe findFirstPipeNamed(ElementGraph elementGraph, java.lang.String name)
public static Pipe findLastPipeNamed(ElementGraph elementGraph, java.lang.String name)
public static boolean removeBranchContaining(ElementGraph elementGraph, FlowElement flowElement)
public static boolean removeBranchBetween(ElementGraph elementGraph, FlowElement first, FlowElement second, boolean inclusive)
public static int shortestDistance(ElementGraph graph, FlowElement lhs, FlowElement rhs)
Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.