fivem-ts

a library to speed up the development of Fivem scripts and frameworks


Project maintained by Purpose-Dev Hosted on GitHub Pages — Theme by mattgraham

fivem-ts - Documentation v0.7.5Docs


fivem-ts - Documentation v0.7.5 / Shared / GraphEdge

Class: GraphEdge<T>

Represents an edge in a graph structure.

Type Parameters

T

The type of the node.

Implements

Constructors

new GraphEdge()

new GraphEdge<T>(source, destination, weight): GraphEdge<T>

Parameters

source: IGraphNode<T>

destination: IGraphNode<T>

weight: number = 1

Returns

GraphEdge<T>

Defined in

shared/ds/graph/GraphEdge.ts:9

Methods

getDestination()

getDestination(): IGraphNode<T>

Retrieves the destination IGraphNode for the current instance.

Returns

IGraphNode<T>

The destination node.

Implementation of

IGraphEdge.getDestination

Defined in

shared/ds/graph/GraphEdge.ts:29


getSource()

getSource(): IGraphNode<T>

Retrieves the source node of the graph.

Returns

IGraphNode<T>

The source graph node.

Implementation of

IGraphEdge.getSource

Defined in

shared/ds/graph/GraphEdge.ts:20


getWeight()

getWeight(): number

Retrieves the weight of the object.

Returns

number

The weight of the object.

Implementation of

IGraphEdge.getWeight

Defined in

shared/ds/graph/GraphEdge.ts:38