NavigationGraph

interface NavigationGraph<V : Vector<V>, A : Transformation<V>, N : ConvexShape<V, A>, E> : Graph<N, E>

A graph used for navigation purposes. Nodes are ConvexShapes, usually representing portions of an environment which are traversable by agents (the advantage of such representation is that agents can freely walk around within a convex area, as it is guaranteed that no obstacle will be found). Note that implementations of this graph must guarantee predictable ordering for the collections they maintain, as reproducibility is a key feature of Alchemist. Be also aware that, by contract, the org.jgrapht.Graph interface does not allow duplicated edges (see org.jgrapht.Graph.addEdge).

Parameters

V

the Vector type for the space this graph describes.

A

the transformations supported by shapes in this space.

N

the type of nodes (or vertices).

E

the type of edges.

Inheritors

Functions

Link copied to clipboard
abstract fun addEdge(p0: N, p1: N): E
abstract fun addEdge(p0: N, p1: N, p2: E): Boolean
Link copied to clipboard
abstract fun addVertex(): N
abstract fun addVertex(p0: N): Boolean
Link copied to clipboard
abstract fun containsEdge(p0: E): Boolean
abstract fun containsEdge(p0: N, p1: N): Boolean
Link copied to clipboard
abstract fun containsVertex(p0: N): Boolean
Link copied to clipboard
abstract fun degreeOf(p0: N): Int
Link copied to clipboard
abstract fun edgeSet(): MutableSet<E>
Link copied to clipboard
abstract fun edgesOf(p0: N): MutableSet<E>
Link copied to clipboard
abstract fun getAllEdges(p0: N, p1: N): MutableSet<E>
Link copied to clipboard
abstract fun getEdge(p0: N, p1: N): E
Link copied to clipboard
abstract fun getEdgeSource(p0: E): N
Link copied to clipboard
abstract fun getEdgeSupplier(): Supplier<E>
Link copied to clipboard
abstract fun getEdgeTarget(p0: E): N
Link copied to clipboard
abstract fun getEdgeWeight(p0: E): Double
Link copied to clipboard
abstract fun getType(): GraphType
Link copied to clipboard
abstract fun getVertexSupplier(): Supplier<N>
Link copied to clipboard
abstract fun incomingEdgesOf(p0: N): MutableSet<E>
Link copied to clipboard
abstract fun inDegreeOf(p0: N): Int
Link copied to clipboard
open fun iterables(): GraphIterables<N, E>
Link copied to clipboard
open fun nodeContaining(position: V): N?
Link copied to clipboard
abstract fun outDegreeOf(p0: N): Int
Link copied to clipboard
abstract fun outgoingEdgesOf(p0: N): MutableSet<E>
Link copied to clipboard
fun <V> Graph<V, *>.pathExists(source: V, sink: V): Boolean

Checks whether a path exists between source and sink. DijkstraShortestPath is used instead of org.jgrapht.alg.connectivity.ConnectivityInspector.pathExists, because, in case of directed graph, the latter checks whether the given vertices lay in the same weakly connected component, which is not the desired behavior. As unweighted graphs have a default edge weight of 1.0, shortest path algorithms can always be applied meaningfully.

Link copied to clipboard
abstract fun removeAllEdges(p0: MutableCollection<out E>): Boolean
abstract fun removeAllEdges(p0: N, p1: N): MutableSet<E>
Link copied to clipboard
Link copied to clipboard
abstract fun removeEdge(p0: E): Boolean
abstract fun removeEdge(p0: N, p1: N): E
Link copied to clipboard
abstract fun removeVertex(p0: N): Boolean
Link copied to clipboard
abstract fun setEdgeWeight(p0: E, p1: Double)
open fun setEdgeWeight(p0: N, p1: N, p2: Double)
Link copied to clipboard
abstract fun vertexSet(): MutableSet<N>