kotlin-utils
/
loggersoft.kotlin.utils.graph
/
DynamicEdge
Dynamic
Edge
data class
DynamicEdge
<
V
:
Any
, out
E
:
Any
>(startFrom:
V
, endWith:
V
, value:
E
, isOriented:
Boolean
) :
MutableEdge
<
V
,
E
>
Content copied to clipboard
Represents edge with mutable weight.
Author
Alexander Kornilov (akornilov.82@gmail.com).
Constructors
Functions
Properties
Constructors
DynamicEdge
Link copied to clipboard
fun <
V
:
Any
, out
E
:
Any
>
DynamicEdge
(startFrom:
V
, endWith:
V
, value:
E
, isOriented:
Boolean
= true)
Content copied to clipboard
Functions
opposite
Link copied to clipboard
open fun
opposite
(value:
V
):
V
Content copied to clipboard
Returns opposite vertex for
startFrom
or
endWith
values.
weightOrDefault
Link copied to clipboard
open fun
weightOrDefault
(default:
Double
= DefaultWeight):
Double
Content copied to clipboard
Returns weight or
default
if edges don't have weight.
Properties
endWith
Link copied to clipboard
open override val
endWith
:
V
Content copied to clipboard
Vertex where edge ends with.
hasWeight
Link copied to clipboard
open override var
hasWeight
:
Boolean
= true
Content copied to clipboard
Indicates that the edge has weight.
isDynamicWeight
Link copied to clipboard
open override val
isDynamicWeight
:
Boolean
Content copied to clipboard
Indicates that the weight can be changed dynamically.
isOriented
Link copied to clipboard
open override val
isOriented
:
Boolean
= true
Content copied to clipboard
Indicates that the edge is oriented.
startFrom
Link copied to clipboard
open override val
startFrom
:
V
Content copied to clipboard
Vertex where edge starts from.
value
Link copied to clipboard
open override val
value
:
E
Content copied to clipboard
An edge parametrized value.
weight
Link copied to clipboard
open override var
weight
:
Double
Content copied to clipboard
Weight of the edge.