Uses of Class
com.amalgamasimulation.graph.Graph.Node
Packages that use Graph.Node
Package
Description
-
Uses of Graph.Node in com.amalgamasimulation.geometry
Methods in com.amalgamasimulation.geometry with parameters of type Graph.NodeModifier 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.Node in com.amalgamasimulation.graph
Fields in com.amalgamasimulation.graph declared as Graph.NodeFields in com.amalgamasimulation.graph with type parameters of type Graph.NodeMethods in com.amalgamasimulation.graph that return Graph.NodeModifier and TypeMethodDescriptionAdds a node containing the specified value to the graph.Graph.Arc.getDest()Returns the destination node of the arc.GraphPath.getFirstNode()Returns the first node of this path.GraphPath.getLastNode()Returns the last node of this path.Returns a graph node containing the specified value.Returns a path node containing the specified value.Graph.Arc.getSource()Returns the source node of the arc.Methods in com.amalgamasimulation.graph that return types with arguments of type Graph.NodeModifier and TypeMethodDescriptionAlgorithm.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.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.Graph.getNodes()Returns unmodifiable list of all nodes in the graph.GraphPath.getNodes()Returns an unmodifiable list of nodes of this path.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.Methods in com.amalgamasimulation.graph with parameters of type Graph.NodeModifier and TypeMethodDescriptionAdds the specified node to this path if this path is empty, otherwise throws aIllegalArgumentException.Algorithm.GraphTraversalContextCalculator.calculateNextNodeContext(Graph<A, B>.Arc addedArc, Graph<A, B>.Node addedNode, Algorithm.ArcRelativeDirection addedArcDirection, C prevNodeContext) Function answering the question "What must be the context of the node being added considering we know the added arc, the added node itself, and the context of the already traversed node adjacent to this arc?"static <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.booleanAlgorithm.GraphTraversalPredicate.canAddArcAndNode(Graph<A, B>.Arc addedArc, Graph<A, B>.Node addedNode, Algorithm.ArcRelativeDirection addedArcDirection) Predicate answering the question "Can we traverse the arc and the node adjacent to this arc?"booleanGraph.containsNode(Graph<N, A>.Node node) Checks if the graph contains the specified node.booleanAlgorithm.GraphTraversalEndPredicate.endTraversalAfter(Graph<A, B>.Arc addedArc, Graph<A, B>.Node addedNode, C addedNodeContext) Predicate answering the question "Must we end the traversal after we added the specific arc, node and calculated the specific node context?"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> Returns the first found, not necessarily the shortest one, path between the specified source and destination nodes in the given graph.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.GraphPath.getNextArc(Graph<N, A>.Node node) Returns the arc that follows the specified node in this path.GraphPath.getPrevArc(Graph<N, A>.Node node) Returns the arc that precedes the specified node in this path.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.booleanGraph.removeNode(Graph<N, A>.Node node) Attempts to remove the specified node from the graph.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.static <A,B, C> C Algorithm.traverse(Graph<A, B>.Node sourceNode, C sourceContext, Algorithm.GraphTraversalPredicate<A, B> traversedArcPredicate, Algorithm.GraphTraversalContextCalculator<A, B, C> recalculateNodeContext, Algorithm.GraphTraversalEndPredicate<A, B, C> endTraversalPredicate) Traverses the graph starting from the specified sourceNode by adding the arcs and nodes allowed by traversedArcPredicate until all reachable nodes are traversed or the specified endTraversalPredicate evaluated totrue.Method parameters in com.amalgamasimulation.graph with type arguments of type Graph.NodeModifier 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.getBarrierArcs(Set<Graph<A, B>.Node> insignificantNodes, Set<Graph<A, B>.Arc> insignificantArcs) 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) 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.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.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, 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) 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, 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, 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.intGraph.removeAllNodes(Collection<Graph<N, A>.Node> nodesToRemove) Attempts to remove all specified nodes from the graph and returns number of nodes actually removed.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.Constructors in com.amalgamasimulation.graph with parameters of type Graph.Node -
Uses of Graph.Node in com.amalgamasimulation.graphagent
Fields in com.amalgamasimulation.graphagent with type parameters of type Graph.NodeModifier and TypeFieldDescriptionLongAgent.adjacentAgentsGraphEnvironment.barrierArcsCacheGraphEnvironment.barrierArcsCacheGraphEnvironment.cachedMinTreesWithAgentsGraphEnvironment.cachedMinTreesWithoutAgentsGraphEnvironment.cachedShortestPathsWithAgentsGraphEnvironment.cachedShortestPathsWithAgentsGraphEnvironment.cachedShortestPathsWithoutAgentsGraphEnvironment.cachedShortestPathsWithoutAgentsLongAgent.occupiedNodesMethods in com.amalgamasimulation.graphagent that return Graph.NodeModifier and TypeMethodDescriptionCreates a new graph node with the specified node value and adds it to the graph.GraphAgent.getCurrentNode()Returns the node where this agent is currently located, ornullif this agent is not currently located at a nodeGraphEnvironment.getGraphNode(N nodeValue) Returns graph node (an instance ofGraph.Node) containing the specified value.
GeometricGraphPosition.getNode()Returns the node if this position points to graph node,nullotherwiseMethods in com.amalgamasimulation.graphagent that return types with arguments of type Graph.NodeModifier and TypeMethodDescriptionGraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, int maxNodesCount) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent) Returns the nodes for which the specified predicate returnstruelocated within the specified range from the specified source node.GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, BiFunction<A, K, Double> arcWeighter, BiFunction<N, K, Double> nodeWeighter) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, BiFunction<A, K, Double> arcWeighter, BiFunction<N, K, Double> nodeWeighter, int maxNodesCount) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, Map<Graph<N, A>.Node, Double> outNodeWeights, Set<Graph<N, A>.Arc> outArcsVisited) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, Map<Graph<N, A>.Node, Double> outNodeWeights, Set<Graph<N, A>.Arc> outArcsVisited) GraphEnvironment.getClosestNodes(GeometricGraphPosition<N, A> sourcePosition, Predicate<Graph<N, A>.Node> destNodeIndicator, double range) GraphEnvironment.getClosestNodes(GeometricGraphPosition<N, A> sourcePosition, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, int maxNodesCount) GraphEnvironment.getNodes()Returns an unmodifiable list of all graph nodes.LongAgent.getOccupiedNodes()Returns the unmodifiable list of nodes currently occupied by this long agent.Methods in com.amalgamasimulation.graphagent with parameters of type Graph.NodeModifier and TypeMethodDescriptionprotected voidvoidGraphAgent.afterEnteredNode(Graph<N, A>.Node node) Callback method called immediately after entering a node.voidLongAgent.afterEnteredNode(Graph<N, A>.Node node) voidLongAgent.afterHeadEnteredNode(Graph<N, A>.Node node) Callback method called immediately after the head of this long agent enters a node.voidGraphAgent.beforeExitedNode(Graph<N, A>.Node node) Callback method called before exiting a node.voidLongAgent.beforeExitedNode(Graph<N, A>.Node node) voidLongAgentTail.beforeExitedNode(Graph<N, A>.Node node) voidLongAgent.beforeTailExitedNode(Graph<N, A>.Node node) Callback method called before the tail of this long agent exits a node.protected voidLongAgent.checkNodeForOccupancy(Graph<N, A>.Node node) protected voidGraphAgent.enterNodeInternal(Graph<N, A>.Node node) protected voidLongAgent.enterNodeInternal(Graph<N, A>.Node node) LongAgent.getAdjacentAgents(Graph<N, A>.Node node) Returns list ofLongAgentwhich collided to this agent in the node and are waiting for it to free the node to continue moving.GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, int maxNodesCount) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent) Returns the nodes for which the specified predicate returnstruelocated within the specified range from the specified source node.GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, BiFunction<A, K, Double> arcWeighter, BiFunction<N, K, Double> nodeWeighter) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, BiFunction<A, K, Double> arcWeighter, BiFunction<N, K, Double> nodeWeighter, int maxNodesCount) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, Map<Graph<N, A>.Node, Double> outNodeWeights, Set<Graph<N, A>.Arc> outArcsVisited) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, Map<Graph<N, A>.Node, Double> outNodeWeights, Set<Graph<N, A>.Arc> outArcsVisited) GraphEnvironment.getShortestPath(Graph<N, A>.Node sourceNode, Graph<N, A>.Node destNode, GraphAgent<N, A> agent) Returns the shortest path from the specified source node to the specified destination node for the specified agent, ornullif no such path exists.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) Jumps this agent to the specified node of graph of this agent'sGraphEnvironment.protected voidGraphAgent.jumpToInternal(Graph<N, A>.Node node) Starts moving this agent to the specified node in the graph with the specified velocity along the shortest path from agent's current position.static <N extends GeometricGraphNode,A extends GeometricGraphArc>
GeometricGraphPath<N, A> Creates a new zero-length path consisting only of a position at the specified node.static <N extends GeometricGraphNode,A extends GeometricGraphArc>
GeometricGraphPosition<N, A> Returns an instance ofGeometricGraphPositionpointing to the specified graph node.voidLongAgent.removeNodeAdjacentAgents(Graph<N, A>.Node node) Clear adjacent agents collection in specified node and try to continue movement of adjacent agents.Method parameters in com.amalgamasimulation.graphagent with type arguments of type Graph.NodeModifier and TypeMethodDescriptionGraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, int maxNodesCount) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent) Returns the nodes for which the specified predicate returnstruelocated within the specified range from the specified source node.GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, BiFunction<A, K, Double> arcWeighter, BiFunction<N, K, Double> nodeWeighter) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, BiFunction<A, K, Double> arcWeighter, BiFunction<N, K, Double> nodeWeighter, int maxNodesCount) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, Map<Graph<N, A>.Node, Double> outNodeWeights, Set<Graph<N, A>.Arc> outArcsVisited) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, Map<Graph<N, A>.Node, Double> outNodeWeights, Set<Graph<N, A>.Arc> outArcsVisited) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, Map<Graph<N, A>.Node, Double> outNodeWeights, Set<Graph<N, A>.Arc> outArcsVisited) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, Map<Graph<N, A>.Node, Double> outNodeWeights, Set<Graph<N, A>.Arc> outArcsVisited) GraphEnvironment.getClosestNodes(GeometricGraphPosition<N, A> sourcePosition, Predicate<Graph<N, A>.Node> destNodeIndicator, double range) GraphEnvironment.getClosestNodes(GeometricGraphPosition<N, A> sourcePosition, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, int maxNodesCount) protected AgentGraphPath<N, A> GraphEnvironment.getShortestPath(GeometricGraphPosition<N, A> sourcePosition, Predicate<Graph<N, A>.Node> destNodeIndicator) GraphEnvironment.getShortestPath(GeometricGraphPosition<N, A> sourcePosition, Predicate<Graph<N, A>.Node> destNodeIndicator, GraphAgent<N, A> agent) Returns the shortest path from the specified source position to the closest node on which the specified predicate returnstrue, ornullif no such path exists or the predicate returnsfalsefor all nodes reachable from the source position.protected AgentGraphPath<N, A> 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) Starts movement of the agent from the current position (node or arc) to the specified graph node along the shortest path.protected voidConstructors in com.amalgamasimulation.graphagent with parameters of type Graph.NodeModifierConstructorDescriptionGeometricGraphPosition(Graph<N, A>.Node node) Creates a new position pointing to the specified graph node.Constructor parameters in com.amalgamasimulation.graphagent with type arguments of type Graph.Node -
Uses of Graph.Node in com.amalgamasimulation.trains
Methods in com.amalgamasimulation.trains that return Graph.NodeModifier and TypeMethodDescriptionMethods in com.amalgamasimulation.trains with parameters of type Graph.NodeModifier and TypeMethodDescriptionprotected doubleTrainsEnvironment.getEndMovementTime(List<Graph<RailNode, RailArc>.Arc> arcs, double agentLengthBeforeDestNode, double beginTime, double velocity, double agentLength, Graph<RailNode, RailArc>.Arc beforePathSourceArc, boolean isIncludeArcAfterNode, Graph<RailNode, RailArc>.Node destNode, LongAgentWeightKey weighterKey) TrainsEnvironment.getShortestPath(Graph<RailNode, RailArc>.Node sourceNode, Graph<RailNode, RailArc>.Node destNode) protected doubleTrainsEnvironment.getStartMovementTime(com.amalgamasimulation.trains.TrainsEnvironment.ContextRecord context, double agentLengthBeforeDestNode, double beginTime, double velocity, double agentLength, Graph<RailNode, RailArc>.Arc beforePathSourceArc, boolean isIncludeArcAfterNode, Graph<RailNode, RailArc>.Node destNode, LongAgentWeightKey weighterKey) Method parameters in com.amalgamasimulation.trains with type arguments of type Graph.NodeModifier and TypeMethodDescriptionTrainsEnvironment.getShortestPath(GeometricGraphPosition<RailNode, RailArc> sourcePosition, Predicate<Graph<RailNode, RailArc>.Node> destNodeIndicator)