cascading.flow.planner.graph

## Class ElementGraphs

- java.lang.Object
- - cascading.flow.planner.graph.ElementGraphs

-     public class ElementGraphs
      extends java.lang.Object

  Class ElementGraphs maintains a collection of operations that can be performed on an `ElementGraph`.

- - ### Method Summary

    Methods
    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> java.util.Map<java.lang.String,F>` | `asSinkMap(ElementGraph elementGraph, java.util.Set<F> elements)`
    `static <F extends FlowElement> java.util.Map<java.lang.String,F>` | `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> java.util.Set<F>` | `findSinks(ElementGraph elementGraph, java.lang.Class<F> type)`
    `static java.util.Set<Tap>` | `findSources(ElementGraph elementGraph)`
    `static <F extends FlowElement> java.util.Set<F>` | `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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### asFlowElementGraph

          public static FlowElementGraph asFlowElementGraph(PlatformInfo platformInfo,
                                            FlowStepGraph flowStepGraph)

    - #### asElementDirectedGraph

          public static ElementDirectedGraph asElementDirectedGraph(java.util.Collection<ElementGraph> elementGraphs)

    - #### asElementMultiGraph

          public static ElementMultiGraph asElementMultiGraph(java.util.Collection<ElementGraph> elementGraphs)

    - #### isEmpty

          public static boolean isEmpty(ElementGraph elementGraph)

    - #### directed

          public static org.jgrapht.DirectedGraph<FlowElement,Scope> directed(ElementGraph elementGraph)

    - #### annotations

          public static EnumMultiMap<FlowElement> annotations(ElementGraph elementGraph)

    - #### isMultiGraph

          public static boolean isMultiGraph(ElementGraph elementGraph)

    - #### hashCodeIgnoreAnnotations

          public static int hashCodeIgnoreAnnotations(ElementGraph elementGraph)

    - #### hashCodeIgnoreAnnotations

          public static <V,E> int hashCodeIgnoreAnnotations(org.jgrapht.Graph<V,E> graph)

    - #### equalsIgnoreAnnotations

          public static boolean equalsIgnoreAnnotations(ElementGraph lhs,
                                        ElementGraph rhs)

    - #### equalsIgnoreAnnotations

          public static <V,E> boolean equalsIgnoreAnnotations(org.jgrapht.Graph<V,E> lhs,
                                              org.jgrapht.Graph<V,E> rhs)

    - #### equals

          public static boolean equals(ElementGraph lhs,
                       ElementGraph rhs)

    - #### canonicalHash

          public static java.lang.String canonicalHash(ElementGraph graph)

    - #### canonicalHash

          public static java.lang.String canonicalHash(org.jgrapht.Graph<FlowElement,Scope> graph)

    - #### pair

          protected static int pair(int lhs,
                 int rhs)

    - #### getTopologicalIterator

          public static java.util.Iterator<FlowElement> getTopologicalIterator(ElementGraph graph)

    - #### getReverseTopologicalIterator

          public static java.util.Iterator<FlowElement> getReverseTopologicalIterator(ElementGraph graph)

    - #### getAllElementsBetweenExclusive

          public static java.util.Collection<FlowElement> getAllElementsBetweenExclusive(ElementGraph graph,
                                                                         FlowElement from,
                                                                         FlowElement to)

    - #### getAllElementsBetweenInclusive

          public static java.util.Collection<FlowElement> getAllElementsBetweenInclusive(ElementGraph graph,
                                                                         FlowElement from,
                                                                         FlowElement to)

    - #### getAllShortestPathsBetween

          public static java.util.List<org.jgrapht.GraphPath<FlowElement,Scope>> getAllShortestPathsBetween(ElementGraph graph,
                                                                                            FlowElement from,
                                                                                            FlowElement to)

    - #### getAllShortestPathsBetween

          public static <V,E> java.util.List<org.jgrapht.GraphPath<V,E>> getAllShortestPathsBetween(org.jgrapht.DirectedGraph<V,E> graph,
                                                                                    V from,
                                                                                    V to)

    - #### asSubGraph

          public static ElementSubGraph asSubGraph(ElementGraph elementGraph,
                                   ElementGraph contractedGraph,
                                   java.util.Set<FlowElement> excludes)

    - #### asExtentMaskedSubGraph

          public 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.

      If the given ElementGraph does not contain head or tail, it will be returned unchanged.
      Parameters:
        `elementGraph` -
      Returns:

    - #### findClosureViaFloydWarshall

          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)

    - #### findClosureViaFloydWarshall

          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)

    - #### removeAndContract

          public static void removeAndContract(ElementGraph elementGraph,
                               FlowElement flowElement)

    - #### printElementGraph

          public static boolean printElementGraph(java.lang.String filename,
                                  ElementGraph graph,
                                  PlatformInfo platformInfo)

    - #### printProcessGraph

          public static boolean printProcessGraph(java.lang.String filename,
                                  ElementGraph graph,
                                  ProcessGraph<? extends ProcessModel> processGraph)

    - #### insertFlowElementAfter

          public static void insertFlowElementAfter(ElementGraph elementGraph,
                                    FlowElement previousElement,
                                    FlowElement flowElement)

    - #### insertFlowElementBefore

          public static void insertFlowElementBefore(ElementGraph graph,
                                     FlowElement nextElement,
                                     FlowElement flowElement)

    - #### insertFlowElementBetweenEdge

          public static void insertFlowElementBetweenEdge(ElementGraph elementGraph,
                                          Scope previousEdge,
                                          FlowElement newElement)

    - #### asSourceMap

          public static <F extends FlowElement> java.util.Map<java.lang.String,F> asSourceMap(ElementGraph elementGraph,
                                                                              java.util.Set<F> elements)

    - #### findSources

          public static java.util.Set<Tap> findSources(ElementGraph elementGraph)

    - #### findSources

          public static <F extends FlowElement> java.util.Set<F> findSources(ElementGraph elementGraph,
                                                             java.lang.Class<F> type)

    - #### asSinkMap

          public static <F extends FlowElement> java.util.Map<java.lang.String,F> asSinkMap(ElementGraph elementGraph,
                                                                            java.util.Set<F> elements)

    - #### findSinks

          public static <F extends FlowElement> java.util.Set<F> findSinks(ElementGraph elementGraph,
                                                           java.lang.Class<F> type)

    - #### findSinks

          public static java.util.Set<Tap> findSinks(ElementGraph elementGraph)

    - #### findAllGroups

          public static java.util.Set<Group> findAllGroups(ElementGraph elementGraph)

    - #### getAllMultiEdgesBetween

          public static java.util.Set<Scope> getAllMultiEdgesBetween(java.util.Collection<Scope> edgeList,
                                                     ElementGraph current)

    - #### replaceElementWith

          public static void replaceElementWith(ElementGraph elementGraph,
                                FlowElement replace,
                                FlowElement replaceWith)

    - #### findFirstPipeNamed

          public static Pipe findFirstPipeNamed(ElementGraph elementGraph,
                                java.lang.String name)

    - #### findLastPipeNamed

          public static Pipe findLastPipeNamed(ElementGraph elementGraph,
                               java.lang.String name)

    - #### removeBranchContaining

          public static boolean removeBranchContaining(ElementGraph elementGraph,
                                       FlowElement flowElement)

    - #### removeBranchBetween

          public static boolean removeBranchBetween(ElementGraph elementGraph,
                                    FlowElement first,
                                    FlowElement second,
                                    boolean inclusive)

    - #### shortestDistance

          public static int shortestDistance(ElementGraph graph,
                             FlowElement lhs,
                             FlowElement rhs)

      Returns the number of edges found on the shortest distance between the lhs and rhs.

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.