Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a weighted and directed connection from one vertex to another.

Hierarchy

  • Edge

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Edge(from: string, to: string, weight: number): Edge
  • Creates a new weighted edge connecting two vertices.

    Parameters

    • from: string

      The origin vertex.

    • to: string

      The destination vertex.

    • weight: number

      The weight of the edge.

    Returns Edge

Properties

from

from: string

The origin vertex id.

to

to: string

The destination vertex id.

weight

weight: number

The weight value.

Methods

setWeight

  • setWeight(weight: number): void
  • Sets the edge weight to the current value.

    Parameters

    • weight: number

      The new weight value.

    Returns void

Generated using TypeDoc