# UndirectedEdge | data-structure-typed
Documentation for data-structure-typed

# Class UndirectedEdge<T>

#### Type Parameters

- #### T = number

#### Hierarchy

- AbstractEdge <T>
  - UndirectedEdge

- Defined in src/data-structures/graph/undirected-graph.ts:26

#####
Index

### Constructors

constructor

### Properties

_hashCode
_vertices

### Accessors

hashCode
val
vertices
weight

### Methods

_setHashCode

## Constructors

### constructor

- new UndirectedEdge<T>(v1, v2, weight?, val?): UndirectedEdge <T>

- The constructor function creates an instance of a class with two vertex IDs, an optional weight, and an optional value.

  #### Type Parameters

  - #### T = number

  #### Parameters

  - ##### v1: VertexId

    The first vertex ID of the edge.

  - ##### v2: VertexId

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

  - ##### `Optional` weight: number

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

  - ##### `Optional` val: T

    The "val" parameter is an optional parameter of type T. It is used to store a value associated with the edge.

  #### Returns UndirectedEdge <T>

  Overrides AbstractEdge.constructor

  - Defined in src/data-structures/graph/undirected-graph.ts:37

## Properties

### `Protected` _hashCode

_hashCode: string

Inherited from AbstractEdge._hashCode

- Defined in src/data-structures/graph/abstract-graph.ts:83

### `Private` _vertices

_vertices: [ VertexId , VertexId ]

- Defined in src/data-structures/graph/undirected-graph.ts:42

## Accessors

### hashCode

- get hashCode(): string

- #### Returns string

  Inherited from AbstractEdge.hashCode

  - Defined in src/data-structures/graph/abstract-graph.ts:85

### val

- get val(): undefined | T

- #### Returns undefined | T

  Inherited from AbstractEdge.val

  - Defined in src/data-structures/graph/abstract-graph.ts:65
- set val(value): void

- #### Parameters

  - ##### value: undefined | T

  #### Returns void

  Inherited from AbstractEdge.val

  - Defined in src/data-structures/graph/abstract-graph.ts:69

### vertices

- get vertices(): [ VertexId , VertexId ]

- #### Returns [ VertexId , VertexId ]

  - Defined in src/data-structures/graph/undirected-graph.ts:44
- set vertices(v): void

- #### Parameters

  - ##### v: [ VertexId , VertexId ]

  #### Returns void

  - Defined in src/data-structures/graph/undirected-graph.ts:48

### weight

- get weight(): number

- #### Returns number

  Inherited from AbstractEdge.weight

  - Defined in src/data-structures/graph/abstract-graph.ts:75
- set weight(v): void

- #### Parameters

  - ##### v: number

  #### Returns void

  Inherited from AbstractEdge.weight

  - Defined in src/data-structures/graph/abstract-graph.ts:79

## Methods

### `Protected` _setHashCode

- _setHashCode(v): void

- The function sets the value of the _hashCode property to the provided string.

  #### Parameters

  - ##### v: string

    The parameter "v" is of type string and represents the value that will be assigned to the "_hashCode" property.

  #### Returns void

  Inherited from AbstractEdge._setHashCode

  - Defined in src/data-structures/graph/abstract-graph.ts:99

Generated using TypeDoc