DynamicEdge

data class DynamicEdge<V : Any, out E : Any>(startFrom: V, endWith: V, value: E, isOriented: Boolean) : MutableEdge<V, E>

Represents edge with mutable weight.

Author

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

Constructors

DynamicEdge
Link copied to clipboard
fun <V : Any, out E : Any> DynamicEdge(startFrom: V, endWith: V, value: E, isOriented: Boolean = true)

Functions

opposite
Link copied to clipboard
open fun opposite(value: V): V
Returns opposite vertex for startFrom or endWith values.
weightOrDefault
Link copied to clipboard
open fun weightOrDefault(default: Double = DefaultWeight): Double
Returns weight or default if edges don't have weight.

Properties

endWith
Link copied to clipboard
open override val endWith: V
Vertex where edge ends with.
hasWeight
Link copied to clipboard
open override var hasWeight: Boolean = true
Indicates that the edge has weight.
isDynamicWeight
Link copied to clipboard
open override val isDynamicWeight: Boolean
Indicates that the weight can be changed dynamically.
isOriented
Link copied to clipboard
open override val isOriented: Boolean = true
Indicates that the edge is oriented.
startFrom
Link copied to clipboard
open override val startFrom: V
Vertex where edge starts from.
value
Link copied to clipboard
open override val value: E
An edge parametrized value.
weight
Link copied to clipboard
open override var weight: Double
Weight of the edge.