Class JGraphTUtils
java.lang.Object
org.aksw.jena_sparql_api.sparql_path2.JGraphTUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <V,E> void addSuperVertex(org.jgrapht.Graph<V, E> graph, V vertex, Set<V> conns, boolean reverse) Given a pair of predicates for fwd and backwards direction create a new pair of those that can reach the targetstatic <V,E> void addSuperVertex(org.jgrapht.Graph<V, E> graph, V vertex, Set<V> fwdConns, Set<V> bwdConns) Given a set of predicates and a direction, return the set of predicates that can reach the targetstatic <V,E> void addSuperVertex(org.jgrapht.Graph<V, E> graph, V vertex, V conn, boolean reverse) static <V,E> List<NestedPath<V, E>> getAllPaths(org.jgrapht.Graph<V, E> graph, Collection<V> starts, Collection<V> ends) static <V,E> List<NestedPath<V, E>> getAllPaths(org.jgrapht.Graph<V, E> graph, V start, V end) static <V,E> Set<E> resolveTransitions(org.jgrapht.Graph<V, E> graph, Predicate<E> isEpsilon, Collection<V> vertices, boolean reverse) static <V,E> Set<E> resolveTransitions(org.jgrapht.Graph<V, E> graph, Predicate<E> isEpsilon, V vertex, boolean reverse) Returns the set of non-epsilon edges reachable via epsilon transitions from the given vertex // Check if a state is implicitly final if it has an epsilon transition to a final statestatic <V,E> Set<V> sources(org.jgrapht.Graph<V, E> graph, Collection<E> edges) static <V,E> Set<V> targets(org.jgrapht.Graph<V, E> graph, Collection<E> edges) static <V,E> org.aksw.commons.util.triplet.Triplet<V, E> toTriplet(org.jgrapht.Graph<V, E> graph, E edge) static <V,E> Set<V> transitiveGet(org.jgrapht.Graph<V, E> graph, Set<V> startVertices, int mode, Predicate<E> isEpsilon) static <V,E> Set<V> transitiveGet(org.jgrapht.Graph<V, E> graph, V startVertex, int mode, Predicate<E> edgeFilter) Simple transitive get function that retrieves all nodes reachable via edges for which the predicate evaluates to true
-
Constructor Details
-
JGraphTUtils
public JGraphTUtils()
-
-
Method Details
-
toTriplet
public static <V,E> org.aksw.commons.util.triplet.Triplet<V,E> toTriplet(org.jgrapht.Graph<V, E> graph, E edge) -
getAllPaths
public static <V,E> List<NestedPath<V,E>> getAllPaths(org.jgrapht.Graph<V, E> graph, Collection<V> starts, Collection<V> ends) -
getAllPaths
public static <V,E> List<NestedPath<V,E>> getAllPaths(org.jgrapht.Graph<V, E> graph, V start, V end) -
targets
-
sources
-
transitiveGet
-
transitiveGet
public static <V,E> Set<V> transitiveGet(org.jgrapht.Graph<V, E> graph, V startVertex, int mode, Predicate<E> edgeFilter) Simple transitive get function that retrieves all nodes reachable via edges for which the predicate evaluates to true- Parameters:
graph-startVertex-mode-edgeFilter-- Returns:
-
resolveTransitions
public static <V,E> Set<E> resolveTransitions(org.jgrapht.Graph<V, E> graph, Predicate<E> isEpsilon, Collection<V> vertices, boolean reverse) -
resolveTransitions
public static <V,E> Set<E> resolveTransitions(org.jgrapht.Graph<V, E> graph, Predicate<E> isEpsilon, V vertex, boolean reverse) Returns the set of non-epsilon edges reachable via epsilon transitions from the given vertex // Check if a state is implicitly final if it has an epsilon transition to a final state -
addSuperVertex
public static <V,E> void addSuperVertex(org.jgrapht.Graph<V, E> graph, V vertex, Set<V> fwdConns, Set<V> bwdConns) Given a set of predicates and a direction, return the set of predicates that can reach the target -
addSuperVertex
public static <V,E> void addSuperVertex(org.jgrapht.Graph<V, E> graph, V vertex, Set<V> conns, boolean reverse) Given a pair of predicates for fwd and backwards direction create a new pair of those that can reach the target -
addSuperVertex
public static <V,E> void addSuperVertex(org.jgrapht.Graph<V, E> graph, V vertex, V conn, boolean reverse)
-