# Class AbstractEdge<V>`Abstract`

#### Type Parameters

- #### V = any

#### Hierarchy

- AbstractEdge
  - DirectedEdge
  - UndirectedEdge

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

#####
Index

### Constructors

constructor

### Properties

_hashCode
_val
_weight

### Accessors

hashCode
val
weight

### Methods

_setHashCode

## Constructors

### `Protected` constructor

- new AbstractEdge<V>(weight?, val?): AbstractEdge<V>

- The above function is a protected constructor that initializes the weight, value, and hash code properties of an object.

  #### Type Parameters

  - #### V = any

  #### Parameters

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

    The `weight` parameter is an optional number that represents the weight of the object. If a value is provided, it will be assigned to the `_weight` property. If no value is provided, the default value of 1 will be assigned.

  - ##### `Optional` val: V

    The `val` parameter is of type `V`, which means it can be any type. It is an optional parameter, meaning it can be omitted when creating an instance of the class.

  #### Returns AbstractEdge<V>

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

## Properties

### `Protected` _hashCode

_hashCode: string

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

### `Private` _val

_val: undefined | V

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

### `Private` _weight

_weight: number

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

## Accessors

### hashCode

- get hashCode(): string

- #### Returns string

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

### val

- get val(): undefined | V

- #### Returns undefined | V

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

- #### Parameters

  - ##### value: undefined | V

  #### Returns void

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

### weight

- get weight(): number

- #### Returns number

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

- #### Parameters

  - ##### v: number

  #### Returns void

  - 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

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

Generated using TypeDoc