Path

interface Path<V : Any, E : Any> : IndexList<Pair<V, Edge<V, E>>> , Comparable<Path<V, E>>

Represents a path in a graph.

Author

Alexander Kornilov (akornilov.82@gmail.com).

Functions

compareTo
Link copied to clipboard
abstract operator fun compareTo(other: Path<V, E>): Int
component1
Link copied to clipboard
open operator fun component1(): V
component2
Link copied to clipboard
open operator fun component2(): V
contains
Link copied to clipboard
open operator fun contains(value: V): Boolean
Returns true if path contains value of a vertex; false otherwise.
forEach
Link copied to clipboard
open fun forEach(p0: Consumer<in Pair<V, Edge<V, E>>>)
get
Link copied to clipboard
abstract operator fun get(index: Int): Pair<V, Edge<V, E>>
Returns list item by index.
iterator
Link copied to clipboard
abstract operator fun iterator(): Iterator<Pair<V, Edge<V, E>>>
spliterator
Link copied to clipboard
open fun spliterator(): Spliterator<Pair<V, Edge<V, E>>>

Properties

edges
Link copied to clipboard
abstract val edges: List<Edge<V, E>>
A list of edges in the path from beginning to the end.
endWith
Link copied to clipboard
abstract val endWith: V
An end of the path.
size
Link copied to clipboard
abstract val size: Int
The size of the list.
startFrom
Link copied to clipboard
abstract val startFrom: V
A begin of the path.
weight
Link copied to clipboard
abstract val weight: Double
A total weight of the path.