Package loggersoft.kotlin.utils.graph

Types

AbstractEdge
Link copied to clipboard
interface AbstractEdge
Represents the abstract value of a graph.
Analyst
Link copied to clipboard
interface Analyst<V : Any, E : Any>
Represents an interface of analytic operations with a graph.
DynamicEdge
Link copied to clipboard
data class DynamicEdge<V : Any, out E : Any>(startFrom: V, endWith: V, value: E, isOriented: Boolean) : MutableEdge<V, E>
Represents edge with mutable weight.
Edge
Link copied to clipboard
interface Edge<V : Any, out E : Any> : AbstractEdge
Represents interface of a graph's edge based on AbstractEdge.
ExternalEdge
Link copied to clipboard
data class ExternalEdge<V : Any, out E : AbstractEdge>(startFrom: V, endWith: V, value: E) : Edge<V, E> , AbstractEdge
Represents edge with value which implements AbstractEdge interface.
Graph
Link copied to clipboard
interface Graph<V : Any, E : Any> : Cloneable
Represents a graph.
MutableEdge
Link copied to clipboard
interface MutableEdge<V : Any, out E : Any> : Edge<V, E>
Represents interface of a mutable edge.
MutableGraph
Link copied to clipboard
interface MutableGraph<V : Any, E : Any> : Graph<V, E>
Represents a mutable graph.
Path
Link copied to clipboard
interface Path<V : Any, E : Any> : IndexList<Pair<V, Edge<V, E>>> , Comparable<Path<V, E>>
Represents a path in a graph.
StaticEdge
Link copied to clipboard
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.
Vertex
Link copied to clipboard
interface Vertex<V : Any, out E : Any>
Represents interface of a graph's vertex.

Functions

analystOf
Link copied to clipboard
inline fun <V : Any, E : Any> analystOf(vararg edges: Edge<V, E>): Analyst<V, E>
Creates graph and analyst by edges.
fun <V : Any, E : Any> analystOf(graph: Graph<V, E>): Analyst<V, E>
Creates analyst for specified graph.
edge
Link copied to clipboard
inline fun <V : Any, E : AbstractEdge> edge(startFrom: V, endWith: V, value: E): Edge<V, E>
Creates a custom edge.
inline fun <V : Any, E : Any> edge(startFrom: V, endWith: V, value: E, isOriented: Boolean = true, hasWeight: Boolean = true, weight: Double = Edge.DefaultWeight): Edge<V, E>
Creates a static edge.
graphOf
Link copied to clipboard
fun <V : Any, E : Any> graphOf(vararg edges: Edge<V, E>): Graph<V, E>
Creates a mutable graph by edges.
mutableGraphOf
Link copied to clipboard
fun <V : Any, E : Any> mutableGraphOf(): MutableGraph<V, E>
Creates an empty mutable graph.
fun <V : Any, E : Any> mutableGraphOf(vararg values: V): MutableGraph<V, E>
Creates a mutable graph with vertexes.
fun <V : Any, E : Any> mutableGraphOf(vararg edges: Edge<V, E>): MutableGraph<V, E>
Creates a mutable graph by edges.