Uses of Class
com.amalgamasimulation.graph.Graph
Packages that use Graph
Package
Description
-
Uses of Graph in com.amalgamasimulation.geometry
Methods in com.amalgamasimulation.geometry with parameters of type GraphModifier and TypeMethodDescriptionstatic <N,A> void GeometryUtil.groupAroundNode(Graph<N, A> graph, Graph<N, A>.Node groupingNode, double radius, Function<N, Point> pointExtractor, Function<A, Polyline> polylineExtractor, BiFunction<A, Polyline, A> newArcValueSupplier) Deprecated. -
Uses of Graph in com.amalgamasimulation.graph
Methods in com.amalgamasimulation.graph that return types with arguments of type GraphModifier and TypeMethodDescriptionAlgorithm.getFragments(Graph<A, B> graph) Returns all fragments (i.e.Methods in com.amalgamasimulation.graph with parameters of type GraphModifier and TypeMethodDescriptionstatic <A,B> GraphPath <A, B> Algorithm.calculateShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Graph<A, B>.Node destNode, Map<Graph<A, B>.Node, Double> outNodeWeights, Set<Graph<A, B>.Arc> outArcsVisited) Calculates shortest path between the two specified nodes having data about nodes of the minimal spanning tree and arcs of the minimal spanning tree, i.e.Algorithm.getClosestNodes(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Predicate<Graph<A, B>.Node> destNodeIndicator, double range, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter) Returns list of pairs of nodes and distances to them from the specified source node satisfying the condition determined by the specified indicator.Algorithm.getClosestNodes(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Predicate<Graph<A, B>.Node> destNodeIndicator, double range, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter, int maxNodesCount) Returns list of pairs of nodes and distances to them from the specified source node satisfying the condition determined by the specified indicator.Algorithm.getClosestNodes(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Predicate<Graph<A, B>.Node> destNodeIndicator, double range, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter, Map<Graph<A, B>.Node, Double> outNodeWeights, Set<Graph<A, B>.Arc> outArcsVisited) Returns list of pairs of nodes and distances to them from the specified source node satisfying the condition determined by the specified indicator.Algorithm.getClosestNodes(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Predicate<Graph<A, B>.Node> destNodeIndicator, double range, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter, Map<Graph<A, B>.Node, Double> outNodeWeights, Set<Graph<A, B>.Arc> outArcsVisited, int maxNodesCount) Returns list of pairs of nodes and distances to them from the specified source node satisfying the condition determined by the specified indicator.static <A,B> GraphPath <A, B> Algorithm.getFirstCycle(Graph<A, B> graph) Returns first found cycle in the specified graph.static <A,B> GraphPath <A, B> Returns the first found, not necessarily the shortest one, path between the specified source and destination nodes in the given graph.Algorithm.getFragments(Graph<A, B> graph) Returns all fragments (i.e.Algorithm.getInsignificantNodesAndArcs(Graph<A, B> graph, Set<Graph<A, B>.Node> significantNodes) Returns the pair containing sets of insignificant nodes and arcs of the specified graph against the specified set of significant nodes.Algorithm.getInsignificantNodesAndArcs(Graph<A, B> graph, Set<Graph<A, B>.Node> significantNodes, Set<Graph<A, B>.Arc> barrierArcs) Returns the pair containing sets of insignificant nodes and arcs of the specified graph against the specified set of significant nodes.Algorithm.getMinPathWithContext(Graph<A, B> graph, Graph<A, B>.Node sourceNode, BiPredicate<Graph<A, B>.Node, T> searchSuccessPredicate, T sourceNodeContext, BiFunction<T, Graph<A, B>.Arc, T> contextProvider, Comparator<T> contextComparator) Returns a minimal-context path in the graph using a context-aware variant of Dijkstra’s algorithm.static <A,B> GraphPath <A, B> Algorithm.getShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Graph<A, B>.Node destNode, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter) Returns shortest path between the two specified graph nodes.static <A,B> GraphPath <A, B> Algorithm.getShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Graph<A, B>.Node destNode, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter, double range) Returns shortest path between the two specified graph nodes if the total weight of such path does not exceed the specified range.static <A,B> GraphPath <A, B> Algorithm.getShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Graph<A, B>.Node destNode, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter, Map<Graph<A, B>.Node, Double> outNodeWeights, Set<Graph<A, B>.Arc> outArcsVisited) Returns shortest path between the two specified graph nodes.static <A,B> GraphPath <A, B> Algorithm.getShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Graph<A, B>.Node destNode, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter, Map<Graph<A, B>.Node, Double> outNodeWeights, Set<Graph<A, B>.Arc> outArcsVisited, double range) Returns shortest path between the two specified graph nodes if the total weight of such path does not exceed the specified range.static <A,B> GraphPath <A, B> Algorithm.getShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Predicate<Graph<A, B>.Node> destNodeIndicator, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter) Returns shortest path from the specified graph node to the closest graph node satisfying the condition determined by the specified indicator.static <A,B> GraphPath <A, B> Algorithm.getShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Predicate<Graph<A, B>.Node> destNodeIndicator, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter, double range) Returns shortest path from the specified graph node to the closest graph node satisfying the condition determined by the specified indicator if the total weight of such path does not exceed the specified range.static <A,B> GraphPath <A, B> Algorithm.getShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Predicate<Graph<A, B>.Node> destNodeIndicator, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter, Map<Graph<A, B>.Node, Double> outNodeWeights, Set<Graph<A, B>.Arc> outArcsVisited) Returns shortest path from the specified graph node to the closest graph node satisfying the condition determined by the specified indicator.static <A,B> GraphPath <A, B> Algorithm.getShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Predicate<Graph<A, B>.Node> destNodeIndicator, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter, Map<Graph<A, B>.Node, Double> outNodeWeights, Set<Graph<A, B>.Arc> outArcsVisited, double range) Returns shortest path from the specified graph node to the closest graph node satisfying the condition determined by the specified indicator, if the total weight of such path does not exceed the specified range.static <A,B> GraphPath <A, B> Algorithm.getShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, Predicate<Graph<A, B>.Node> destNodeIndicator, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter, Map<Graph<A, B>.Node, Double> outNodeWeights, Set<Graph<A, B>.Arc> outArcsVisited, Set<Graph<A, B>.Arc> barrierArcs, double range) Returns shortest path from the specified graph node to the closest graph node satisfying the condition determined by the specified indicator.static <A,B> GraphPath <A, B> Algorithm.getShortestPath(Graph<A, B> graph, Graph<A, B>.Node sourceNode, List<Predicate<Graph<A, B>.Node>> destNodeIndicators, Function<Graph<A, B>.Arc, Double> arcWeighter, Function<Graph<A, B>.Node, Double> nodeWeighter) Returns shortest path from the specified graph node through nodes specified by indicators.Algorithm.getTreeNodesByLevels(Graph<A, B> graph) Groups the nodes of the specified oriented tree by levels.Algorithm.topologicalSort(Graph<A, B> graph, Graph<A, B>.Node rootNode) Performs topological sorting of the graph with respect to the specified root node and returns a map containing mapping from graph nodes to integer numbers.Algorithm.topologicalSort(Graph<A, B> graph, List<Graph<A, B>.Node> rootNodes) Performs topological sorting of the graph with respect to the specified root nodes and returns a map containing mapping from graph nodes to integer numbers. -
Uses of Graph in com.amalgamasimulation.graphagent
Fields in com.amalgamasimulation.graphagent declared as GraphMethods in com.amalgamasimulation.graphagent that return GraphModifier and TypeMethodDescriptionGraphEnvironment.getGraph()Returns the graph of this graph environment.Methods in com.amalgamasimulation.graphagent with parameters of type GraphModifier and TypeMethodDescriptionbooleanGeometricGraphPath.containsPositionOrReverse(GeometricGraphPosition<N, A> position, Graph<N, A> graph) Checks whether this path contains the specified position, i.e.booleanGeometricGraphPosition.equalsOrAdjacent(GeometricGraphPosition<N, A> otherPosition, Graph<N, A> graph) Returnstrueif this position is equal to or adjacent with the specified position,falseotherwise.booleanGeometricGraphPosition.equalsOrReverse(GeometricGraphPosition<N, A> otherPosition, Graph<N, A> graph) Returnstrueif this position is equal to either the specified position or the reverse position of the specified one, andfalseotherwiseGeometricGraphPosition.getAdjacent(Graph<N, A> graph) Returns the list of positions that are adjacent to this position, including this same position.GeometricGraphPath.getIntersection(GeometricGraphPath<N, A> otherPath, Graph<N, A> graph) Returns a list of sub-paths representing fragments of this path where it intersects with the specified other path.GeometricGraphPath.getIntersectionIgnoreDirection(GeometricGraphPath<N, A> otherPath, Graph<N, A> graph) Returns a list of sub-paths representing fragments of this path where it intersects with the specified other path.GeometricGraphPath.getIntersectionOffsetsIgnoreDirection(GeometricGraphPath<N, A> otherPath, Graph<N, A> graph) Returns anIntervalSetinstance representing intervals of absolute offsets where this path intersects with the specified other path.GeometricGraphPosition.getReverse(Graph<N, A> graph) Returns the position pointing to the corresponding point of the reverse arcAgentGraphPath.getReversePath(Graph<N, A> graph) GeometricGraphPath.getReversePath(Graph<N, A> graph) Returns a reverse path of this path, i.e.GraphEnvironment.getShortestPathBetweenNodesInternal(Graph<N, A> graph, Graph<N, A>.Node sourceNode, Graph<N, A>.Node destNode, Function<Graph<N, A>.Arc, Double> arcWeighter, Function<Graph<N, A>.Node, Double> nodeWeighter, Map<Graph<N, A>.Node, Double> nodeWeights, Set<Graph<N, A>.Arc> arcsVisited, GraphAgent<N, A> agent) booleanGeometricGraphPath.hasNonZeroIntersectionIgnoreDirection(GeometricGraphPath<N, A> otherPath, Graph<N, A> graph) Checks whether this path has a non-zero length intersection with the specified other path, ignoring the direction of the paths' arcs.booleanGeometricGraphPosition.isOnSameOrReverseArc(GeometricGraphPosition<N, A> otherPosition, Graph<N, A> graph) Returnstrueif this position points to a place on the same or reverse arc with the specified arc.Constructors in com.amalgamasimulation.graphagent with parameters of type GraphModifierConstructorDescriptionAgentGraphPath(GeometricGraphPath<N, A> geometricGraphPath, boolean requiresTurnAtSource, boolean requiresTurnDestSource, Graph<N, A> graph)