BaseNavigationGraph

open class BaseNavigationGraph<V : Vector<V>, A : Transformation<V>, N : ConvexShape<V, A>, E>(vertexSupplier: Supplier<N>?, edgeSupplier: Supplier<E>?, graphType: <Error class: unknown class>) : NavigationGraph<V, A, N, E>

An implementation of NavigationGraph, deriving from AbstractBaseGraph. The user can specify the GraphType so as to obtain a custom graph (e.g. weighted or not, directed or undirected, etc). AbstractBaseGraph guarantees deterministic ordering for the collection it maintains, as stated in its api documentation. Note that vertices and edges are used as keys inside AbstractBaseGraph, so when choosing their types, you must follow these rules:

  • You must follow the contract defined in java.lang.Object for both equals and hashCode.

  • In particular, if you override either equals or hashCode, you must override them both.

  • Your implementation for hashCode must produce a value which does not change over the lifetime of the object. Further information available here.

Inheritors

Constructors

Link copied to clipboard
constructor(edgeClass: Class<out E>, directed: Boolean)
constructor(vertexSupplier: Supplier<N>?, edgeSupplier: Supplier<E>?, graphType: <Error class: unknown class>)

Functions

Link copied to clipboard
open fun nodeContaining(position: V): N?