Class UndirectedEdge

Hierarchy

Constructors

  • The constructor function initializes an instance of a class with two vertex IDs and an optional weight.

    Parameters

    • v1: VertexId

      The parameter v1 is of type VertexId and represents the first vertex in the edge.

    • v2: VertexId

      The parameter v2 is a VertexId, which represents the identifier of the second vertex in a graph.

    • Optional weight: number

      The weight parameter is an optional number that represents the weight of the edge between two vertices.

    Returns UndirectedEdge

Properties

_hashCode: string
_vertices: [VertexId, VertexId]
_weight: number

Accessors

Methods

  • Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.

    Returns [VertexId, VertexId]

Generated using TypeDoc