PolygonalChain

open class PolygonalChain<P : Position<*>>(val points: List<P>) : Route<P>

Abstract route implementation.

Parameters

the type of position that the route is composed

Inheritors

Constructors

Link copied to clipboard
constructor(vararg positions: P)
constructor(points: List<P>)

Properties

Link copied to clipboard
open override val points: List<P>

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun getPoint(step: Int): P
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open operator override fun iterator(): Iterator<P>
Link copied to clipboard
open override fun length(): Double
Link copied to clipboard
fun <R> Iterable<R>.randomElement(randomGenerator: <Error class: unknown class>): R

Returns a random element of the Iterable using the provided randomGenerator.

Link copied to clipboard
fun <R> Iterable<R>.shuffled(randomGenerator: <Error class: unknown class>): Iterable<R>

Fisher–Yates shuffle algorithm using a RandomGenerator. More information on Wikipedia.

Link copied to clipboard
open override fun size(): Int
Link copied to clipboard
open fun stream(): Stream<P>
Link copied to clipboard
open override fun toString(): String

Prints the class name and the list of positions.