StaticEdge

data class StaticEdge<V : Any, out E : Any>(startFrom: V, endWith: V, value: E, isOriented: Boolean, hasWeight: Boolean, weight: Double) : Edge<V, E>

Represents a regular edge.

Author

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

Constructors

StaticEdge
Link copied to clipboard
fun <V : Any, out E : Any> StaticEdge(startFrom: V, endWith: V, value: E, isOriented: Boolean = true, hasWeight: Boolean = true, weight: Double = Edge.DefaultWeight)

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 val hasWeight: Boolean = true
Indicates that the edge has weight.
isDynamicWeight
Link copied to clipboard
open override val isDynamicWeight: Boolean = false
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 val weight: Double
Weight of the edge.